TinyMCE – TypeError: r is undefined

With the latest pgrade of wordpress tinyMCE was upgraded. This resulted in my custom plugin being rendered useless with deprecated calls. I was able correctly format the event handling and now I am seeing the issue: TypeError: r is undefined Can anyone explain what ‘r’ is? Any way to further debug tinyMCE? (function($) { tinymce.create(‘tinymce.plugins.editor_toolkit’, … Read more

How to make WordPress and TinyMCE accept tags wrapping block-level elements as allowed in HTML5?

[*] Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. <div> <a href=”http://somewhere/”> <h4>Some heading</h4> <img src=”http://somewhere/some-img.jpg” alt=”Some image” /> </a> </div> While I can enter this in the text editor … Read more

TinyMCE – Add button that changes direction of selected text

Ok, I am going to create website in Urdu(rtl) & English(ltr) language that contain paragraphs like this: <p style=”direction:rtl”>کیا حال ہے buddy? سب خیریت ہے؟</p> You can see that sentence in not showing correctly. I want to change the direction of English words in sentense. like this: <p style=”direction:rtl”>کیا حال ہے <bdo dir=”ltr”>buddy?</bdo> سب خیریت … Read more

How to make float element in tinymce

I would know how its possible to add a float:left or float:right in tinymce ? I know how to do this for a picture but what is the best solutions for all elements ? 1 Answer 1 You could add custom quick tags (for the text editor) easily as follows function wpse182089_add_float_quicktags() { if (wp_script_is(‘quicktags’)){ … Read more

Added custom styles to Visual Editor. Classes are appended and not replaced as intended

Followed several tutorials and have added custom classes in the formats section of the visual editor. The classes used are being appended and not replaced as I had intended. Is there a way to have them overwrite the existing style if there is one instead of adding to the class tag? My use case is … Read more