How can I add the option to format to list in RichTextToolbarButton?
How can I add the option to format to list in RichTextToolbarButton?
How can I add the option to format to list in RichTextToolbarButton?
Setting colors in theme.json changes default font size and family in backend
Just use the add_editor_styles() function on the after_setup_theme() hook for your editor styles, and enqueue the same style sheet using wp_enqueue_style() on the wp_enqueue_scripts() hook. Optionally, you can also use wp_style_add_data() to inline the styles for better performance. There’s no need to manually add the .editor-styles-wrapper class before other selectors if you enqueue the style … Read more
How to add custom HTML attribute to reusable block div in WordPress admin
The Twenty Twenty-Three theme comes with an inbuilt “Editor” option that exists under the “Appearance” menu. Appearance >> Editor Once you click on the “Editor(beta)” option then you can select the header or footer area and after that, you can customize their stylings like Background Color, Text Color, and Link Color. The theme also provides … Read more
Gutenberg: How to enqueue scripts conditionally in render_callback by checking for an attribute?
Loading column block style seperately
After some digging I figured it out. We need to: grab the editor settings wrap the fetch link suggestions function in our own function in this wrapper, we call the original, then do some sorting by type, in this case I changed it from ascending to descending so that tags comes before post update the … Read more
I’ve done a lot of digging into the subject and looks like they were working on some updates to Gutenberg that would allow them to be saved onto the filesystem: youtu.be/8Vj_Oh6jMHw?t=281. But those efforts were later abandoned: github.com/WordPress/gutenberg/pull/40385, as adding that support into WordPress core was complicated. I then found this plugin that lets one … Read more
The get_the_ID() function will return the id of the current post in the loop. If your block is used on a single post page or in a post loop (archive page) you can use this.