Add freeform support to the react native editor#22609
Merged
Conversation
2 tasks
|
Size Change: -58 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
gziolo
reviewed
May 26, 2020
| "supports": { | ||
| "className": false, | ||
| "customClassName": false, | ||
| "inserter": false, |
Member
There was a problem hiding this comment.
I guess that’s the only difference with web definition. It might be easier to maintain it if it was applied with WordPress hook when the registration happens. It’s more code but you would ensure that the block definition always stays in sync.
| * Internal dependencies | ||
| */ | ||
| import edit from './edit'; | ||
| import metadata from './block.native.json'; |
Member
There was a problem hiding this comment.
In fact, you probably could avoid overriding JavaScript file at all when using blocks.registerBlockType filter (hook).
gziolo
approved these changes
May 26, 2020
Member
gziolo
left a comment
There was a problem hiding this comment.
That was quick update, looks great. To be 100% clear, I haven't tested... :)
etoledom
approved these changes
May 26, 2020
Contributor
etoledom
left a comment
There was a problem hiding this comment.
Tested on WPiOS and works great!
And autosave still works, tested killing the app after editing on HTML mode ✅
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes wordpress-mobile/gutenberg-mobile#2292
Gutenberg Mobile PR wordpress-mobile/gutenberg-mobile#2312
Description
This PR registers the classic block on the react native version of the editor and defines it as the "Freeform Content Handler". This allows the parser to fallback to a freeform block whenever HTML is found outside the boundaries of a block while parsing a post.
How has this been tested?
See gutenberg mobile PR
Types of changes
React Native changes
Checklist: