-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Indenting paragraph in HTML view causes an error #14672
Comments
We really need the ability to indent natively in Gutenberg. This is a very important feature for many. |
Let's close this in favor of #14554. Getting a validation error after changing a block's expected markup is intended behavior. |
@swissspidy, I would like to know in what way
is non-expected. It is, after all (as far as I know) valid HTML. In addition, after resolving the error so that the desired indentation is maintained (ie, by converting the block to HTML), editing the block is cumbersome, as it can only be edited in HTML format, not graphically. |
Block validation is not simply a matter of verifying that the contents are valid HTML. The paragraph block cannot support this style attribute. The message is shown because it otherwise risks content loss (it can't handle the style, and thus it would be removed next time a save occurs). There are pending discussion for ideas in improving block invalidation at #7604. Based on how the paragraph block works, I suspect you may find some luck with the following variation: <p><span style="padding-left: 40px;"></span>Hello</p> |
Alas, that seems to indent only the first line, not the entire paragraph as
required. And it, too, invokes the error dialog.
pe 29. maalisk. 2019 klo 14.38 Andrew Duthie (notifications@github.com)
kirjoitti:
… Block validation is not simply a matter of verifying that the contents are
valid HTML. The paragraph block cannot support this style attribute. The
message is shown because it otherwise risks content loss (it can't handle
the style, and thus it would be removed next time a save occurs).
There are pending discussion for ideas in improving block invalidation at
#7604 <#7604>.
Based on how the paragraph block works, I suspect you may find some luck
with the following variation:
<p><span style="padding-left: 40px;"></span>Hello</p>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14672 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AsEEIcE8LNF6TDyEDRDonnr5wM2k_O3Xks5vbglbgaJpZM4cPG0i>
.
|
@vesaraiskila If you are still looking for a way to indent Paragraph on Gutenberg editor, you can use EditorsKit plugin. I've recently added Indent and Outdent Formats. Here's how it works. Thanks! |
Describe the bug
Using
<p style="padding-left: 30px;">
in a block causes an error messageTo Reproduce
Steps to reproduce the behavior:
<p style="padding-left: 30px;">This is a paragraph to be indented.</p>
4: Click the three dots to open the dialog to switch to visual editing mode.
Expected behavior
The block is shown visually.
Observed behavior
The error "This block contains unexpected or invalid content" is shown. (In Finnish in the screensot below)
Screenshots
The error message:
When selecting "Ratkaise" (=Resolve) the following is @shown:
Desktop (please complete the following information):
@swissspidy
The text was updated successfully, but these errors were encountered: