My users can created lists through the TinyMCE editor, so they have a <ul><li>...</li><li>...</li></ul> structure. Now they must be able to add a style class to the <ul> element, resulting in <ul class="bulletlist"> I'm able to add styles to the style-dropdownlist in the editor, but I don't succeed in applying the style class to the <ul>.
I just tried this, and I could only seem to attach styles to list items as there's no way to select the whole list. Do you need more than one list style per RTE? If not you could just use a
#content ul {bleh:bleh;}
kind of style. One thing I found myself doing once was creating certain list items as nodes under the page they were placed on. Not ideal...
This might be a bit of a cumbersome suggestion. But is there any chance that you could have another rich text editor on your document type where people can insert the specific lists?
As mentioned it is a bit cumbersome and I really don't have any idea if it could be of any use. Just a thought.
Maybe there is a possibility by altering the list-commandbutton in the TinyMCE toolbar, or add a new button to it, but I have absolutely no idea where to start to achieve this.
Well it should be possible to extend TinyMCE since it's open source. But I am not quite sure how to do it.
But I guess that's your only other option then if you cannot educate the content editors to insert the class name in the HTML view perhaps? I know it is not an ideal solution but if they are just a bit technology savvy and used to using a CMS it might be possible? If they are absolute beginners or just frightened by technology then it is off course a no go.
Or just set the styles in css on the <li>'s, not the <ul>'s and have the editors select the whole list to apply the style. Far from ideal, but easier than writing your own plugin
Set style class on <ul>
My users can created lists through the TinyMCE editor, so they have a <ul><li>...</li><li>...</li></ul> structure.
Now they must be able to add a style class to the <ul> element, resulting in <ul class="bulletlist">
I'm able to add styles to the style-dropdownlist in the editor, but I don't succeed in applying the style class to the <ul>.
Any ideas ?
I just tried this, and I could only seem to attach styles to list items as there's no way to select the whole list. Do you need more than one list style per RTE? If not you could just use a
kind of style. One thing I found myself doing once was creating certain list items as nodes under the page they were placed on. Not ideal...
Thank you for your response.
Unfortunately there are multiple <ul> elements in my content that may not be affected.
Maybe it is possible to affect the 'generate list' button in the editor toolbar so I can attach the classname there ?
This might be a bit of a cumbersome suggestion. But is there any chance that you could have another rich text editor on your document type where people can insert the specific lists?
As mentioned it is a bit cumbersome and I really don't have any idea if it could be of any use. Just a thought.
That's not possible Jan.
Maybe there is a possibility by altering the list-commandbutton in the TinyMCE toolbar, or add a new button to it, but I have absolutely no idea where to start to achieve this.
Well it should be possible to extend TinyMCE since it's open source. But I am not quite sure how to do it.
But I guess that's your only other option then if you cannot educate the content editors to insert the class name in the HTML view perhaps? I know it is not an ideal solution but if they are just a bit technology savvy and used to using a CMS it might be possible? If they are absolute beginners or just frightened by technology then it is off course a no go.
This may get you started:
http://tinymce.moxiecode.com/examples/example_20.php
or this:
http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x
Or just set the styles in css on the <li>'s, not the <ul>'s and have the editors select the whole list to apply the style. Far from ideal, but easier than writing your own plugin
I selected your solution dandrayne.
Not ideal but acceptible to me and my client
If it's not too late, another way would be to create a Macro that does this.
Make it have a lot of input boxes and a property (dropdown) to select the style.
is working on a reply...