Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Friedrich 5 posts 21 karma points
    Jul 16, 2009 @ 10:00
    Friedrich
    0

    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 ?

  • dandrayne 1138 posts 2262 karma points
    Jul 16, 2009 @ 10:30
    dandrayne
    0

    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...

  • Friedrich 5 posts 21 karma points
    Jul 16, 2009 @ 14:47
    Friedrich
    0

    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 ?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 16, 2009 @ 14:52
    Jan Skovgaard
    0

    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.

  • Friedrich 5 posts 21 karma points
    Jul 17, 2009 @ 01:06
    Friedrich
    0

    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.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jul 17, 2009 @ 01:15
    Jan Skovgaard
    0

    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.

  • Daniel.S 50 posts 135 karma points
    Jul 17, 2009 @ 03:27
  • dandrayne 1138 posts 2262 karma points
    Jul 17, 2009 @ 11:28
    dandrayne
    1

    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

     

  • Friedrich 5 posts 21 karma points
    Jul 17, 2009 @ 22:26
    Friedrich
    0

    I selected your solution dandrayne.

    Not ideal but acceptible to me and my client

  • SaphuA 124 posts 87 karma points
    Jul 18, 2009 @ 00:31
    SaphuA
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft