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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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
2answers
26 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
30 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
87 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
68 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
52 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
21 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
109 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
9 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
16 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
81 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
93 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
26 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
29 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 ...
-1
votes
0answers
57 views

Gallery Previews Not Working - wp.editor JavaScript API

When using media buttons on the wp.editor JavaScript API, The default "Create Gallery" functionality is available. Selection and editing of the gallery is working perfectly fine, however the gallery ...
0
votes
2answers
95 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
179 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
93 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
38 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
281 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
22 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
42 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
66 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
198 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
138 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
154 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> ...
0
votes
0answers
26 views

wp_editor doesn't show icon in frontend.

I making my theme. I set wp_editor in front-end like this. <?php wp_editor( $distribution, 'distribution', array( 'media_buttons' => false, 'textarea_rows' => 8, ...
1
vote
0answers
168 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
171 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
0answers
69 views

wp_editor not working in jquery dialog

I have managed to add wp_editor into one of my textarea insdie jquery dialog. Now the issue is that it doesn't allow me to switch between visual and text tabs. Also none of the buttons are working. I ...
0
votes
0answers
19 views

I want to add more toolbars like (fontsize, color ) on this code but unable to do plz help

if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } $editor = apply_filters( 'submit_job_form_wp_editor_args', array( 'textarea_name' => isset( $field['name'] ) ? $field['...
0
votes
2answers
26 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
385 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
99 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
0answers
13 views

How to prevent tinymce formats from multiselecting?

Is there a way or a setting to prevent this from happening. I tried hooking script like this on footer but it still wont bind to the buttons. add_action( 'wp_footer', function () { echo "<...
0
votes
0answers
13 views

Detect editor instance on the page

Is there a way to check wheter any editor instance has been loaded on the current screen in admin panel or not? I'm working on meta box with native WP Link capabilities. Unfortunately when I use ...
0
votes
1answer
107 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
28 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
96 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
277 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
781 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
179 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
1k 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
768 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
426 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
655 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 ...
0
votes
0answers
33 views

Creating a frontend blog post form for logged in users only

I recently tried to make a form for users that are logged in to be able to add a post from the frontend to their profiles. The problems I have found are the following: ANYBODY can post from it, even ...