How can I determine what mode the editor is in and when it changes?

To determine what mode the editor is currently in, you can use the getUserSetting(‘editor’) in JavaScript, which returns either “html” or “tinymce”. To determine when the editor mode is switched, you can use the jQuery click event handler on the #content-tmce and #content-html elements, which are the editor type switching buttons: jQuery( ‘#content-tmce’ ).click( function() … Read more

How to reset display of WYSIWYG editor

Looks like the Theme you are using adds style to the editor using add_editor_style(). Check for that code in theme files and just comment it out by adding a // so that it looks like //add_editor_style( … );. Alternatively, you can look for a file named editor-style.css in theme’s root directory and rename it to … Read more

Convert this textarea to rich html format via wp_editor

You basically have two options, using PHP or Javascript. With PHP you would use the wp_editor function to output the textarea for you, and with Javascript you would convert the existing textarea with wp.editor.initialize. Note there are slightly different settings available for each approach. PHP wp_editor function in Codex $id = ‘yith_vendor_biografia’; $content = esc_textarea( … Read more

WMP Plugin not showing up in the plugin panel?

Must be something you have installed or custom code causing the issue, it appears just fine for me. If your question was actually why there’s no additional menu item on the admin side then the answer would be because not every plugin has an admin page, some provide configuration options, others just do something with … Read more

How to ensure the visual editor doesn’t ruin my iframe?

add_shortcode(‘custom_iframe_shortcode’, ‘build_iframe’); function build_iframe($atts) { $defaults = array( ‘source’ => ‘https://example.com/calc.php?tp=dif&cl=beleggen&h=1&wf=19370&country=NL’, ‘script_source’ => ‘//example.com/iframeResizeMe.min.js.gz’ ); $args = shortcode_atts($defaults, $atts); ob_start(); ?> <iframe onload=”fa_iframeresize.do(this);” src=”https://wordpress.stackexchange.com/questions/314518/<?php echo $args[“source’]; ?>” scrolling=”no” width=”100%” style=”padding:0px;margin:0px;border-width:0px;” frameborder=”0″> </iframe> <script type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/314518/<?php echo $args[“script_source’]; ?>”></script> <?php return ob_get_clean(); } then call this like [build_iframe] or [build_iframe source=”https://blah” script_source=”https://blah/blah.js’]

Is there a way to disable formatting shortcuts in 4.3?

Yes, there is very well a way to disable these formatting shortcuts. You can do so by using this simple little piece of PHP code. <?php function disable_mce_wptextpattern( $opt ) { if ( isset( $opt[‘plugins’] ) && $opt[‘plugins’] ) { $opt[‘plugins’] = explode( ‘,’, $opt[‘plugins’] ); $opt[‘plugins’] = array_diff( $opt[‘plugins’] , array( ‘wptextpattern’ ) ); … Read more

Visual Editor Background

You can either create a plugin or a child theme. Since the black background on your site is most likely coming from a theme, a child theme seems like a good fit here – so if you ever changed your theme, the black background in the Editor would also go away. To create a child … Read more

Working With Visual Composer VC_Single_Image

It’s not easy to trace trough the code behind [vc_single_image], because for start it uses the extract, that’s not recommended in WordPress or PHP in general. The image attribute value is stripped for non-integers into the $img_id variable. With your setup, there’s a call to wpb_getImageBySize( array( ‘attach_id’ => $img_id, … ), that seems to … Read more

How To Hide The Visual And Html Editor Completely?

For posts: add_action(‘init’, ‘my_custom_init’); function my_custom_init() { remove_post_type_support( ‘post’, ‘editor’ ); } See Codex. For custom post types that you register, you can specify what ‘features’ it supports when you register it it use the ‘supports’ arguments. For custom post types that are not registered by you can use the above with ‘post’ replaced by … Read more