Passing RichText attributes to function onChange

I have four RichText elements in a custom Gutenberg block I am developing, and they are all very similar except for the “name” attribute, which is currently hard-coded. What I need to do is pass in the value of the change, and the value of the name attribute to a function before using SetAttribute. Is … Read more

TinyMCE Plugin Parameter

Can anyone tell me if there is anywhere I can find out what each of these TinyMCE plugins are for? $in[‘plugins’]=’inlinepopups,tabfocus,paste,media,fullscreen,wordpress,wpeditimage,wpgallery,wplink,wpdialogs,wpfullscreen’; I’m wondering because if I remove the wordpress one that the editor will stop stripping out my <p> tags, but I also lose all my spacing in the html view of the editor as … Read more

WP_Editor – Setting render location on page

I’m trying to include wp_editor in a settings page. public function addEditor($content=””) { $editor_id = ‘createposteditor’; $args = array( ‘textarea_rows’ => 15, ‘teeny’ => true, ‘quicktags’ => false, ‘editor_class’ => ‘createpost-editor’ ); return wp_editor( $content, $editor_id, $args ); } and then I echo it out on the settings page: <tr> <td align=”left” scope=”row”> <h1>Add content … Read more

all tincymce’s switch when updating page after changing from html to text in custom metabox

I have a custom metabox which uses wp_editor and when i switch to text editor instead of visual the main content tinymce also changes to text view when i update. I was wondering am i doing something wrong or is that normal behavoir for wordpress when creating a custom metabox and wp_editor? the code i … Read more

Backslashes being stripped from CSS

The title explains my problem. Upon saving CSS stylesheet in the “Appearance > Editor”, single backslashes are being stripped out of the stylesheet. For example: content=”\foo” becomes: content=”foo” I cannot find any solution to this on the web. Is there a way around this? 1 Answer 1 Add a second backslash e.g. content=”\\foo”

How can I stop a function from encoding an entity?

I’m using the code below in my functions.php to pre-populate new posts. It works fine, except if I use entities (example: &raquo;), which are converted (example: ») when I open the edit page for a new post. I prefer to keep them unconverted. add_filter( ‘default_content’, ‘pu_default_editor_content’ ); function pu_default_editor_content( $content ) { global $post_type; switch( … Read more