Questions tagged [wp-editor]

WP Editor refers to the visual WYSIWYG editor of Wordpress.

The WP Editor refers to the visual WYSIWYG editor of Wordpress. Usually, this is TinyMCE, which allows you to manage the content of a certain page or post by easily modifying, creating and managing the content HTML elements in a way similar to most visual editors.

There is also a built in function with the same name - wp_editor(), which can display a custom WYSIWYG editor with certain parameters.

65 questions
12
votes
2 answers

WP Editor - wp_editor() is not showing properly on ajax call

I'm creating a WordPress plugin. It has a functionality to show the editor when adding a product through AJAX but the the editor is not showing properly. User can add as many products as he want so keep in mind that there will be more than one…
Omer
  • 1,571
  • 2
  • 24
  • 41
11
votes
3 answers

How to disable Gutenberg / block editor for certain post types?

WordPress added Gutenberg / block editor in its 5th version and it's enabled by default for Post and Page post types. It might be enabled by default for all custom post types in close future so as a WordPress developer I want to know how to disable…
Hossein
  • 1,866
  • 3
  • 19
  • 35
9
votes
4 answers

How to load wp_editor using Jquery?

I want to add WordPress editor dynamically using jquery in my custom plugin as follow: $('#container').append(''); I am getting…
shashank
  • 91
  • 4
7
votes
1 answer

How to add custom attribute to Wordpress wp_editor text-area ?

How to add custom attributes to Wordpress wp_editor textarea field ? In Official documentation there is no way to do this. I need to add client side validation attribute (data-bvalidator="required") to text-area which is generated by wp_editor…
Kapil Yadav
  • 628
  • 1
  • 5
  • 27
5
votes
1 answer

Wordpress wp.media Featured Image ID

How can I hook into an existing wp.media object and grab the attachment ID when the "Set Featured Image" button is clicked? The wp.media tutorials I've been looking at all seem to start by creating a new wp.media frame, but I just want to listen for…
HWD
  • 1,887
  • 7
  • 30
  • 60
4
votes
2 answers

WordPress wp_editor removes html tags - how to stop it?

Why does wp_editor remove all my html tags? This is my code: /** * Outputs the content of the meta box. */ function prfx_meta_callback( $post ) { // echo 'This is a meta box'; wp_nonce_field( basename( __FILE__ ), 'prfx_nonce' ); …
laukok
  • 47,545
  • 146
  • 388
  • 689
3
votes
0 answers

How to handle wp_editor with out echoing

I would like to know how to pass the wp_editor into variables with out directly echoing. Right now am using function fed_get_wp_editor( $content = '', $id, array $options = array() ) { ob_start(); wp_editor( $content, $id, $options ); …
Vinoth Kumar
  • 393
  • 4
  • 18
2
votes
1 answer

How do I import/use wp.blockEditor correctly?

I'm trying to write a Gutenberg-Block using create-guten-block. When I run it, I get a number of warnings in the console that a few elements I'm using are deprecated: deprecated.min.js?ver=2.6.1:1 wp.editor.RichText.Content is deprecated. Please use…
2
votes
2 answers

WP_Editor is out of the custom meta-box div. How to keep wp_editor in the div?

My custom post-type has custom meta-box with input field and wp_editor, below the code:
theKing
  • 686
  • 2
  • 10
  • 27
2
votes
2 answers

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/html is not saving. // add the admin settings and such add_action('admin_init', 'wp_myplugin_admin_init'); function wp_myplugin_admin_init(){ register_setting(…
DrMosko
  • 206
  • 1
  • 8
2
votes
2 answers

wp_editor always convert
to

 

I create a custom plugin that has a wp_editor on the admin, now when I put some html tags in the editor in Text view tab like
and click on the Visual tab.. the
converts into

 

when I back to Text tab. this is my php…
gadss
  • 18,755
  • 34
  • 96
  • 139
2
votes
0 answers

wp_editor not saving line breaks or bold

Im busy writing a store description for my multi store woocommerse site on wordpress. Im using the wp_editor. But I cant get it to save the styling parts. Bold, Itallic, linebreaks, nothing saves, it just saves   where the ,…
BG Smit
  • 53
  • 4
2
votes
1 answer

How to make the wordpress editor readonly?

How to make the wordpress editor readonly like readonly inputs. i am using following code for to display the editor in the page false, 'media_buttons' => false ); wp_editor( wpautop(stripslashes($my_text)),…
Mehar
  • 1,958
  • 3
  • 19
  • 42
1
vote
0 answers

How to track activity inside iframe of Wordpress tinyMCE editor

Im looking for solution that can track user activity inside wp_editor, i mean, i want to know if he is idle or not and then save content as concept (autosaving) I was trying to use this…
Jakub
  • 11
  • 2
1
vote
1 answer

How to get the value of wp_editor()'s textarea

So i am trying to have a custom textarea where users can do things like bold text, add ul's,link tags and so on. For all of this I am using the wp_editor() function inside wordpress, like this. $content = ""; $editor_id = "e_id"; $editor_settings…
1
2 3 4 5