Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
0answers
19 views

Blank page for editing page, console error

When I try to edit or create a new post, I receive a blank page but I still can view the full source of the page and seems that all displayed without PHP errors. On console there is error for react-...
0
votes
0answers
13 views

Why there is no edit handle on my elementor page?

I have a page built with elementor. There are multiple blocks on my page but I don't see the edit handle when I hover over an element/section. As seen in the attached screenshot, the mouse is hovering ...
0
votes
1answer
24 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
25 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
33 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: $...
1
vote
1answer
25 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
29 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
33 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
50 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 = ...
0
votes
1answer
238 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
143 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
105 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
29 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
1answer
194 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
0answers
13 views

Embed on WordPress shows a black video player

We are trying to add YouTube or Twitter URLs in the editor however it converts them to a video player that does not work. When I press edit on that page it shows the tweet/video player fine, as soon ...
0
votes
0answers
10 views

limit media Library options with wp editor in frontend

using wp editor in frontend for user to add descriptions <?php $settings = array('textarea_name' =>'desc','quicktags'=>false);?> <?php wp_editor($user->description,'desc',$settings);...
0
votes
1answer
17 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 ...
2
votes
1answer
103 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
0answers
108 views

Setting default content when using wp.editor.initialize

I am trying to add default content when I fire wp.editor.initialize(). This is code. wp.editor.initialize( editor_id, { mediaButtons: true, quicktags: true, tinymce: { ...
0
votes
0answers
30 views

WordPress wp_editor() inside hidden element rendering incorrectly

As part of a plugin I'm currently writing, I need to add multiple WordPress RTEs to the admin screens. Since the main screen has tabs that are handled with JavaScript, some of the editors are inside ...
0
votes
1answer
31 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
117 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) { $...
0
votes
1answer
210 views

Custom wp.editor.initialize settings ignored

I built a meta box where a click on a button shows a textarea with rich text editing enabled. After creating the textarea and appending it to the DOM, I run this to initialize the editor: console.log(...
0
votes
0answers
132 views

How to use JS inside of the (iframe) wp_editor function?

I'm using the wp_editor function to create a cool frontend editor. The problem is: WP generates an iframe where the editor's content is displayed - however I have a hard time to do anyting with JS ...
0
votes
0answers
44 views

“Formats” Select Menu in WP Editor doesn't show up with correct colour

I added the Dropdown "Formats" and defined some custom styles. The followed tutorial is in this section https://codex.wordpress.org/TinyMCE_Custom_Styles#Registering_Custom_Styles Everything is ...
0
votes
0answers
13 views

automatically apply clear formating when pasting text on editor

I know there is a button on the editor that clears the formating styles from other text editors. But is it possible to apply this clear formating automatically when text is pasted?
1
vote
0answers
332 views

How to add custom button in wp_editor

Sometimes I have to write some handy code.ie: <div class="row w-100"> <div class="col-md-6"> Actual Content </div> <div class="col-md-6"> Actual ...
1
vote
0answers
31 views

Edit Page blank

I have been given the task of looking after our office website which is a WordPress website. I have been creating and maintaining websites for over 25 years and have used WordPress, but it was a long ...
0
votes
2answers
53 views

how to display wp_editor in a page

I am making my theme. I am using wp_editor in front-end to submit post. I submit through wp_editor in the specific page, and this being displayed in single.php. At single.php I am using <?php ...
1
vote
0answers
76 views

how to set max-length at the wp_editor

I am using wp_editor in front post submit form. this works good. But I don't know how to set the max-length of this field like input field. I there any way to set the max length of wp_editor in ...
0
votes
0answers
234 views

Save AND Output simple HTML data to and from database using Wordpress

First let me say, I'm overwhelmed so I'm reaching out for some help. I have a custom form in Wordpress Admin area. One of the form fields (textarea) is using wp_editor. <?php wp_editor( $content, ...
1
vote
1answer
159 views

Stop WordPress Visual Editor converting backticks into code blocks

I need my frontend wp_editor() to not convert backticks into code automatically. I have checked the settings config in the tiny_mce_before_init filter as well as the documentation on the TinyMCE ...
0
votes
0answers
202 views

front post submit using wp_editor

I am making my theme with studying. I want front-end posting that can be written by users. I made form. like this. <form class="rnm_fe_write_contets"> <ul> ...
1
vote
0answers
204 views

How to Add TinyMCE to widget

I'm trying to create simple widget with TinyMCE rich editor but it's not working My widget code: add_action('widgets_init', 'string_example_name_init'); function string_example_name_init() { ...
0
votes
1answer
184 views

wp_editor embed shortcode not working within my plugin

for my own plugin I have a create-form which includes at least two editor fields and I insert them like this wp_editor('', 'dbfield'); The editor is shown in the form, it gets saved into the ...
0
votes
2answers
27 views

Editor's role in WP

Sorry for what is probably a very basic question - I've managed my own WP site for a fair while now and am bringing a colleague on to help as I'm undertaking a project at work which will take up more ...
1
vote
0answers
398 views

WordPress Visual Mode Not Working - adding span code while clicking

After the update of WordPress 4.9.6, I got a very strange issue that I am not able to write anything in WordPress editor in visual mode. When I'm trying to switch from text to visual I am getting ...
1
vote
0answers
106 views

How to pass the wp_editor content using jquery

I want to add the wp_editor content using jquery. I have hidden the wp_editor that needs to be displayed in the thickbox on one of the button click <div class="hidden-editor-container" style = "...
0
votes
1answer
138 views

Get admin area editor in frontend

I'm new to WordPress development, so apologies if this is a simple matter. I have created several custom post types and I want to let users add/edit content from the front end. I thought it's easy. ...
0
votes
1answer
29 views

Wordpress Editor without buttons

I'm trying to add Worpdpress editor on a modal page and in a different php file, but it doesn't show me the buttons, I put the screenshot Also in the php file, First I hidden the editor to load the ...
1
vote
0answers
103 views

Can I add my own profile.php?

I really want load my own user-edit.php because I want add fields that can be updated using the WYSIWYG editor and edit profile like when I edit a page in WordPress. Is it a right way to accomplish ...
0
votes
0answers
283 views

Adding a class to custom TinyMCE button using WPLinks dialog box

I'm trying to achieve a custom button within the WordPress editor that a user can click to insert and the link is added, already styled with the relevant classes. I've added a custom button to ...
0
votes
2answers
917 views

how to save wp_editor html content in options table

wp_editor( $default_content, $editor_id,array('textarea_name' => $option_name,'media_buttons' => false,'editor_height' => 350,'teeny' => true) ); submit_button('Save', 'primary'); ...
0
votes
0answers
27 views

Wordpress textual editor problem with new line

Wordpress version: 4.8.4 (I wouldn't like to update to 4.9.1, because that version have bug with Template Name inside pages.) I've created custom theme in Wordpress and have problem with textual ...
0
votes
1answer
197 views

Set default “Link CSS Class” in add media admin editor

I want to set the default link css class to all those images which are added to admin editor. I have found the way to add default image class with this action: function add_image_class($class){ $...
0
votes
1answer
35 views

How to show post title in content editor in backend?

Is this possible? I am trying to use a pre-defined template for my contents. To do that, I use something like this: add_filter( 'default_content', 'custom_editor_content' ); function ...
0
votes
2answers
2k views

disable <script> tags on wordpress text editor

I am trying to prevent from Cross Site Scripting vulnerabilities. For that I have to make sure that it is not possible to insert JavaScript code directly via the editing functionality on Text editor. ...
1
vote
1answer
899 views

Get data from wp_editor()

I can use wp_editor() function for add custom post use wp_insert_post() function (with post_content parameter) in my plugin. I need to can be saved data from wp_editor() function. How can i get ...
1
vote
1answer
486 views

Auto-resize when writing with Custom post WP editor

I noticed that my edit post WP editor expands automatically when writing. However my WP editor instances I use for my other Custom post types don't. I investigated a bit I and I see that the iframe ...
1
vote
1answer
721 views

How to remove buttons from the WP Editor on the edit post page in the admin area

I have a wordpress site that uses both standard posts and custom posts. I have no problem removing buttons from the WP editor when it's related to a custom post type. I just add this below to the CPT ...