Add class to all links created by tinyMCE
So I ended up doing a jQuery fix rather than going through tinyMCE. Code as follows: jQuery(document).ready(function(){ $(“#content a”).addClass(“link_color”); });
So I ended up doing a jQuery fix rather than going through tinyMCE. Code as follows: jQuery(document).ready(function(){ $(“#content a”).addClass(“link_color”); });
You’re looking for add_editor_style(). Just drop that in your functions.php file and then put an editor-style.css file in your theme with whatever styles you want.
I used the send_to_editor method in JavaScript. The end result ended up looking like this: window.send_to_editor = function(html) { // logic to save via AJAX goes here. }
You can use the StackOverflow Editor for Comments, using the WP Markdown Plugin. If you want another one, try TinyMCEComments or something like that. Didn’t test this Plugin – but should work fine.
You have to encode the string you store in UTF-8 or whatever the site is using as encoding. If you don’t store valid UTF-8 you get the famous diamonds. In websites, these are not girls best friends, they just break your output. 🙂 See this answer for some code to encode text as UTF-8 in … Read more
Figured it out. After the first editor has loaded on a page, even if you modify the tinymce settings in the array passed to wp_editor(), those settings are NOT passed along to the tinymce instance that is created when the page is first loaded. Instead you have to use javascript to modify the tinymce instance … Read more
I figured it out. The window which was opened had to call the tinyMCEPopup.close() in its own scope. Which also meant I had to include the tiny_mce_popup.js script as well.
I suggest you to use htmlspecialchars() before sending content andhtmlspecialchars_decode() before showing content on page, here is functions that you need to copy/paste to your functions.php : function wp_po9568($content) { return htmlspecialchars($content); } add_filter(‘content_save_pre’,’wp_po9568′); And: function wp_po5689($content) { return htmlspecialchars_decode($content); } add_filter( ‘the_content’,’wp_po5689′); WordPress by default comments out php tags.
There are multiple options: Use a real table: <table><tr><td> and so on. Use pre-formatted text: <pre>text</pre> Switch to the HTML editor and enter HTML entities or numerical references for preserved white-space:  
Use wp_editor(). There are many configuration options; you have to read the source to get all of them. Example: $editor_settings = array ( ‘textarea_rows’ => 15, ‘media_buttons’ => FALSE, ‘teeny’ => TRUE, ‘tinymce’ => TRUE, ‘dfw’ => FALSE, ); $content = $get_option( ‘your_option_name’ ); wp_editor( $content, ‘your_editor_id’, $editor_settings );