Bug: Invalid nodes nesting
See original GitHub issueThere’s an issue with copy-pasting when heading can end up nested into paragraphs. Same applies to all other sorts of invalid nesting (code block inside paragraph or list item, etc). Although we have several places assuming paragraph, heading, quote, code and list are either root-level children or nested into table cell, it’s not enforced in any way and you can replicate wrong nesting either by copy-pasting such content or by creating it via nodes api:
// Clipboard
<p><h1>Heading within paragraph</h1></p>
<ul>
<li><h1>Heading within list</h1></li>
</ul>
...
// Api
$createParagraphNode().append(
$createHeadingNode('h1').append(
$createTextNode('Heading within paragraph')
)
);
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Bug: `validateDOMNesting` error produces wrong HTML ...
Client side rendering can work with improper tag nesting because the DOM apis do allow creating these invalid nestings "by hand" (with document....
Read more >Why I'm getting Invalid NEST Error - Elasticsearch
Below is the error that I'm getting when trying to index, Invalid NEST response built from a unsuccessful low level call on POST: ......
Read more >An invalid controller has been detected. Perhaps, one of ...
1 Answer 1 · I've just made a PR to improve the error message here: github.com/nestjs/nest/pull/10479 :) – Micael Levi. Oct 29 at...
Read more >Db2 11 - コード - SQL エラー・コード
AN SQLSTATE OR SQLCODE VARIABLE DECLARATION IS IN A NESTED COMPOUND STATEMENT; -057. THE RETURN STATEMENT IN AN SQL FUNCTION MUST RETURN A...
Read more >Invalid NEST response built from a unsuccessful (200) low ...
Elasticsearch .NET DocumentExists() returns error: Invalid NEST response built from a unsuccessful (200) low level call on HEAD.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is really interesting - especially this part:
https://docs.slatejs.org/concepts/11-normalizing#built-in-constraints
We actually share the majority of these constraints and it would be great to document them. I like the idea of generally being able to declare constraints or invariants and remediations for them through some API like this.
This should be fixed with schemas.