WordPress.org

Ready to get started?Download WordPress

Forums

Visual Editor - Ordered Lists Problem (9 posts)

  1. PhotoCitizen.com
    Member
    Posted 3 years ago #

    Anybody else notice this problem?

    1. I create an ordered list in the Visual Editor.

    2. I switch to the HTML editor so I can add a paragraph of text (or an image) within the ordered list, but NOT inside a list tag.

    3. I return to the Visual Editor and notice something doesn't look right.

    4. I go back to the HTML editor and see that my ordered list is now all messed up. Extra ordered list tags have been added that I don't want.

    Here's the code from the HTML editor BEFORE I switched back to the Visual Editor:

    <ol>
    	<li>Ordered list item 1</li>
                Block of text inserted into list but not inside an li tag.
    	<li>Ordered list item 2</li>
    	<li>Ordered list item 3</li>
    	<li>Ordered list item 4</li>
    </ol>

    Here's the code after switching to the Visual Editor and then back to the HTML editor:

    <ol>
    <ol>
    	<li>Ordered list item 1</li>
    </ol>
    </ol>
    Block of text inserted into list but not inside an li tag.
    <ol>
    	<li>Ordered list item 2</li>
    	<li>Ordered list item 3</li>
    	<li>Ordered list item 4</li>
    </ol>

    This has worked before. I've written many posts that include images and text within ordered lists and have never had this problem before. I've tried it with WP 3.2 and WP 3.2.1 and both have this trouble. Any suggestions how to fix it?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Don't switch editor tabs. It will mess up your markup. Pick a tab and then stick to it.

  3. torlowski
    Member
    Posted 3 years ago #

    The problem is most likely because you are trying to put code inside the ol tag that is not inside the LI. WordPress is trying to fix that by adding the extra ol tags. Even if you only worked in the HTML window, it would still probably have this effect.

    Why don't you want it inside the LI tag? That's probably the only way it's going to work right.

  4. PhotoCitizen.com
    Member
    Posted 3 years ago #

    esmi: Switching tabs certainly DOES mess up the HTML code. It's a lot easier to write using the Visual Editor, but unfortunately, there are lots of things that can only be done in the HTML editor. So I need both.

    Right now, I'm trying out Windows Live Writer to avoid the WordPress post editor completely. So far, I like it. But there are still some things I'll need to do in WordPress - such as adding image captions. If I can avoid using the WordPress HTML editor, though, maybe Live Writer will work. It also has its own HTML editor and switching between them doesn't seem to break anything.

  5. PhotoCitizen.com
    Member
    Posted 3 years ago #

    torlowski: It's strange that this technique of mine has worked before. Check out this post on my blog PhotoCitizen.com.

    Under the first heading, "Basic Batch Watermarking," there is an ordered list. Notice item 2 has two paragraphs and the second paragraph is not numbered. I like to break up long blocks of text to make it more readable.

    As you can see, this has worked before. But I bet if I opened it in the WordPress editor now, it would mess things up again. I've already made that mistake with an older post and I won't do that again.

  6. torlowski
    Member
    Posted 3 years ago #

    I can understand why you would want to break up long posts. A better (and more HTML-valid way) might be to stop the ordered list, insert the picture or whatever, and then restart the list, using <li value="xx"> to start the list numbering where you want it to be. You only have to use the value attribute on the first li tag, and it will automatically number from there for the rest of that list.

    HTH...

  7. PhotoCitizen.com
    Member
    Posted 3 years ago #

    That would probably work - and I may resort to that method. I just can't figure out why I never had to do that before and now I do. Something has changed and I don't know what. Thanks for the help.

  8. ibrahimnadir
    Member
    Posted 2 years ago #

    I am facing the same issues with wordpress lists. For instance i cant get a way to put an image in a list by writing some text before and then press enter and give an image of the text above.

    Its just like i am giving 5 steps and each step is to describe a way to do something along with images. I want to align images in the center. I tried it a lot but i think i dont know how to do it. I have seen on other websites and i see people doing it. I don tknow what i am missing.

    Can anyone help?

  9. ibrahimnadir
    Member
    Posted 2 years ago #

    also while working with the visual editor i cant start a list within another list. Like unordered within ordered list. Is there some video i can follow? i really need help with this.

Topic Closed

This topic has been closed to new replies.

About this Topic