WordPress Editor without buttons
I fixed it by adding the following script after making the Ajax call: tinymce.execCommand(‘mceRemoveEditor’, false, ‘customEditor’); tinymce.execCommand(‘mceAddEditor’, false, ‘customEditor’);
I fixed it by adding the following script after making the Ajax call: tinymce.execCommand(‘mceRemoveEditor’, false, ‘customEditor’); tinymce.execCommand(‘mceAddEditor’, false, ‘customEditor’);
The WordPress OEmbed should show in the editor by default. If it doesn’t, I suspect that you need to enqueue some scripts and styles on your page where you are using wp_editor. Eg: wp_enqueue_script(‘editor’, false, false, false, true); wp_enqueue_script(‘quicktags’, false, false, false, true); wp_enqueue_script(‘wplink’, false, false, false, true); wp_enqueue_script(‘wpdialogs-popup’, false, false, false, true); wp_enqueue_style(‘wp-jquery-ui-dialog’, false, … Read more
automatically apply clear formating when pasting text on editor
“Formats” Select Menu in WP Editor doesn’t show up with correct colour
So after researching some wordpress filters i found the teeny_mce_buttons and removed the distraction free button with this function. function remove_teeny_mce_btns($buttons) { unset($buttons[13]); return $buttons; } add_filter(‘teeny_mce_buttons’, ‘remove_teeny_mce_btns’); Here is the link with the solution: https://www.gavick.com/blog/wordpress-tinymce-custom-buttons
I don’t think clearing cache will solve the problem for your users, because it’s not the server cache but their browsers cache. Ask them to use Ctrl + F5 and it will help to access non-cached version of your website.
WP adds the inputs automatically. I forgot that I added the inputs for the taxonomies also with AFC. So I just had to remove them from my custom fields.
Fixed it! Although I still don’t know why I have to now enqueue the specific stylesheet when I didn’t before. If anyone knows why I’d definitely appreciate it. But for now, my answer: I had previously added in this code which was a bad idea. For some reason I didn’t those specific icons were being … Read more
Event delegation is your friend! This way the element doesn’t have to exist when the code runs to have the function bound to it. jQuery(‘body’).on(‘click’, ‘ul.CodeMirror-hints li’, function(e) { e.preventDefault(); }); replace click with mousedown if you need to
the_content filter can be used to filter the content after it is retrieved from the database and before it is printed to the screen. The Core filters on the_content are: add_filter( ‘the_content’, ‘wptexturize’ ); add_filter( ‘the_content’, ‘convert_smilies’ ); add_filter( ‘the_content’, ‘convert_chars’ ); add_filter( ‘the_content’, ‘wpautop’ ); add_filter( ‘the_content’, ‘shortcode_unautop’ ); add_filter( ‘the_content’, ‘prepend_attachment’ ); Reference … Read more