Articles of wp editor

How avoid WP editor to change <br/> by &nbsp;

Ok this is an old question and i may receive classical answers : use soft key I can’t, i also use JIG and it makes the soft key invalid when i use it to make the text slightly downard to feet with my image. Wich is precisly why i need to use br as it […]

Output richtext metabox value

I have rich text metabox.When I echo the out put it shows html tags.If I write <h1>Hi</h1> in editor metabox it ouput the same.My works so far <?php $valueeee2= get_post_meta($_GET[‘post’], ‘SMTH_METANAME_VALUE’ , true ) ; wp_editor( htmlspecialchars_decode($valueeee2), ‘mettaabox_ID_stylee’, $settings = array(‘textarea_name’=>’MyInputNAME’,) ); ?> To display $content=get_post_meta($post->ID, ‘SMTH_METANAME_VALUE’, true); echo $content;

Set Link Target Checkbox chcked on Edit Image MOdal Window in Admin Post Edit Screen?

Inside of newer versions of WordPress in the Visual Editor when you add a photo, you can then click on it which reveals an Edit, Delete, and Resize buttons. Now if you click on the Edit button shown in the image above. It will insert a Modal window into the DOM which has more settings […]

WP_Editor not saving data in user_meta

I have a front-end plugin which allows users to modify the fields (user_meta) of their profile, and everything works except the wp_editor. <div class=””> <label class=”” for=”dokan-store-about”><?php _e( ‘About Us’, ‘dokan’ ); ?></label> <div class=”dokan-text-left”> <?php $content = get_user_meta($current_user->ID, ‘wpcf-store-about’, true); $editor_id = ‘dokan-store-about’; wp_editor( $content, $editor_id, array(‘textarea_name’ => ‘dokan-store-about’) ); ?> <textarea name=”hey”><?php echo […]

Injecting pre-defined text from custom page template to editor

I am creating a custom page template: < ?php /* * Template Name: sliding content * Description: Sliding category contents */ get_header(); ?> <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <?php while ( have_posts() ) : the_post(); ?> <div class=”post”> <h2 id=”post-<?php the_ID(); ?>”><?php the_title();?></h2> <div id=”accordion”> <?php the_content();?> </div> </div> <?php endwhile; // end […]

How to make shortcode which returns HTML?

I need to make a shortcode button to TinyMCE editor which, in the moment i click it fills up the content part with HTML. When i click on button i need something like: <div> … </div> And not: [div] … [/div] I made my shortcodes work but i need this too. Any help?

remove/hide wp-editor

I have created a meta-box for a certain page_template. So if the adminpage is loaded with the template it shows the metabox. This does not require the wp-editor to add content. So I would like to hide or disable it. I have searched the interwebs but they all came up with the disablement of the […]

How to use wordpress text editor in php page

I read this article: Use WordPress Text Editor in non-wp page and found out no solution. Currently i want to embedded a wp text editor to a php page. I tried tinymce but the text editor does not look like the wp text editor (totally different especially missing text and visual tab). Is there anyway […]

Showing Categories for Page Edit – without plugin

I am building a theme without any extra plugins. Does anyone know the code needed to show the Categories in page Edit – without using a plugin?

how to get wp_editor to save data in plugin admin page

I’m trying to use plugin settings api to add wp_editor, but the text is not saving. // add the admin settings and such add_action(‘admin_init’, ‘my_plugin_admin_init’); function my_plugin_admin_init(){ register_setting( ‘my_plugin_settings’, ‘my_plugin_settings’, ‘my_plugin_settings_validate’); add_settings_field(‘my_plugin_user_custom_text’, __(‘Enter your message’,’WP-Shabbat’), ‘my_plugin_user_custom_text’, ‘my_plugin’, ‘my_plugin_main’); function my_plugin_user_custom_text() { $options = get_option(‘my_plugin_settings’); $settings = array(‘media_buttons’ => false,’textarea_rows’ => 5,’textarea_name’ => ‘user_cutom _text_msg’); wp_editor( […]