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

Support for WordPress 5.0 and the new editor - Gutenberg #9

Closed
bobbingwide opened this issue Jan 14, 2018 · 9 comments
Closed

Support for WordPress 5.0 and the new editor - Gutenberg #9

bobbingwide opened this issue Jan 14, 2018 · 9 comments
Assignees
Labels
enhancement Gutenberg Changes required for peaceful coexistence with Gutenberg Priority B Medium importance question

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jan 14, 2018

Since early 2017 a new editor has been under development. Code named Gutenberg this new editor is being developed as a feature plugin. It is expected to be merged into core for WordPress 5.0.

We need to be aware of Gutenberg and to attempt to be compatible with it.
Actually, it's the other way round. Gutenberg needs to be backward compatible with us.

According to Gutenberg's README.

Posts are backwards compatible, and shortcodes will still work.

That's not the case right now.

The following shortcodes, which depend on the new line character being respected in content, may not work correctly after being manipulated by the Gutenberg editor
[bw_css]
[bw_geshi]

Area Problem Reference / Solution
bw_geshi Unexpected <br /> tags in output gutenberg_autop needs to be removed from priority 8
bw_css Seems OK

Analysis

The reason we see br's for the [bw_geshi] output is because gutenberg_wpautop() introduces them but bw_geshi() doesn't strip them.
We don't see them in [bw_css] because the oik_css() function removes them using bw_remove_unwanted_tags().

@bobbingwide bobbingwide self-assigned this Jan 14, 2018
@bobbingwide bobbingwide added Gutenberg Changes required for peaceful coexistence with Gutenberg Priority B Medium importance labels Mar 21, 2018
bobbingwide added a commit that referenced this issue Mar 21, 2018
…ent priority 8 to enable [bw_geshi] to continue to work in a Classic block
@bobbingwide
Copy link
Owner Author

Note: The problem with [bw_geshi] is demonstrated at https://herbmiller.me/getting-access-files/ With Gutenberg 2.6.0, since it’s running oik-css v0.9.0.
See if Gutenberg 2.7.0 makes any difference then build and install oik-css v0.9.1 if it doesn’t.

@bobbingwide
Copy link
Owner Author

Gutenberg v2.7.0 didn't make a difference, so I've applied oik-css v0.9.1

@bobbingwide
Copy link
Owner Author

bobbingwide commented Dec 12, 2018

<br /> stripping is not working with WP 5.0-RC3 and Gutenberg 4.6.1 on s.b/oikcom.
It seems almost impossible to prevent the Block editor from adding a whole load of unwanted p's and br's even when using the code editor to edit a Classic block.

The solution would appear to be to create a Geshi block, similar to the CSV and CSS blocks prototyped in https:/github.com/bobbingwide/oik-blocks.

@bobbingwide
Copy link
Owner Author

As noted in bobbingwide/oik-blocks#18 (comment) the GeSHi block needs to accept a default value of none for the lang parameter.

@bobbingwide
Copy link
Owner Author

In order to be able to close this I either have to release oik-blocks formally, or add the relevant blocks to each plugin. I.e. Add the CSS and GeSHi blocks to oik-css.

@bobbingwide
Copy link
Owner Author

OK, so I've prototyped adding the CSS and GeSHi blocks to oik-css. I used a prefix of oik-css; oik-blocks uses oik-block. So the blocks will coexist peacefully. Now do have to consider implementing a transform?

@bobbingwide
Copy link
Owner Author

And what do I have to do about oik-css saying it's dependent upon oik?

bobbingwide added a commit that referenced this issue Dec 15, 2019
bobbingwide added a commit that referenced this issue Dec 15, 2019
bobbingwide added a commit that referenced this issue Dec 15, 2019
bobbingwide added a commit that referenced this issue Jan 5, 2020
bobbingwide added a commit that referenced this issue Jan 5, 2020
bobbingwide added a commit that referenced this issue Jan 5, 2020
bobbingwide added a commit that referenced this issue Jan 12, 2020
…eaControl to allow transformation from CSS block
@bobbingwide
Copy link
Owner Author

Note: The transform from logic added to allow transform from core/paragraph, core/code and core/preformatted was done incorrectly and prevented the transform from oik-block/css.

@bobbingwide
Copy link
Owner Author

This was released in v1.0.0 on 30th January 2020. Better late than never?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Gutenberg Changes required for peaceful coexistence with Gutenberg Priority B Medium importance question
Projects
None yet
Development

No branches or pull requests

1 participant