Tag Info

Hot answers tagged

9

The follow small plugin create a custom buttom inside line 1 of the WordPress TinyMCE Version 4, tested in WP Version 3.9-beta2. The plugin have var_dump include to understand the values. It also possible to add the button to other lines of the visual editor, only a other hook, like for line 2: mce_buttons_2. Result Plugin, php side - tinymce4-test.php ...


3

The text goes white when the id attribute ($editor_id) contains []. They are not allowed here. Make sure the second argument for wp_editor does not contain [], and the text becomes visible again. I have reported that regression with a test case on ticket #26778. To use brackets in the name attribute, use textarea_name in the settings parameter. Example ...


1

First, I believe your css should use only one colon: .mce_mybutton:before { content: '\f459'; } Now, in order to get the css to the proper place. First, we add an action to admin_print_styles; then we check to see if we are editing a post or page; then we enqueue our stylesheet. We run the check to see if we are editing, so that we don't enqueue our ...


1

I think you should first enable i tags.Then you should enable class id or span whatever you like.To do so add this code. function add_mce_markup( $initArray ) { $ext = 'i[id|name|class|style]'; if ( isset( $initArray['extended_valid_elements'] ) ) { $initArray['extended_valid_elements'] .= ',' . $ext; } else { ...



Only top voted, non community-wiki answers of a minimum length are eligible