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

Remove block format from a line #1228

Closed
benbro opened this issue Dec 29, 2016 · 3 comments
Closed

Remove block format from a line #1228

benbro opened this issue Dec 29, 2016 · 3 comments

Comments

@benbro
Copy link
Contributor

benbro commented Dec 29, 2016

It's not possible to remove code formatting from an empty line.
Block formatting is removed only when there is a selection range.
When the code block is at the beginning of the document, it's not possible to enter normal lines above it.

Steps for Reproduction

  1. Visit http://quilljs.com/docs/formats/
  2. Copy the following code block (three lines)
var a = 1;

var b = 2;
  1. Place the cursor on the second line. Click on the Tx button
  2. Place the cursor on the third line. Click on the Tx button

Expected behavior:
Code block formatting should be removed from the second and third lines.

Actual behavior:
Both lines still formatted as code blocks.

Platforms:
Chrome 55 on Windows 7

Version:
1.1.8

@benbro benbro changed the title Remove block format from a row Remove block format from a line Dec 29, 2016
@jhchen
Copy link
Member

jhchen commented May 14, 2017

I think the issue is remove formatting requires at least a selection. There does not seem to be complete consistency between other editors' remove formatting feature. Some do not remove block level formats at all. There was a discussion on redesigning this in #954 but it does not seem like many people had any strong opinions.

The documentation is not clear about it needing to be a highlight. Perhaps that should just be clarified?

@benbro
Copy link
Contributor Author

benbro commented May 14, 2017

I've added a comment on #954.

Currently removeFormat doesn't remove block formats when the range is collapsed.
That's the only thing missing to make Quill remove format behavior ideal.

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

No branches or pull requests

3 participants