Questions tagged [wp-editor]

The wp_editor() function allows plugin and theme developers to render a custom instance of the TinyMCE editor used by WordPress

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to integrate html editor in admin settings?

I have a textarea in my admin settings page. I want that textarea to have simple HTML features. I used wp_editor function: wp_editor( 'hello', 'myTextArea' ); As result I got: Fatal error: Call to ...
0
votes
0answers
14 views

Theme not displaying Visual Editor for wp_editor

I have a custom theme I am working on developing. I'm creating a simple contact form, but for some reason the theme isn't showing the visual editor for the wp_editor. I have tested multiple themes (...
0
votes
1answer
13 views

Get selected image URL from wp.media.editor.attachment into text input fails. What am I doing wrong?

I have placed a media button as a post meta field to insert an image URL into a text field when Insert Into Page button is clicked. It works up to the point of opening the media repository window, ...
0
votes
2answers
47 views

wp_editor visual tab in meta box doesn't show content

If you click on the Text tab, you can see the content, but when you switch back to the Visual tab, it displays nothing. It's not white text on white background either... it just has no content. The ...
1
vote
0answers
35 views

Editor not displaying dynamically after clicking on the button

I am displaying the field dynamically in the admin panel. I have a button called Add more fields. The user can add the custom field dynamically. As of now, it's working but the issue is the editor not ...
1
vote
1answer
36 views

How to make a custom field as an editor in wordpress?

I have to add the custom field in the WordPress admin panel and I tried and it's displaying. Below is the screenshot. I am using the below code. function wordpress_add_metaboxes() { add_meta_box( ...
0
votes
0answers
14 views

Wordpress Add Media problem with adding media description in wp_editor() when used in bootstrap modal

I am working in a plugin that uses wp_editor() for the text editor and has Add Media button. In my plugin, I have used bootstrap modal to popup a form with the text editor created using wp_editor(). ...
0
votes
0answers
16 views

wp_editor() youtube link does not load video

Hello I am trying to get a preview of the youtube video when pasted to the editor but it keeps loading plain instead of loading the video preview. I have created an options page in admin side for a ...
1
vote
0answers
16 views

How to use TinyMCE in the quick edit form?

I'm trying to make the description of a post editable - specifically the description of a WooCommerce product, but the issue should apply to any post type. I managed to implement it with a simple ...
0
votes
0answers
21 views

Adding the image selector/uploader to an admin back page

I have created a couple of back end pages for a client using a very basic database, the client is wanting to add an image url to the database but using the built in image selector/uploader, I have ...
0
votes
0answers
14 views

dokan edit functionality

how can we have a functionality that every vendor inputs whatsapp number, and when customer need they can chat on whatsapp with any product vendor, enquire them also can place order on whatsapp, Will ...
0
votes
0answers
7 views

Pasted carousal code doesnt show pictures while original post shows

I have elementor carousal on a page made by elementor.I need to copy paste the caruasal to a custom post type.The costum post type doesnt support elementor.So, I must add it with code editor by copy ...
0
votes
1answer
7 views

Unable to open specific posts on WP Dashboard [duplicate]

I have this weird problem in the last couple of days where it takes ~5 minutes to completely open some posts on WordPress wp-admin dashboard. Please hear me out carefully. 1 This is happening only ...
0
votes
0answers
7 views

wp.editor.initialise not respecting editor-style.css

It seems when loading an editor with the JavaScript API, editor styles are not respected like they are when it's loaded with PHP. The documentation on the JS API for the editor seems vague to me but I'...
0
votes
0answers
32 views

Replace wp_editor with Elementor in Plugin (if available)

I've developed a custom plugin that has an editable section in the admin. In order to call the WordPress editor, I'm using the following: <?php wp_editor( $post->profile, 'listingeditor', $...
0
votes
0answers
85 views

Buttons and Images URLs changed to wp-content/themes

Hope everyone is doing great. I'm trying to find a problem regarding my wordpress broken link issue. The problem is quite confusing because I'm not sure why is it happening where I've tried disabling ...
0
votes
0answers
27 views

Command to render again tinyMCE editor by id

I'm rendering a tinymce editor inside a react app with html passed from wp_editor The editor renders, but I need to switch between the text editor and visual editor to make the editor work. I tried ...
0
votes
0answers
19 views

Bold button gets unchecked on enter click when bullet button is also selected in WP Editor

I am using wp_edior. Here is the scenario : Click bold, italic, bullets and write 1 line. Now press enter Bold and italic buttons gets unchecked. I tried below solution but it did not work for me. ...
0
votes
2answers
15 views

Include Recent Post in Category

I use a free WordPress Theme called DefautMag, It has a front page with 3 columns, In the front page settings, I could choose any category to display in any of these columns, But I want to display ...
1
vote
1answer
234 views

Media library not working with wp_editor() on the front end

Very related: Add Media has stopped working in the front end since 4.5 update I want to run the wp_editor() function to load the classic WordPress editor on the Front-End. I need to do this out of ...
1
vote
0answers
65 views

Append wp_editor to Dynamically created textarea

So...the same question was asked 9 years ago: Dynamically textarea with TinyMce editor and I dont see a good answer and we now have the wp.editor API. Ive tried a few things, but cant add a WSYWIG ...
0
votes
0answers
46 views

Theme options missing from edit page

I'm still somewhat new to WP, so I apologize if this is an obvious thing I'm missing. When I click to edit or create a page, I seem to remember that I would get a page with all sorts of options, and ...
1
vote
1answer
187 views

TinyMCE as comment editor - encoding issues

I've implemented TinyMCE as my comment form on both the front- and back-end, using the below code (sourced from some questions here): // Enable TinyMCE as frontend comment editor for new comments ...
1
vote
0answers
61 views

WP Editor Issue in Backend

I am stuck on silly issue of wp_editor function in WordPress backend in custom plugin page. See issue for wp_editor in attached images I have called the wp_editor function like this <?php ...
0
votes
0answers
527 views

How to use wp_editor and save its data in wp_posts table

Recently I want to use wp_editor on a custom plugin where i add it inside a form and want to save its data in wp_posts table. So, I have created a new post type car and adds a field with wp_editor ...
0
votes
0answers
11 views

My edits are not saved

Everything used to be fine, but now for some reason I’m editing the record, but the old content remains, the new one for some reason does not appear. For example, I have everything stored in the pages ...
1
vote
1answer
237 views

Style classic editor buttons

I'm trying to style the buttons in the classic editor of wordpress, in particular to change color of the text inside or change the font-wright property. Using the browser inspector tool I looked for ...
1
vote
0answers
101 views

wpautop is not working when displaying content saved using wp_editor in a custom meta box

I am using wp_editor in a custom meta box. It is saving the content to the post metadata. And displaying it in the meta box as it should. The problem is when I am trying to display this content on ...
1
vote
1answer
217 views

Limit Block format tags in WordPress wp_editor

I'm working on a custom meta box and i am trying to limit the Block format tag to just P, H3 and H4 tags, i did it this way and not sure why it doesn't display the block format dropdown; wp_editor( $...
1
vote
0answers
146 views

Removing line breaks when in text view with wp_editor

While working on a custom plugin, I needed to add the wp_editor in the admin to let the user add its own content. I want the user to be able to write custom rich texts with the "Visual" editor mode ...
11
votes
0answers
1k views

How to filter or remove default panels in Gutenberg PrePublish Panel

I would like to edit the text or remove and re-create the Publish panel of Gutenberg's PrePublish Panel in the editor sidebar. I know I can use wp.data.dispatch( 'core/edit-post' ).removeEditorPanel( ...
1
vote
0answers
88 views

How to set wp_editor to be email friendly?

I am sending emails via wp_mail() using a text/html header. So i need html formatted content. I want to use wp_editor() to edit my custom email template options. It has a Visual and Text tab for ...
3
votes
0answers
134 views

How can I control multiple editing of wordpress posts?

I am managing multiple authors blog, I have issues of editors taking over the stories that someone else is currently editing. The default wordpress warning will display but some of them ignore it and ...
1
vote
1answer
2k views

Convert this textarea to rich html format via wp_editor

I have a texarea in a page that works like a charm, but I would like to convert the area to a html rich wp_editor. Could anyone tell me how to convert this textarea to a wp_editor field?? Thanks <...
1
vote
1answer
956 views

How can I get the standard WP-Editor through Javascript?

In PHP I can do wp_editor( 'content', 'editor_id', array() ); And the result looks like this: The standard WP-Editor with all the buttons, plus my custom button (the blue square). I have tried to ...
0
votes
1answer
215 views

Make wp_editor required

I have a page with multiple wp_editors. I need to make 2 of them required. I tried the following, but it didn't work. I did put it right after the function that loads the page, but not sure if it ...
0
votes
2answers
198 views

wp_editor in add_meta_boxes does not show gallery

I have added a meta box in the page edit section: add_meta_box('custom_section_box', 'Sections', array($this, 'section_box'), 'page','normal','high'); Within the box, there is a wp_editor call: $...
2
votes
1answer
454 views

Add table controls with wp_editor minimal editor configuration ('teeny')

I want to add the table controls for wp_editor(tinymce) initiated with teeny=>true. Here is what I have done so far (without success): <?php $tinymce_options = array('plugins' => "table", '...
0
votes
1answer
236 views

How do I render content from a wp_editor in a plugin setting field?

I have a plugin setting that uses wp_editor() to handle the input and will get echoed as part of a shortcode. Everything is working great on the admin side but when I echo the output on the client ...
0
votes
2answers
458 views

How can I apply preventDefault() to the click on CodeMirror-hints?

If I click on a selection in the autocompleter of WordPress in codeMirror, the whole field is closed. To prevent this I want to add preventDefault to the click event. var cm = wp.codeEditor....
0
votes
1answer
618 views

Load WordPress Editor .css on Front End

This issues seems to have cropped up for me after a recent WordPress udpate (I'm on 4.9.9) as I haven't had issues before. I load wp_editor on the front end using the following code: $argswp = ...
1
vote
1answer
1k views

Gutenberg - Custom blocks not working as expected?

I am making my very first custom block in gutenburg editor using this tutorial. NOTE:- ALL THE CODE I HAVE WRITTEN IS INSIDE THE THEME NOT AS A PLUGIN And the output came correctly the block started ...
0
votes
1answer
816 views

wp.editor.initialize does nothing

I'm trying to add additional wp_editor instances when a user clicks an "Add content" button in the back-end. I have it mostly working, except that the user needs to save the post after adding the ...
0
votes
3answers
477 views

Is there a way to get wp_editor (tinymce) content?

I want to get the wp_editor (tinymce) content then find a sentence by specific word with regex. However, have no idea how to get the content When a post is published or updated, the function will get ...
1
vote
1answer
142 views

WordPress code editor VS customizer “built-in CSS editor”?

I needed to make some CSS changes to my WordPress site (child theme) earlier and opened the WordPress editor inside "Appearance": Appearance > Editor > someCssFile.css Inside the editor page, ...
0
votes
2answers
1k views

wp.editor.initialize does not show the same default toolbar

In a custom post type of my plugin, for the edit post page, there is a WP Editor inside a metabox. In this metabox there is a button to add WP Editors via jQuery and Ajax. I managed to do it but wp....
0
votes
1answer
31 views

See double taxonomy inputs in WP editor

I registered 3 taxonomies for a custom post type, but they show up in 2 places when editing a custom post type. I would like to only display the input boxes on the right of the editor. How to remove ...
4
votes
1answer
505 views

'Add Media' button doesn't work when editor is initialized from javascript

I am trying to instantiate the wp_editor with javascript, which works nicely except the 'Add Media' button does not work. There are no errors, but clicking the button does nothing. The simplest test ...
0
votes
1answer
34 views

WordPress editor issues

I was not able to submit any post through WP Editor and users are also not able to submit a new post.There was a problem with the editor and I reinstalled WordPress, it solves for me but does not for ...
0
votes
2answers
297 views

Remove distraction free mode from teeny editor

I'm trying to remove the distraction free mode button from the editor, but i can't make it disapear. Here is the code im using: add_filter( 'wp_editor_settings', function($settings) { $...

1
2 3 4 5
7