How to add paragraphs in an item of a list in TinyMCE?

Viewed 683

I want to add some paragraphs in the same item of a list. Like:

  1. Text text text

    Text in a new paragraph

  2. Text text text

Is there anyway to do this in TinyMCE?

3 Answers

I found a simple way to create paragraphs in lists.

  1. User Shift + enter to create a line break in the list item.
  2. Select the text and select Paragraph. TinyMCE converts the <br> into paragraphs.

enter image description here

  1. Click OL from the editor.
  2. Add item one, Add item two, etc.
  3. Go back to the item you want to have a paragraph and hit enter creating a new li.
  4. Tab twice.
  5. Backspace the tabs (twice), this will remove the new li.
  6. Go back to the li you wanting the paragraph again and hit enter creating another li.
  7. Tab twice.
  8. Backspace twice.

Oddly doing it twice in WYSIWYG will do it.

Here are those steps in action:

1

The example above will put an ol/ul within the parent li producing someting like:

<ol>
<li>OneHad to do it twice.
<ol>
<li style="list-style-type: none;">&nbsp;</li>
</ol>
</li>
<li>TwoAgain, had to do it twice.
<ol>
<li style="list-style-type: none;">&nbsp;</li>
</ol>
</li>
<li>ThreeOdd, but it works :)
<ol>
<li style="list-style-type: none;">&nbsp;</li>
</ol>
</li>
</ol>

when typing in a list select paragraph from the top left corner. and then press ctrl+enter or ctrl+return for next line.

So this will be. for example, I am typing in a list:

  1. this is the first item of the list.
  2. this is the second item of the list (select paragraph now) and this (press ctrl+return) may contain more than one line
  3. this is the third line

so this will render:

  1. this is the first item of the list.
  2. this is the second item of the list and this

    may contain more than one line.

  3. this is the third line

see POC

Related