Raw HTML
Lets you use raw HTML or any other code in your posts. You can also disable smart quotes and other automatic formatting on a per-post basis.
The facts
- Rating
- 4.3★ from 33
- Active installs
- 10k+
- Price
- Free
- Last updated
- 11 Nov 2024
- Added
- Jan 2008
- Requires WP
- 2.8
- Tested up to
- WP 6.7.7
- Downloads
- 597,870
Our analysis
AI-assistedRaw HTML is a WordPress plugin that allows you to disable automatic formatting features in your posts, such as smart quotes and automatic paragraph creation. By using [raw]...[/raw] tags, you can insert raw HTML, JavaScript, or CSS code without WordPress altering it. This is particularly useful for developers or users who need to include custom code in their content.
The plugin adds options to the 'Edit Post' screen for disabling specific WordPress filters on a per-post basis. However, it is important to note that the free version only supports editing in the Text tab, and compatibility with the Gutenberg editor is limited, requiring the Classic Editor plugin for full functionality.
Best for: This plugin is suited for developers or users who need to insert custom code into their WordPress posts.
What it does well
- ✓Disables automatic formatting like smart quotes
- ✓Allows raw HTML/JS/CSS code insertion
- ✓Provides per-post filter control
- ✓Useful for developers needing custom code
- ✓Free to use from the WordPress.org directory
Where it falls short
- •Limited support for the Gutenberg editor
- •Only works in the Text/HTML editor in the free version
- •Shortcodes inside [raw] tags do not work by default
Verdict
Raw HTML is a practical tool for those who require control over WordPress formatting and need to include raw code. Its limitations in the Gutenberg editor may affect some users.
From the developer
Janis Elsts's own description of Raw HTML, lightly tidied.
Lets you disable automatic formatting like smart quotes and automatic paragraph creation, and use raw HTML/JS/CSS code in your posts without WordPress messing it up.
Features
With this plugin, you can wrap any part of your post in [raw]…[/raw] tags to prevent WordPress from converting newlines to HTML paragraphs, replacing apostrophes with typographic quotes and so on. This is very useful if you need to add a CSS block or JavaScript to your post.
RawHTML will also add new checkboxes to the “Edit Post” screen that let you disable certain WP filters on a per-post basis. This way you can:
- Disable wptexturize (the function that creates smart quotes and other typographic characters).
- Disable automatic paragraph creation.
- Disable image smilies.
- Disable convert_chars (the function that converts ampersands to HTML entities and “fixes” some Unicode characters).
The free version only supports editing posts in the Text tab (called “HTML” in older WordPress versions). Get the Pro version if you want to be able to switch between Text and the Visual editor without WordPress messing up your content.
Compatibility
This plugin doesn’t fully support the Gutenberg editor. As of WordPress 5.0, some Raw HTML features will only work if you use the Classic Editor plugin.
Usage
To prevent a part of your post or page from being filtered by WordPress, switch to the Text/HTML editor and wrap it in [raw]...[/raw] or <!--raw-->...<!--/raw--> tags. These two versions work exactly the same, except that the latter won’t be visible to your visitors even if you deactivate Raw HTML.
Example :
[raw]
This
is
a "test"!
[/raw]
In this case, the tags will prevent WordPress from inserting paragraph breaks between “This”, “is” and “a “test””, as well as ensure that the double quotes arround “test” are not converted to typographic (curly) quotes.
To avoid problems, only edit posts that contain your custom code in Text/HTML mode. If you’d like to be able to also use the Visual editor, get the Pro version. It will make the code betwen [raw] tags appear as a read-only placeholder when viewed in Visual mode, ensuring WordPress doesn’t change it.
Combining shortcodes
By default, shortcodes that are inside [raw] tags will not work. They will just show up as plain text. To enable shortcodes, add the shortcodes=1 attribute to the tag: