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

When pasting/typing within a blockquote a new line creates an entirely new blockquote element #742

Closed
auralon opened this issue Jun 8, 2016 · 5 comments

Comments

@auralon
Copy link

auralon commented Jun 8, 2016

Newlines are creating a new element, when they should break within the blockquote element.

Steps for Reproduction

  1. Create a block quote
  2. Type some text then hit enter
  3. Type some more text

Expected behavior: Should break within the same blockquote element

Actual behavior: Creates a new blockquote element and newline text becomes new quote entirely

Platforms: 48.0.2564.116 (64-bit) on Elementary Freya (Ubuntu 12.04)

Version: 1.0.0-beta.4

@auralon
Copy link
Author

auralon commented Jun 8, 2016

The same applies for code blocks (wrapped in <pre>)

@auralon
Copy link
Author

auralon commented Jun 8, 2016

To clarify, I want to produce....

<blockquote>This is the first line of the quoted text<br>
    This is the second line<blockquote>

... but I get...

<blockquote>This is the first line of the quoted text</blockquote>
<blockquote>This is the second line</blockquote>

Which messes up styling (eg: using before psuedo element to added a quote icon). This also messes up the code contained in the <pre> tags too. I'm using highlight.js to style this code, but because each line is within it's own <pre spellcheck="false"> then it can't process it properly.

@jhchen
Copy link
Member

jhchen commented Jun 12, 2016

This is working as designed at the moment. It is perfectly possible to create CSS rules that only affect the first or last <pre> or <blockquote>. The rounded corners to work in the existing code block implementation is an example of this.

@jhchen jhchen closed this as completed Jun 12, 2016
@auralon
Copy link
Author

auralon commented Jun 13, 2016

Sure, I realise that I can use certain css selectors to style quotes and codeblocks to mask this particular quill behaviour, but that wouldn't help with the conflict that is being hit with highlight.js (a code block syntax highlighter), which expects an entire code block to be within a single <pre> tag.

As soon as each line of a code snippet is wrapped in a <pre> tag, then it breaks the highlighting and syntax detection. It would still be great to amend this quill behaviour, to increase cross-compatibility with packages like highlight.js.

@jhchen
Copy link
Member

jhchen commented Jun 13, 2016

#723

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

2 participants