Closed bobbingwide closed 4 years ago
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.
Gutenberg v2.7.0 didn't make a difference, so I've applied oik-css v0.9.1
<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.
As noted in https://github.com/bobbingwide/oik-blocks/issues/18#issuecomment-446944075 the GeSHi block needs to accept a default value of none
for the lang
parameter.
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.
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?
And what do I have to do about oik-css saying it's dependent upon oik?
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.
This was released in v1.0.0 on 30th January 2020. Better late than never?
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.
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]
<br />
tags in outputAnalysis
The reason we see br's for the [bw_geshi] output is because
gutenberg_wpautop()
introduces them butbw_geshi()
doesn't strip them. We don't see them in [bw_css] because theoik_css()
function removes them usingbw_remove_unwanted_tags()
.