2011-05-14, 00:03:46
I realised a provisorial solution which might be overwritten with every upgrade, but at least it shows that it works.
I will go deeper into it how to integrate it without risk of upgrade-damages ;=(
See here: I think that is what you want:
Live-Demo:
http://www.urbanistan.de/getsimpletest/tabellentest/
Front-End:
Backend:
what I did and what you should do:
1) enable the advanced toolbar in the gsconfig.php, so you will have the styles-combobox:
2) download the file default.js which is attached here
3) open your site with FTP, go to /admin/template/js/ckeditor/plugins/styles/styles
make backup of the file default.js and upload the one which I attached here
4) open a new page in the editor,
create a table, using the table icon
add text into tablecell, click on STYLE (or STIL) and choose the one format "Tabellenzelle rot" oder "Tabellenzelle grün"
So, to explain what I did:
by default all styles which are offered in the STYLES-combobox are defined in the file default.js in
admin/template/js/ckeditor/plugins/styles/styles
this is a compressed javascript-file
I downloaded an uncompressed one from
http://svn.ckeditor.com/CKEditor/trunk/_...default.js
and edited that.
I added
and it works.
@mvlcek,
the correct notation is not "attribute" but "styles"
Now I will try to find out how to do this in a custom file, but as you see it is possible to do (and I know now how to get rid of some of the rubbish from the default combo-box)
Cheers, Connie
I will go deeper into it how to integrate it without risk of upgrade-damages ;=(
See here: I think that is what you want:
Live-Demo:
http://www.urbanistan.de/getsimpletest/tabellentest/
Front-End:
Backend:
what I did and what you should do:
1) enable the advanced toolbar in the gsconfig.php, so you will have the styles-combobox:
Code:
# WYSIWYG toolbars (advanced, basic or [custom config])
define('GSEDITORTOOL', 'advanced');
2) download the file default.js which is attached here
3) open your site with FTP, go to /admin/template/js/ckeditor/plugins/styles/styles
make backup of the file default.js and upload the one which I attached here
4) open a new page in the editor,
create a table, using the table icon
add text into tablecell, click on STYLE (or STIL) and choose the one format "Tabellenzelle rot" oder "Tabellenzelle grün"
So, to explain what I did:
by default all styles which are offered in the STYLES-combobox are defined in the file default.js in
admin/template/js/ckeditor/plugins/styles/styles
this is a compressed javascript-file
I downloaded an uncompressed one from
http://svn.ckeditor.com/CKEditor/trunk/_...default.js
and edited that.
I added
Code:
{ name : 'Tabellenzelle rot' , element : 'td', styles : { 'background-color':'red' } },
{ name : 'Tabellenzelle grün' , element : 'td', styles : { 'background-color':'green' } },
and it works.
@mvlcek,
the correct notation is not "attribute" but "styles"
Now I will try to find out how to do this in a custom file, but as you see it is possible to do (and I know now how to get rid of some of the rubbish from the default combo-box)
Cheers, Connie
|--
Das deutschsprachige GetSimple-(Unter-)Forum: http://get-simple.info/forums/forumdisplay.php?fid=18
Das deutschsprachige GetSimple-(Unter-)Forum: http://get-simple.info/forums/forumdisplay.php?fid=18