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

Headings can be accidentally nested within themselves #93

Open
jaredreich opened this issue Mar 14, 2018 · 5 comments
Open

Headings can be accidentally nested within themselves #93

jaredreich opened this issue Mar 14, 2018 · 5 comments
Labels
Milestone

Comments

@jaredreich
Copy link
Owner

Repro steps:

  • Create a list (orderded or unordered)
  • Click a header button multiple times
  • See (in the output HTML) that the header nest inside itself each time
@jaredreich jaredreich added the bug label Mar 14, 2018
@Sjeiti
Copy link

Sjeiti commented Mar 22, 2018

While html should follow basic W3C rules, a quick (not-really-a) fix would be a button that removes the formatting from the current selection.

@jaredreich
Copy link
Owner Author

@Sjeiti
Copy link

Sjeiti commented Mar 25, 2018

@jaredreich yeah I tried that with Pell. It removes formatting set by style but not formatting implied by element. I'm afraid you'll need a custom method to strip all elements for that (also needed for #53).
A really easy content.textContent += '' works but also strips the linebreaks. So you might need something fancier.

@jaredreich
Copy link
Owner Author

@Sjeiti ok I see, thanks for the investigation. I'll have to dig deeper.

@jaredreich jaredreich added this to the 2.0 milestone Mar 28, 2018
@Mera-Gangapersaud
Copy link

Mera-Gangapersaud commented Dec 8, 2018

This doesn't happen in all browsers. I tried recreating this problem in both Chrome and Firefox and Firefox works fine. I found this on StackOverflow to help explain the issue. Looks like it could be fixed from chromium since the problem is with how the browser determines the blocks used by formatBlock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants