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

Raw Handling: Paste strips Markdown code blocks from quote #8781

Closed
aduth opened this issue Aug 9, 2018 · 5 comments
Closed

Raw Handling: Paste strips Markdown code blocks from quote #8781

aduth opened this issue Aug 9, 2018 · 5 comments
Labels
[Feature] Paste [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented Aug 9, 2018

The following snippet of Markdown, when pasted into the editor, correctly creates a Paragraph, Quote, and Paragraph block, but removes the code blocks.

https://gist.github.com/aduth/f8c8204c818a617cfad5d1dd79bb7441

Converted:

<!-- wp:paragraph -->
<p>Before:</p>
<!-- /wp:paragraph -->

<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Single line comments:</p><p>Multi-line comments should be used for long comments, see also the <a href="https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/#multi-line-comments">JavaScript Documentation Standards</a>:</p></blockquote>
<!-- /wp:quote -->

<!-- wp:paragraph -->
<p>After:</p>
<!-- /wp:paragraph -->

Expected behavior

Unsure if this is intended to be covered separately by exploration of nested blocks in a quote.

At the very least, I'd expect the text should not be destroyed, even if that means it is converted to plaintext.

Screenshots

image

@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] Paste labels Aug 9, 2018
@gektor-de
Copy link

Is this still the case? Can't reproduce on 4.1.1.

@aduth
Copy link
Member Author

aduth commented Nov 8, 2018

I've just re-tested, and it still eats my content.

Maybe important distinction: If copying from the Gist, at least for macOS, it's important to "Paste and Match Style", as otherwise it pastes as a table block (probably to do with ugly source HTML generated from Gist).

@ellatrix
Copy link
Member

@aduth That's because the quote block doesn't support anything other than paragraphs. We should change the block to use InnerBlocks. :)

@aduth
Copy link
Member Author

aduth commented Dec 12, 2019

@ellatrix Is there an existing issue on that effort for which we can close this in favor of?

@aduth
Copy link
Member Author

aduth commented Dec 12, 2019

Closing in favor of #15486

@aduth aduth closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants