TinyMCE give table a css-class

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
janvl
Power Poster
Power Poster
Posts: 985
Joined: Wed Aug 13, 2008 10:57 am

TinyMCE give table a css-class

Post by janvl »

Hi,

i am looking for a way to pass a default css-class for tables made in TinyMCE.

I have been looking in the module-settings, the javascript-files and in the website of tinymce.
I have cmsms 2.2.15 with tinymce-module 3.3.2

regards,
Jan
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: TinyMCE give table a css-class

Post by velden »

can't you use a class/id for the container of the user-added content?

Example:

Code: Select all

<div id="user-content">{content}</div>
Styling:

Code: Select all

#user-content table { 
  ...css...
 }
jQuery selector:

Code: Select all

jQuery("#user-content table")....
janvl
Power Poster
Power Poster
Posts: 985
Joined: Wed Aug 13, 2008 10:57 am

Re: TinyMCE give table a css-class

Post by janvl »

Hi Velden,

Thanks.

i might solve the problem this way, using an extra container div for the table.

I use W3.CSS that brings its own classes.

The user is not able to manipulate the HTML. Maybe your idea combined with a snippet will works.
I will try that.

Regards,
Jan
Post Reply

Return to “Modules/Add-Ons”