Gutenberg editor
-
I am still investigating. There are reports of some issues, and I am in the progress of investigating.
Ok, I look forward to your update.
The easiest way at to make it work at the moment is to use “shortcode” block, and insert the value in form:
[cc lang="php"] $x = "10"; [/cc]Sure. I did several blocks and have email you about issues. Or started questions here. I can’t remember.
Yeah, I see them now. Will investigate!
Thanks.
What I did was use a Custom HTML Block and then within that do something like:
<code lang="PHP"> ... </code>It also looks like with the latest Gutenberg Version, inline code seems to work with a normal paragraph block when editing it as HTML:
<p>Another paragraph. I am typing more stuff in to get an auto save. Blah, blah. <code inline="true">This is code.</code></p>MarkRH but that won’t have all the syntax hilighting will it?
I await resolution from the author. I think it merits a bespoke rendered block for the editor.
Any official update? I version 5 is out now.
Any update to my queries? Thank you.
Yes, it keeps the syntax highlighting. Screenshot: https://i.imgur.com/fqkDsPi.png
Was done with the following code in a normal Gutenberg Paragraph block:
<p>This is a normal paragraph block. Following is some inline PHP: <code inline="true" lang="php">print_r($arItems[$itemCount]);</code>and this is normal text after.</p>For blocks of code, I use the Custom HTML Block like I mentioned earlier. The standard “Code” block introduces some of the built-in styling which is unwanted. Anyway, v0.9.16 works fine here in the cases that I use it.
I changed all of the blocks to custom HTML blocks and used the
<code>approach. Visually the published post looks ok.But it is when I edit the post that it comes up with all those issues again and I have to click the “convert to html” button above each block. Which is annoying.
The topic ‘Gutenberg editor’ is closed to new replies.