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
1
vote
1answer
52 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
1answer
92 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
1answer
261 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 ...
1
vote
1answer
1k 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 ...
1
vote
2answers
628 views

wp_editor is not rendering shortcode

I have created a dashboard widget and this widget will show content which i'll add from an specific page. So, i created a option page and made a textarea field with wordpress editor. wp_editor(...
1
vote
3answers
5k views

Change Default Font Size and Remove Unwanted Font Sizes in TinyMCE

I use TinyMCE Advance plugin. I've posted a question in the support forum of the the plugin but it seems that the author doesn't provide any support now. As you can see in the picture, the font size ...
1
vote
1answer
2k views

Insert wp_editor on front-end with AJAX?

I'm trying to insert a wp_editor() into a page on the front-end with AJAX. The code I have right now inserts the wp_editor elements and the needed JavaScript and CSS files, but none of the settings I ...
1
vote
2answers
800 views

Button insert link on front wp_editor not working

I display a wp_editor on the front-end and everything was going fine until a recent WP update. Now, the "insert/edit link" is not working due to a Javascript error: Uncaught TypeError: Cannot set ...
1
vote
2answers
1k views

How to edit 404 content via wp editor?

So I've got to edit my 404 page. Since my client's website has 5 languages, I'd like to let him edit and translate the 404 page by himself, with normal WordPress editor. Also, we're currently using ...
1
vote
1answer
497 views

Use shortcodes in custom metabox using wp_editor?

I currently have a number of custom metaboxes each look very similar to this: /* ----------------------------------------------------------- # Team Information ----------------------------------------...
1
vote
1answer
1k views

Using WYSIWYG In custom meta boxes

So I've created a few meta boxes using the wp_editor, all are exactly as the following: add_action( 'add_meta_boxes', 'business_facts_metabox' ); function business_facts_metabox() ...
1
vote
1answer
2k views

TinyMCE Editor change underline button behavior - u tag instead of span text-decoration underline

As above. I want to change the WordPress Edtior TinyMCE behavior when I click the underline button I want the TinyMCE to wrap my selection with <u></u> tags. Now, I know that the u tag was ...
1
vote
2answers
1k views

Visual/Text tabs in wp editor Not Showing

I have a wordpress website that i have added custom meta boxes to the post. Custom meta boxes have an editor using wp_editor(), but the editor is refusing to show the visual/text tabs on the editor ...
1
vote
1answer
1k views

WP_Editor - Saving Value into Plugin Option - Stripping HTML

I have a wp_editor(); on my plugin settings page. I also have enabled the "Font Size" drop down in TinyMCE. After highlighting text in the wp_editor(); and selecting a font size from the editor's ...
1
vote
1answer
5k views

apply_filters('the_content') - make it ignore shortcodes?

I am using apply_filters('the_content) so I can see properly formatted content inside my wp editor in the backend. However, this also renders the shortcode that's in the content. I want it to ...
1
vote
1answer
536 views

`wp_editor()` CSS messing up the jQuery Dialog

I have a custom admin page that includes both the user of wp_editor() and a jQuery dialog. For reasons unknown to me, the instance of wp_editor() uses some of the same css class names as dialog, and ...
1
vote
3answers
918 views

How to use MarkDown in a custom textarea field?

I've created a custom metabox with a textarea in it. How would I go about using Markdown in this textarea? I've seen some WP plugins but they seem to only be for the main editor.
1
vote
1answer
541 views

Change the name of the wp_editor tab “html/text”

I'm using the German version of WordPress and in wp_editor the two tabs for "visual" and "html" are named "visuell" and "text". I would like to change the "text" tab to "html". Do you know how I can ...
1
vote
1answer
2k views

Updating post content on the front end

I have used the code below to add frontend editing to my posts/pages. How would I go about saving the post content when an update/save button is pressed? $post_id = get_the_ID(); $settings = array( '...
1
vote
1answer
5k views

wordpress qtranslate editor text is not working [closed]

I have installed qtranslate on my wordpress site, it all works fine, but sometimes the content editor does not show the text, When I force refresh the page a few times (Ctrl + r) eventually the text ...
1
vote
2answers
4k views

How to prevent tinymce macro from inserting nbsp;?

I've got the following macro button defined to wrap a selection in a shortcode in the wp_editor visual editor: (function() { tinymce.create('tinymce.plugins.ingredient_name', { init : function(...
1
vote
2answers
2k views

Adding wp_editor to custom metabox

I am adding fields to a custom post type. How can I have editing options in my meta data just as they are in the editor box? add_action('add_meta_boxes', 'add_property'); function add_property(){ ...
1
vote
1answer
433 views

Target wp_editor buttons to add a tooltip

I have a multi-author website and no matter how much education I give to Authors, 80%+ either refuse to or forget to use headings in their posts, instead they use bold text on a separate line to ...
1
vote
1answer
873 views

Using default wordcount javascript in Wordpress on custom wp_editor() areas

I have two wp_editor() instances on pages and posts used to populate the sidebars of my three-column website. I would like to use the default wordpress word-count script on the two wp-editor areas to ...
1
vote
1answer
41 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
32 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 ...
1
vote
0answers
47 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 ...
1
vote
0answers
42 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
0answers
53 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 ...
1
vote
0answers
52 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 ...
1
vote
0answers
557 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
54 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 ...
1
vote
0answers
131 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 ...
1
vote
0answers
353 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() { ...
1
vote
0answers
512 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
153 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 ...
1
vote
2answers
2k views

Cannot Update A Post, 404 Error

After months of leaving and deleting my WordPress site, I decided to try again. I downloaded the new version 4.7.3, installed and added a new post. So far so good. I then went back to edit the post ...
1
vote
1answer
239 views

Shortcode is not processed when added to option field using wp_editor

I managed to add a button to TinyMCE with this code: wp_editor( get_option('piedino_plugin_var_testo'), 'piedino_plugin_var_testo_id', array( 'wpautop' => false, 'media_buttons' => ...
1
vote
2answers
1k views

wp_editor in widget breaks after save (no buttons and visual tab broken)

My goal is to get wp_editor working in a simple widget which the admin can use to add text content on an admin options page. Here we go in wp-admin/widgets.php everything looks sooo good right. When ...
1
vote
0answers
719 views

Like to convert textarea into using wp_editor

In the first code below I would like to use wp_editor in lieu of the textarea. The second code snippet shows what I'm trying to use in the first code while keeping all the arguments etc in the first ...
1
vote
0answers
33 views

wp_editor: How to load wp_editor on demand using jQuery? [duplicate]

I am trying to load wp_editor on demand using jquery/javascript. Somehow I got success using following code but it does not save changed data in the element. tinyMCE.execCommand('mceAddEditor', ...
1
vote
0answers
160 views

How to reference TinyMCE body in my script

I want to add some custom behaviour to my TinyMCE body, but I can't reference it in my script. This is how I load my scripts inside my WordPress plugin: $this->loader->add_filter( '...
1
vote
1answer
603 views

How to dynamically generate wordpress editor on frontend?

I want to initialize the wordpress editor dynamically on frontend. I have tried to include the following scripts: wp_enqueue_script('editor'); wp_enqueue_script('media-upload'); wp_enqueue_script('...
1
vote
0answers
709 views

wp_editor in metabox not working

So, I've created a meta box within my page to allow my client to be able to add content into multiple different content blocks dynamically. I've done that using the wp_editor function like so. ...
1
vote
0answers
154 views

Change syntax styling of TinyMCE HTML Text Editor

So I have customized the CSS display for the TinyMCE 'Visual Editor' by using this here: /* Add Theme CSS to WP Content Editor -------------------------------------------------- */ function ...
1
vote
1answer
810 views

Backslashes being stripped from CSS

The title explains my problem. Upon saving CSS stylesheet in the "Appearance > Editor", single backslashes are being stripped out of the stylesheet. For example: content="\foo" becomes: content=...
1
vote
0answers
595 views

How to prevent shortcode preview from breaking in tinymce editor?

I am creating visual preview for shortcodes (just like captions). I have don't most of the parts but my preview html is getting broke by the editor when post is saved. I have investigate it further ...
1
vote
0answers
391 views

Theme option not saved if in wp_editor() and html decoded

i'm trying to add wp_editor() to my theme-option page but it is not saved when html is decoded. so this is the issue: in the theme option page i successfully added a new option called ...
1
vote
1answer
108 views

Add default page editor to an admin settings page

Is there a way to get the standard page editor into a custom administration settings page? I have been able to add other textarea boxes with toolbars, like TinyMCE/CKEditor but not replicate the exact ...
1
vote
0answers
1k views

tinymce.get() returns error after ajax request

In the backend, after an event I make an ajax request which populates certain fields. The problematic field is the textarea, for which I use wp_editor like so: <?php $settings = array( '...

1 2
3
4 5
7