-
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
Autocompleter lets you insert multiple More blocks #4225
Comments
In the classic world it is quite valid to have the more tag multiple times in a post:
When implementing this fix we need to take backward compatibility into consideration. Examples:
|
Thanks for providing that perspective, @bobbingwide. Such an example, however, really pushes the editor's ability to accommodate for the disparate uses of shortcodes and tags. This is probably one of those scenarios where the most viable option is to use the Classic block. Otherwise, Gutenberg will treat the shortcodes markings as individual shortcodes, or actually not detect them at all, since these ( gutenberg/blocks/library/shortcode/index.js Lines 35 to 43 in 4cf8135
Interestingly, upon testing this, the fact that those shortcodes start with a colon means that, when pasting, Gutenberg resorts to the Classic block on its own, thus preserving the legacy content:
My takeaway is that we will never be able to anticipate all the possible ways in which shortcodes are used to structure special content. It it manageable to look at content within regular opening and closing tags:
but that's the extent of what we can infer. |
Note: I have just created a prototype test case which demonstrates that it's quite possible to create and display paginated content with multiple excerpts being correctly extracted.
Whilst WordPress core doesn't cater for multiple extracts they can be achieved using very little code.
|
Correct, though I'm not concerned about the server-side aspect, where I expect things to work the same way. I'm concerned about the editor, namely recognizing what is what. |
So long as it's clearly documented what the differences are between old and new. |
While the notice is nice, we shouldn't allow adding multiple See also #3968. |
Noting that #6067 should fix this because it makes the autocompleter use |
Steps to reproduce
Expected result
Step (3) should be impossible as only one More is allowed in a post.
Actual result
More, More, More!
Root cause
Autocompleter doesn't respect the
useOnce
property.The text was updated successfully, but these errors were encountered: