Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lists do not work as expected with divs #5075

Open
alecpl opened this issue Jul 11, 2019 · 1 comment

Comments

@alecpl
Copy link
Contributor

commented Jul 11, 2019

  1. Goto editor e.g. at https://www.tiny.cloud
  2. Insert <div>a<br /><br />b<br />c</div> via Source code.
  3. Select "c"
  4. Click Numbered list or Bullet list.

Result:
The whole div content becomes a list entry.

Expected:
Only the last ("c") line becomes a list. Also, if you select "b" and "c" I'd expect a list with two elements (1. "b", 2. "c").

I'm not sure it is a know limitation of the lists plugin, but I hope this is not an intended behavior.

@TheSpyder

This comment has been minimized.

Copy link
Member

commented Jul 12, 2019

It's not just div, the same will happen with p tags. br is not a DOM block boundary and many operations (list, block style, alignment) operate on block boundaries.

We have had a few discussions internally about switching TinyMCE to work like our https://textbox.io editor, which introduced the concept of "quasi blocks" where br is a boundary and your example works, but it's not a small change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.