• Resolved ccot

    (@ccot)


    I am developing a new WordPress site and am having trouble with the editor.
    I have a page that contains several unordered lists. I place a [p]Description[/p] line just inside each opening [ul] tag.

    [ul]
      [p]Description for this list[/p]
      [li]List Item One[/li]
      [li]List Item Two[/li]
      ...
    [/ul]

    Not only does this make for easy (classless) CSS formatting, but it is completely valid HTML!

    The problem occurs when I change to Visual Mode in the editor: The [p]…[/p] just inside the [ul] tag gets moved above [ul] tag. Now why in the world would the editor do that?

    I’ve tried the common plugins that claim to preserve Raw HTML, but they just don’t work in this case!

    Does anyone know how this issue might be corrected? Why can’t the editor just leave the HTML alone, so long as the HTML is valid?

    • This topic was modified 7 years, 3 months ago by ccot.
    • This topic was modified 7 years, 3 months ago by ccot.
    • This topic was modified 7 years, 3 months ago by Steven Stern (sterndata).

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    if you’re actually using [ul] instead of <ul> it’s no wonder it doesn’t work.

    If putting HTML here, please use the CODE button or backticks around it.

    Thread Starter ccot

    (@ccot)

    Steve, of course I use angle brackets in the actual page! I put square brackets here to prevent the topic from displaying improperly!
    Charles.

    According to the W3C Recommendation, the basic structure of a list must be:

    
    <UL>
       <LI> ... first list item...
       <LI> ... second list item...
       ...
    </UL>
    

    You can put p tags only inside of li tags, not as direct children of ul.

    The W3C Recommendation expressly states: lists are made up of sequences of list items defined by the LI element

    Thread Starter ccot

    (@ccot)

    What do they know? p tags directly inside of ul tags work in Firefox. Do the Mozilla people know something that the W3C people don’t?

    The W3C people sound like a bunch of control freaks to me. We don’t need no stink’n control freaks!

    Seriously, though, I don’t see a good reason for such a limitation.

    I am not seeing the Edit button anymore for the original post. So I don’t know how to edit the site URL. This page can now be seen here.

    • This reply was modified 7 years, 3 months ago by ccot.
    • This reply was modified 7 years, 3 months ago by ccot.
    Thread Starter ccot

    (@ccot)

    It’s not worth the time I’ve spent. I went ahead and put the list headings above the UL tags, like W3C wants and modified the CSS accordingly.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress Editor and raw html’ is closed to new replies.