Nested ordered lists discarded by WYSIWYG
-
I’m having really weird issue with WYSIWYG editor, it doesn’t allow me to make nested ordered list.
Explanation:
To best explain the issue, I’m quoting it from here.- Create a numbered list in WYSIWYG editor
- Nest one item with “indent” button
- Preview – list is shown as one-level list
- Save and View – list is shown as one-level list
- Edit again – list is shown as one-level list
Example:
Before I save draft/publish post, it looks like this:
Screenshot: Image link here.
CODE:
<ol> <li>One</li> <ol> <li>1.1</li> <li>1.2</li> </ol> <li>Two</li> <ol> <li>2.1</li> <li>2.2</li> </ol> <li>Three</li> <li>Four</li> <li>Five</li> </ol>And after I save/publish the post, the editor turns it into this:
Screenshot: Image link here.
CODE:
<ol> <li>One</li> </ol> <ol> <li>1.1</li> <li>1.2</li> </ol> <ul> <li>Two</li> </ul> <ol> <li>2.1</li> <li>2.2</li> </ol> <ul> <li>Three</li> <li>Four</li> <li>Five</li> </ul>It’d be great if anybody can help.
-
A screenshot is of no use. What might help is a link to a published page demonstrating the problem. In the meantime, have you tried:
– deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
– switching to the Twenty Eleven theme to rule out any theme-specific problems.
– resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
– re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress.
Link to a live page ─ http://goo.gl/d0Fs1o
WordPress is correct. It’s your markup that’s wrong if you want nested lists. It should be:
<ol> <li>One<ol> <li>1.1</li> <li>1.2</li> </li></ol> <li>Two<ol> <li>2.1</li> <li>2.2</li> </li></ol> <li>Three</li> <li>Four</li> <li>Five</li> </ol>My guess is that you’re positioning your cursor incorrectly when indenting your sub-lists.
positioning your cursor incorrectly
I don’t get that.
WYSIWYG editor never gave me issues like this before, and I’ve always used it the same way I’m using it today.
I forgot to mention before that this issue came after I upgraded to WP 3.0 or WP 3.1 (may be) a couple of months ago. So I’m very much sure that the problem is WordPress specific.
My current WP version is 3.2.
There are no known issues of this type in WP 3.2.1. Have you tried:
– deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
– switching to the Twenty Eleven theme to rule out any theme-specific problems.
– resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.
– upgrading to WordPress 3.2.1
No I’m already on WP 3.2.1.
Anyway, I’ll try the other solutions. Meanwhile, If you find anything else please let me know.
And thanks for your time 🙂
I was having a similar problem. I solved it by adding a type attribute to the ol tags:
<ol type="1st level"> <li>One</li> <ol type="2nd level"> <li>1.1</li> <li>1.2</li> </ol> <li>Two</li> <ol type="2nd level"> <li>2.1</li> <li>2.2</li> </ol> <li>Three</li> <li>Four</li> <li>Five</li> </ol>Esmi’s code above works for me, too, though. I hadn’t thought to enclose the 2nd level ol tags within the 1st level li tags.
The topic ‘Nested ordered lists discarded by WYSIWYG’ is closed to new replies.