HTMLBlocks
Capture sections of HTML document into Wordpress Blocks so that HTML template can be filled with Wordpress content.
★ 0stars
1.2kcomposer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/ergosarapu/wp-htmlblocks/archive/refs/heads/master.zipAlso on Packagist as ergosarapu/wp-htmlblocks:
composer require ergosarapu/wp-htmlblocksFrom the readme
WP HtmlBlocks plugin
Capture sections of HTML document into Wordpress Blocks so that HTML template can be filled with Wordpress content. Well-suited for composing HTML template based newsletters quickly and regularly.
Install using Composer
The plugin uses Carbon Fields composer dependency. Carbon Fields library contains JS/CSS assets, which are requested by wp-admin but not found due to the default vendor directory not being a web directory.
A workaround is to install Carbon Fields library to web directory by changing installer-paths for "htmlburger/carbon-fields", change your composer.json accordingly:
Then require WP HtmlBlocks plugin using Composer:
Configuration
Configuration is currently loaded when environment variable HTMLBLOCKSCONFIG is set to a valid YAML configuration file. For multiple configurations separate paths using PATHSEPARATOR, e.g.
/path/to/config1.yml;/path/to/config2.yml on Windows;
/path/to/config1.yml:/path/to/config2.yml otherwise;
Configuration errors are logged to errorlog, in case blocks do not appear in WP post editor, seek culprit from logs.
Example
HTML:
YAML configuration:
Result blocks in WP admin:
Rendered HTML result:
Note! The f
Read the full README on GitHub →