0

I'm trying to change the behavior of tinymce regarding ordered list (using the plugin advlist), actually if i type an ordered list i've got this html :

<ol>
  <li>first item</li>
  <li>second item</li>
  <li>third item</li>
</ol>

if after my "Title 1" i press two times enter my actual list is split and so i have two differents lists, and i dont want that ...

i want to be able to insert inside my original ordered list another ordered list, like this :

<ol>
  <li>first item</li>
  <li>second item
    <ol>
      <li>second item first subitem</li>
      <li>second item second subitem</li>
      <li>second item third subitem</li>
    </ol>
  </li> 
  <li>third item</li>
</ol>

I find this post it's not what i want to do but it explains how to change keyboard behavior, but i am not able to find how to avoid this auto close ol tag ...

I check a lot of option in tinymce but it doesn't seems to be something i can do using options (end_container_on_empty_block, fix_list_elements etc ...)

how to avoid auto close ol tag when i do a line return ?

  • Have you tried pressing "shift enter" or "control enter" instead of just enter? A lot of times that adds a line break without closing tags. – WebElaine Feb 7 '18 at 16:47
  • "Shift enter" made me stay inside the li tag but i'm not able to insert a new ordered list / "Control enter" has the same behavior as enter alone (one time : create a new item in the current list / two times split my list) – Aliiiiiiii Feb 7 '18 at 18:06
0

Finally (thanks to tinymce forum) i found the answer :

when i'm on "second item" for example just have to click on tab and that will create a sub-list

| improve this answer | |

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.