There is a rich text field for an item in which I have used the numbered list. It looks fine in Text Editor. When Switched to the Html Editor mode, the generated markup is Ordered List and it has removed the numbers.

So, the output rendered on page also doesn't have numbers.

Is this a bug. What should I do to show numbers for the list.

enter image description here

enter image description here

Using sc8.2u3


This is the correct behaviour and the Rich Text Editor is generating the correct markup, i.e. for an ordered list element. You can read more about the <ol> tag in the MDN documentation, the W3 specs or find additional examples on the W3Schools site.

When an ordered list is used, the default behavior of the browser is to markup each list element (<li>) with a sequentially increasing number beginning at 1. You can edit both the style and starting number of the elements using CSS. The generated markup will show the correct numbered output when rendered in the browser to your end users similar to the WYSIWYG view of the top image.

  • But ideally, shouldn't it be WYSIWYG by default. I know we can use CSS.Here the user has used numbered list but in html it comes without numbers. And in the output it is also without numbers. What if the user uses something else as list pointer like roman numbers. Html will still remove those and output plain <li> ...right?
    – Qwerty
    Jan 24 '18 at 5:33
  • 1
    The editor is an HTML editor, therefore the markup it generates is HTML. Let's say the user inserts a new item between 2 and 3, is the text inserted was the literal numbers then they would be forced to change the existing 3-5 items by increasing by one... if the user wanted roman numerals then they style should be changed by setting the list-style-type CSS property or setting <ol type="i"> attribute. If the user manually typed the letter i without using the list buttons, then that is what will be rendered, not <li>
    – jammykam
    Jan 24 '18 at 5:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.