Uncaught ReferenceError:switchEditors is not defined

it might me entirely different solution that i am providing but it solved the problem for me. I followed these steps: Open the user that is getting error. (WordPress admin menu > users > your profile) Changed the setting of “Disable the visual editor when writing” and saved the settings Again disabled this feature and … Read more

Is there a way to add another row to the tinyMCE kitchen sink toggle?

Yes! Use the mce_buttons_2 filter to add buttons to the second row. Use the mce_buttons_3 filter to add buttons to the third row. Here’s an example of what I use: function mytheme_mce_buttons_row_3($buttons) { $buttons[] = ‘fontselect’; $buttons[] = ‘fontsizeselect’; $buttons[] = ‘code’; $buttons[] = ‘sup’; $buttons[] = ‘sub’; $buttons[] = ‘backcolor’; $buttons[] = ‘separator’; $buttons[] … Read more

Modify links when inserted by WYSIWYG editor

The HTML for the inserted internal links are generated by Javascript, so I’m not aware of any easy way to change it. The HTML generation is controlled from the wpLink.htmlUpdate method (HTML mode) and the wpLink.mceUpdate method (TinyMCE mode), in the /wp-includes/js/wplink.js file. Here are some ideas: Add a query parameter to the inserted links: … Read more

How to provide translations for a WordPress TinyMCE plugin?

Use the filter ‘mce_external_languages’. From wp-includes/class-wp-editor.php: The following filter loads external language files for TinyMCE plugins. It takes an associative array ‘plugin_name’ => ‘path’, where path is the include path to the file. The language file should follow the same format as /tinymce/langs/wp-langs.php and should define a variable $strings that holds all translated strings. When … Read more

How do i use fontawesome icons in TinyMce editor?

You wouldn’t be able to add a FontAwesome icon by passing it directly to the ed.addButton(); method unfortunately. You can try a workaround however. If you leave the image : url+’/youtube.png’ parameter out of the method then it will automatically create an empty <span> with the class of mceIcon & another class of mce_[plugin_name]. You … Read more

TinyMCE Advanced newline problem

Go into Settings -> TinyMCE Advanced, and check the option Stop removing the <p> and <br /> tags when saving and show them in the HTML editor. This will allow you full control over those tags inside the HTML view. For a single line break without overriding the editor, use Shift+Enter. To override the editor … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)