Gutenberg – as in the WordPress editor, has been named after Johannes Gutenberg, the inventor of a mechanical movable-type printing press. Fast-forward 580 years and we now have a Gutenberg WordPress editor that somewhat resembles this format – albeit as movable components (or blocks) of content.
This editor is certainly getting mixed reviews down at WordPress.org and although we do feel it is a step in the right direction, the impression we get is that it is not considering those developers and designers that do know their way around HTML and CSS. It is those folks that can quickly and easily create blog posts with images and URLs via HTML, who have streamlined their workflow in their own way that seems to be sidelined.
Anyway, we believe we can accommodate those developers and designers that work so hard for their clients or their own sites with a new feature for Easy Code Manager. This new feature that is in the development pipeline, which we are calling ECM Direct Inject will allow you to utilise Easy Code Manager code blocks as the editor and with a click of the button, inject this straight into your chosen Page, Post, or Custom Post.
We also plan to release this new feature in Easy Code Manager Free on WordPress.org
How will this work?
The idea is to have a new Direct Inject toolbar button, similar to the On/Off or Header/Footer button. When it is pressed, it looks to see if any selections are ticked in Pages, Posts, or Custom Posts in the Assignment Panel. These are the only three that it checks, and we won’t worry about checking for URLs. It then copies the current content from that Page, Post, or Custom Post database record and paste it straight into the Easy Code Manager code block for editing. So long as this Direct Inject button is toggled on, the user can make changes to the code block content, and then clicking Save or Save All will overwrite that content back into the relative Page, Post, or Custom Post database record.
Things to note
- If a new code block is created and there isn’t any selections already ticked (e.g. in Pages, Posts, or Custom Posts in the Assignment Panel), then pressing the Direct Inject button will either copy nothing into the code block or not query the Page/Post database at all.
- If the Direct Inject button is pressed and it detects more than one Page, Post, or Custom Post selection in the Assignment Panel, then a popup alert will be displayed with a message asking you to choose only one. We could have an exception to this rule of sending one code block’s content to multiple Pages, Posts, or Custom Posts, but this needs further investigation.