WordPress plugin
Raw HTML Pro: Protect WordPress Code with Limited Gutenberg Support
Raw HTML Pro helps keep selected HTML, JavaScript, and CSS intact in WordPress posts and pages. Code wrapped in [raw]...[/raw] tags appears as a read-only placeholder in the Visual editor. The original code returns when you switch to Text/HTML mode and when the post is displayed to readers.
Protected code in Visual mode
Raw HTML Pro helps keep selected HTML, JavaScript, and CSS intact in WordPress posts and pages. Code wrapped in [raw]...[/raw] tags appears as a read-only placeholder in the Visual editor. The original code returns when you switch to Text/HTML mode and when the post is displayed to readers.
Raw blocks also prevent formatting changes such as turning newlines into paragraphs or straight quotation marks into typographic quotes. They protect selected content from image smilies and character conversion. An alternate raw-tag format works the same way and is not visible to visitors if Raw HTML is deactivated.
Per-post filter controls
Checkboxes on the Edit Post screen let you disable selected WordPress filters for an individual post. Options include wptexturize, which makes smart quotes and other typographic characters; automatic paragraph creation; image smilies; and convert_chars, which converts ampersands to HTML entities and adjusts some Unicode characters.
Some functions require the unfiltered_html capability. On a standard WordPress installation, Editors and Administrators have this capability. In Multisite, it is available by default only to the Super Admin.
Shortcodes and excerpts
Shortcodes inside raw blocks appear as plain text by default. To run them, add shortcodes=1 to the raw tag, as in [raw shortcodes=1]. Automatically generated excerpts omit raw blocks by default. To keep them in excerpts, add the RAW_HTML_KEEP_RAW_IN_EXCERPTS definition to wp-config.php.
Editor support and setup
Raw HTML does not fully support Gutenberg. Since WordPress 5.0, some features work only with the Classic Editor plugin. For posts containing custom code, edit in Text/HTML mode; use the Pro version when Visual editing is also needed.
Add Raw HTML Pro to WordPress and open a post or page in the available editor. Wrap code that should remain unchanged in raw tags, select any needed per-post filter options, and save. In Visual mode, the Pro version shows protected code as read-only placeholders.

