Add new MCE button for toggle specific cell background color

I have found a great tutorial about making a custom button to the tinymce. http://qnimate.com/adding-buttons-to-wordpress-visual-editor/ You can just follow this guide and copy all of it. Don’t forget to activate your new plugin in the plugin menu (in admin panel). Then you can just change the code inside index.js and especially in the ed.addCommand(“green_command”, function() … Read more

Is there an alternative way to upload html without using TinyMCE?

WordPress does a handful of HTML clean-up tasks when you submit your post. Here are a few: “Texturize” the special characters Automatic paragraphs – for carriage returns Emoticons Special characters (like “&” and “<“) Removing script tags and other “unsafe” stuff You will want to investigate the Raw HTML plug-in which has some great provisions … Read more

Tinymce broken after update

There shouldn’t be a pt.js file in that directory. There wasn’t in 3.3.2 nor in 3.4. There’s several possible issues that could be taking place, but my guess is that your WordPress install has been compromised and your theme files are corrupted. They are then trying to access that js file which is no longer … Read more

wp_editor() in content that was loaded with ajax [duplicate]

Solution: Add wp_editor() in somewhere that works perfectly and hide it. <div class=”hidden-editor-container” style=”display:none;”> <?php wp_editor( ”, ‘editor’ ); ?> </div> after that assign editor contents to the global JS variable. EDITOR = $(‘.hidden-editor-container’).contents(); Finally when the ajax page is loaded append editor contents $(‘.editor’).append( EDITOR ); tinymce.execCommand( ‘mceRemoveEditor’, false, ‘editor’ ); tinymce.execCommand( ‘mceAddEditor’, false, … Read more

Replace TinyMCE with Custom Built Editor

You can do that with js/jquery if you want : $(‘#postdivrich’).hide().after(your custom editor div); You can add inputs with jquery and save them with : add_action(‘save_post’, ‘save_the_post’); function save_the_post(){ global $post; update_post_meta($post->ID, ‘field_name’, $_POST[‘field_name’]); } Or use a metabox and replace standard editor with it (width jquery). Hope this help someone 🙂

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