Tag: Gutenberg
-
Post Views: 21 1. Discover problems Recently, when I was using the Polylang + AutoPoly plugin to multilingually translate the blog, I found a strange phenomenon: – The code block inserted by the Gutenberg editor (SyntaxHighlighter block), the code format in the translated English article is intact, and the indentation, angle brackets, etc. are all normal. – The code blocks…
-
Post Views: 49 The correct display of code blocks is critical when writing a technical blog. Recently, I’m having trouble with code blocks using the WordPress Gutenberg editor, and I’m struggling to find a better solution. After repeated exploration, I finally summed up a complete set of ‘from manual to automatic’ complete plan, which can not only solve the problem…
-
Post Views: 114 The background When writing a technical blog with a WordPress block editor (Gutenberg), I often need to include multiple code blocks in one article, such as: SQL query (SQL) Go sample code (GO) PHP code (PHP) Description text (Text) Usually, an article will contain about 10 code blocks in combination. This kind of content was very stable…
-
Post Views: 30 1. In the background of WordPress, when switching from the code to visualization, it cannot be switched, and the console reports an error: uncaught typeError: _.pluck is not a function. as shown in Figure 1 2. The description code uses _.pluck(), but the currently loaded version of the underscore.js has been removed. However, some old plugins, themes,…
-
Post Views: 15 1. HTML escape characters appear in SyntaxHighlighter 3.x of WordPress 4.9.8, and newline tags are automatically added, etc., as shown in Figure 1 2. The expected format should not appear HTML escape characters, as shown in Figure 2 3. For a long time, there were no HTML escape characters. I am not sure whether it was caused…