AI Block Editor – Add and Edit Gutenberg Blocks with an AI Assistant
AI Block Editor adds a Gutenberg blocks assistant inside the WordPress editor. Describe what you want to add or change, and AI Editor will place, arrange, and update WordPress blocks directly in the editor. Use it for complex block layouts or simple edits. It supports the latest OpenAI models and lets you use your own API key. When your theme uses theme.json, AI Editor can follow your global styles, presets, and design tokens like colors, typography, spacing, and layout so generated blocks match your site’s design system. Features Natural language block creation: Describe your desired content in plain language and the AI will handle the rest. Core Gutenberg blocks: AI Editor can use core Gutenberg blocks to create complete page sections and complex layouts, not just add single blocks one at a time. Selected block editing: Select one or more blocks in Gutenberg and ask AI Editor to update the selected content or layout. Custom block editing: Custom and third-party blocks can be edited after you add and select them. AI Editor uses the markup it can see for the selected block, so review the result because custom blocks may have private fields, dynamic rendering, or plugin-specific rules the AI cannot fully infer. Existing content lookup (WordPress 6.9+): AI Editor can look up existing WordPress posts, pages, and public custom post types for context, then use that text while helping you create or edit content. Theme-aware output: For themes that use theme.json, AI Editor can use your theme’s presets and editor settings to keep generated layouts consistent with your site’s colors, spacing, typography, and other design styles. Abilities API support: On WordPress 6.9+, connect custom WordPress Abilities API features to AI Editor so it can use site-specific data or actions while helping in the editor. Resizable sidebar: Drag the left edge of the AI Editor sidebar to make the chat panel wider. GPT model selection: Choose from the GPT models supported by AI Editor and available to your OpenAI account. Reasoning effort controls: Choose how much reasoning the model should use for faster simple edits or more careful complex layout work. Conversation context controls: Limit how many recent chat messages are sent with each request. Prompt caching: AI Editor keeps repeated system instructions stable so OpenAI prompt caching can reuse shared context when available, helping monitor API usage and reduce repeated input processing. Theme compatibility check: Review whether the active theme is a good fit for AI Editor’s Gutenberg and theme style workflow. BYOK: Use your own OpenAI API key. Language translation: Multilingual support. Prompt Examples “Add this article as a magazine-style layout using blocks: (paste article here).” “Create a layout for an About Us page, including sections for a mission statement, team members, and contact.” “Add 3 columns, each with a pricing plan.” “Create a table comparing the caffeine content of popular drinks.” “Rewrite this testimonial block to sound more concise.” “Update the selected columns for better balance.” Getting The Best Results Quickly add content blocks: Ask AI Editor to add headings, sections, buttons, lists, tables, columns, and other core blocks for your content. Turn full copy into blocks: Paste a full page draft or section copy and let AI Editor structure it into blocks. Use existing site content: Ask AI Editor to work from existing posts, pages, or custom post types when the request needs site context. With lower models or no reasoning, be explicit, such as “use the current page content as context” or “find posts about pricing and add a summary section.” Choose settings for the task: Select an available model and adjust reasoning effort based on the complexity of the requested layout or edit. Select the right amount of content: If the change depends on a parent layout, columns, group spacing, or surrounding section structure, select the whole relevant block or section and say what you want changed. Use narrow selections for simple edits: If you only need a specific text, button, heading, or single block changed, select just that block and give a direct instruction. Settings Navigate to Settings -> AI Editor to configure the plugin. OpenAI API Key: Add your own OpenAI API key. Requests are sent from your WordPress site to OpenAI. GPT Model: GPT-6 Astra is recommended and is the default for new settings. GPT-5.6 Sol, Terra, Luna, GPT-5.5, GPT-5.4, and GPT-5.4 mini are also available. Reasoning Effort: Choose none, low, medium, or high. GPT-6 Astra uses low when none is selected. Lower values are faster for simple edits; higher values can help with larger layouts or more careful restructuring but may take longer and use more tokens. Theme Style Context For AI: A short style note used as design direction. AI Editor can rewrite the active theme description with AI. Raw theme presets are handled separately, so this field should stay short and human-readable. Limit Conversation Context Sent To OpenAI: Turn on/off trimming of older chat messages before sending a new request. Max Messages In Conversation Context: Set how many recent messages are kept when conversation context trimming is enabled. The default is 50. Theme Compatibility For AI Editor: Run a compatibility check for the active theme. It reviews Gutenberg support, block theme signals, editor style support, and available theme presets so you can spot where manual cleanup may be needed. Note: AI Editor is powered by OpenAI’s GPT technology. For more information on the data handling and privacy aspects, please refer to OpenAI’s Privacy Policy and Terms of Service. Connect Custom Abilities On WordPress 6.9+, developers can connect custom abilities registered with the WordPress Abilities API to AI Editor. If your plugin or theme registers a custom ability, add an AI Editor config to the ability meta. Example: 'meta' => array( 'ai_editor' => array( 'action_name' => 'get_product_details', 'description' => 'Use this when the user asks for current product details from WooCommerce.', ), ) AI Editor will only use abilities that explicitly opt in. Keep ability results focused and avoid returning large private datasets or unrelated site data. Requirements PHP 7.0+ is recommended, WordPress 5.8+, with Gutenberg active. An OpenAI API key is required.
Preserved HTML Editor Markup
This plugin preserves the user-generated HTML markup in the TinyMCE editor. Unlike other plugins this one allows developers to work in the HTML tab AND end-users to work in the WYSIWYG Visual tab at the same time! No longer will your HTML markup be completely munged into an unrecognizable form when you switch between those tabs. And you don’t have to hang your users/editors out to dry when you hand off the project with a disabled Visual tab. IMPORTANT: Please read the installation instructions carefully. If you have existing content it will not render properly after activating this plugin until you use the Fix It Tools. (One user didn’t read or follow these steps and panicked thinking I ruined their website.) It also supports HTML5 Block Anchor tags in addition to other HTML5 elements, something that is currently not supported in WordPress via any existing plugins. Version 1.5 will probably be the last version I release for a while since my daughter will be born soon. I’ve added support for full JavaScript code blocks in the HTML tab. They are compatible and preserved when switching to Visual mode. This rounds out the support for almost complete html preservation, with full use of the WYSIWYG editor. And you don’t need to wrap comment codes around it per the recommendations located here: https://codex.wordpress.org/Using_Javascript but you can leave them in if you want. Version 1.4 was just a minor patch release. User @denl noticed a problem with the plugin CataBlog which implements its own administrative management features by disabling the ‘show_ui’ flag for its custom post type. I was ignoring any custom post type that didn’t have a GUI, but it was an unecessary filter that probably limited other plugins. This fix allows any post type that supports the TinyMCE editor to be “fixed” using the tools under Admin > Settings > Writing. Since version 1.3 you can now use inline CSS and JavaScript in the HTML editor and everything should be preserved. To be clear, this applies to tags only, like onclick events and style definitions – not script blocks themselves. To enable this feature you must disable the wptexturize and convert_chars filters by adding the following code to your theme’s functions.php: remove_filter("the_content", "wptexturize"); remove_filter("the_content", "convert_chars"); This new feature is pretty experimental at the moment. I tried to make it compatible with wptexturize but that proved close to impossible without duplicating a lot of core code in my plugin. It’s also not compatible with TinyMCE Advanced when the “stop removing p and br tags” setting is enabled. I’ve tested it on a variety of code samples and I’m pleased with the results but if you find any content that isn’t preserved just open a support ticket and I should be able to fix it. Since version 1.2, you now have a little more control over how content is created. And most of the previous caveats to using this plugin are now resolved. You can now choose whether to use BR tags OR P tags for newlines. Even better you can use both, where one return key press injects a BR tag, and two return key presses will wrap a Paragraph tag. This is great for being able to wrap headers at specific break points all while enjoying the semantic perks of paragraphs. In addition to choosing what type of tags to use, you can also change the behavior depending on the type of post, including custom post types. So Pages can default to BR tags, and Blog Posts can default to Paragraph tags. If you have existing content that was created before activating this plugin, you can now use the Fixit feature to convert your existing content in a way that makes it render the same as before. Only use this feature (located under Admin > Settings > Writing: Fixing Existing Content) if you are installing this plugin for the first time, otherwise it will remove all of the formatted white space in your posts. Multi-line HTML comments are now supported (Thanks to @cwlee_klagroup for suggesting the working fix!) The Format drop down in the TinyMCE editor had a bug which is now fixed. It will now select “Format” if you place the cursor on a section of bare text. Currently the editor just leaves the previously selected format option in place. It’s minor but it’s good to know when you have bare text in your content. There was a fairly problematic bug in the old version where in some browsers you couldn’t change the formatting of a single line in the Visual editor if you started from scratch. Choosing a different Format option would change the entire document, with the only work around being to edit the document in HTML mode. That was bad, and somehow went unnoticed for far too long. Anyway, that is fixed now. The caveats that still remains are: With script blocks added to your HTML markup, the right arrow key does not pass over them in the Visual Tab. You can down arrow over them however so this will likely never be addressed. If you use the Paragraph tag setting for newlines there is a minor bug where it will only wrap your content in Paragraph tags if you specify Paragraph in the Format drop down or if you enter more than one paragraph of text. So if you just type one sentence and click save it will not wrap the content in Paragraph tags. I tried to fix this but ran out of my allotted time working on other core issues. Should be fixed in the next release. For performance reasons, it will only preserve spaces if 4 spaces are used consecutively – i.e. an expanded tab in developer terms. It will not preserve intra-tag white space like . If you do add 4 or more spaces inside of an element tag it will corrupt the markup and mangle the output. But as this is intended for developer edits, this should be an extreme rarity given the habit is virtually non-existent in development communities. PRE tags are not affected and behave as you would expect, however due to how browsers parse tags, the first newline in the content of a PRE tag will be wiped out unless it is padded with either another new line or multiple spaces. CODE tags are not preserving white space at all, and when wrapped with PRE tags white space is still removed. I’m working to resolve this problem. Arbitrary section