Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tables with background-color
#8
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:
[Image: hintergrund2.jpg]

Backend:
[Image: hintergrund1.jpg]

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
Reply


Messages In This Thread
Tables with background-color - by bugmenot - 2011-05-11, 20:00:06
Tables with background-color - by Connie - 2011-05-11, 21:30:45
Tables with background-color - by bugmenot - 2011-05-11, 23:18:29
Tables with background-color - by Connie - 2011-05-12, 05:11:03
Tables with background-color - by mvlcek - 2011-05-12, 16:07:16
Tables with background-color - by bugmenot - 2011-05-13, 19:29:44
Tables with background-color - by Connie - 2011-05-13, 21:06:41
Tables with background-color - by Connie - 2011-05-14, 00:03:46
Tables with background-color - by mvlcek - 2011-05-14, 00:18:10
Tables with background-color - by Connie - 2011-05-14, 00:33:29
Tables with background-color - by mvlcek - 2011-05-14, 00:59:37
Tables with background-color - by bugmenot - 2011-05-16, 21:42:45
Tables with background-color - by Connie - 2011-05-16, 22:11:52



Users browsing this thread: 6 Guest(s)