Skip to main content

Questions tagged [visual-editor]

The default visual editor in WordPress is Tiny MCE. There is an API that allows users to adapt the visual editor to their needs. It is possible to use other visual editors as well.

Filter by
Sorted by
Tagged with
21 votes
3 answers
19k views

Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1

How is it possible to add a custom button to the visual editor TinyMCE, Version 4? Currently I found this q&a with a little bit hints to the topic, but not a solution or a how to. But I can't ...
bueltge's user avatar
  • 17.1k
26 votes
1 answer
1k views

Adding Custom Text Patterns in the WP 4.5 Visual Editor

4.5 is out and with it new Text Patterns. I would like to know how to go about adding my own custom patterns. Taking a look at wp-includes/js/tinymce/plugins/wptextpattern/plugin.js it seems pretty ...
jgraup's user avatar
  • 9,834
6 votes
4 answers
6k views

Disable WYSIWYG editor only when creating a page

I read several articles about configuring the WordPress editor. For example, this snippet shows how to permanently set the editor to HTML or WYSIWYG for all contents. I'm wondering if it's possible ...
Simone Carletti's user avatar
3 votes
1 answer
1k views

Hide page visual editor if template is selected - redux

The answer given to a previous and identical question is unfortunately not working on my WP install. I'm using a version of the function recommended there. function nim_hide_editor() { $post_id =...
nimmolo's user avatar
  • 41
21 votes
4 answers
6k views

Add custom options to the wplink dialog

I managed to add a custom option-select for images with function attachment_field_credit( $form_fields, $post ) { $field_value = get_post_meta( $post->ID, 'first_image', true ); $...
caramba's user avatar
  • 1,416
13 votes
6 answers
31k views

Keep HTML format when switching from Visual to HTML editor

I've been looking around for a solution that will allow me to edit HTML code and have it remain after a switch to the Visual editor and back. I've tried a bunch of things with no luck: the wp-no-...
evanmcd's user avatar
  • 259
9 votes
2 answers
15k views

TinyMCE editor is breaking my beautiful HTML

This is pretty much an exact duplicate of: How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5? and HTML5, WordPress and Tiny MCE issue - wrapping ...
Dominic P's user avatar
  • 705
6 votes
4 answers
10k views

Visual Editor Missing, Server-Side Problem, How Would You Debug It?

I already tried all of the solutions you can find online like adding this to wp-config.php: 1 define('CONCATENATE_SCRIPTS', false); 2 I also deactivated all plugins and changed the theme, ...
mashup's user avatar
  • 279
4 votes
2 answers
2k views

WordPress Editor not getting youtube video preview

When I am creating a post from the admin panel and using a youtube link in the Editor, the editor automatically fetching the video from youtube and displaying right away in the editor. But When i am ...
Dipak Kumar Pusti's user avatar
1 vote
1 answer
5k views

Restrict file uploads by extension?

Is there a way in WordPress 3.1 to restrict allowed file uploads by extension (images only) and file size? Bonus question: Can I limit users to only be able view files they have uploaded themselves?
EddyR's user avatar
  • 395
16 votes
2 answers
1k views

Remove inline linking tool

I'm not a big fan of the inline linking tool published with WP 4.5. Is there a way to disable it?
Nico Martin's user avatar
12 votes
2 answers
16k views

How do you change the visual editor's background color?

I have a Wordpress site in which the background color is black and the text is white. The site is fine, but it's a pain trying to edit content in the visual editor as the background is white (same ...
Ryan Hayes's user avatar
9 votes
3 answers
9k views

Can you add the visual editor to the description field for custom taxonomies?

Can you add the visual editor to the description field for custom taxonomies? It would be nice to have this option available when you edit an entry for a taxonomy be it core or custom.
hsatterwhite's user avatar
7 votes
4 answers
13k views

Hide page visual editor if certain template is selected?

How do I hide the page editor (WYSIWYG editor) if the current page is set to a certain template. I have the following code already to add in custom meta boxes when certain templates are chosen: ...
Scott's user avatar
  • 12.3k
6 votes
6 answers
9k views

How can I improve the line break handling in the WYSIWYG editor?

I always find myself in HTML mode in the editor to try and get simple things like breaks between paragraphs to show up right (using <p></p>). Is that normal? Is there a better editor out ...
tooshel's user avatar
  • 1,427
5 votes
1 answer
4k views

Styling Shortcodes in Visual Editor

Does anyone know how to style the visual editor so that when specific shortcodes are used they are replaced with an image within the visual editor? I have found that many users screw up the shortcode ...
NetConstructor.com's user avatar
5 votes
2 answers
9k views

Disable visual editor on one specific page

I would like to remove the visual editor from one specific page because if I edit this one page in Visual mode, it breaks the code. I want to make sure the client doesn't have this option on the ...
Starfs's user avatar
  • 507
5 votes
1 answer
3k views

wp_editor disable after reaching character count limit

I want to disable input into an instance of wp_editor on the front end. This accurately tracks the number of characters, but allows input after the limit is reached. function my_char_count( $...
shanebp's user avatar
  • 5,083
4 votes
4 answers
5k views

How to disable Gutenberg editor?

As the 5.0 is getting real, and so is Gutenberg... Is it possible to disable Gutenberg and use previous TinyMCE editor? How to do this?
Krzysiek Dróżdż's user avatar
4 votes
2 answers
9k views

Shortcode to insert <!--nextpage-->

Since wordpress does not have a menu icon (aka "user friendly) way to add the command to a post or page, I'm trying to create a shortcode to do it. However, as logic would have it, its not that easy....
N2Mystic's user avatar
  • 3,193
3 votes
1 answer
4k views

Disable text tab on WordPress text-editor

I'm looking for a way to disable text tab on wordpress text-edito (red square on the pic) for all my users roles except ADMINISTRATOR because i don't want them to have the possibility to add ...
Samuel's user avatar
  • 354
3 votes
3 answers
8k views

Add button in TinyMCE editor to insert text

I'm searching a way to add a custom button to the TinyMCE editor when clicked insert into the visual editor some text. For example: button called "Hi" when clicked insert into the editor "Hello I'm &...
Pepozzo's user avatar
  • 367
2 votes
2 answers
3k views

How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5?

Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. <div>...
Hauke P.'s user avatar
  • 381
2 votes
1 answer
1k views

How to enable visual editor when editing comments on the dashboard?

For editing a comment in admin pages the editor is only html, can we modify the edit comment page with a filter to include visual editor too?
rvch's user avatar
  • 21
1 vote
1 answer
2k views

Lost formatting after saving

I make basic formatting to the text in visual editor. When saving, everything got lost, formatting, spaces, paragraph.... everything got inline... I will go crazy !... why it's doing that ?.. i can ...
menardmam's user avatar
  • 912
1 vote
1 answer
892 views

TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2

I want something very simple: a custom metabox with a TinyMCE editor in it. The following code help me achieve that easily in 3.1.4: add_action( 'add_meta_boxes', 'add_metaname_box'); function ...
Eugene's user avatar
  • 45
1 vote
1 answer
2k views

Can I remove the Rich Text box editor for a specific post?

A few months ago I asked a similar question: Is it possible to remove the main rich Text box editor? and got the following answer: function remove_pages_editor(){ remove_post_type_support( 'page',...
Zach Lysobey's user avatar
1 vote
5 answers
9k views

Is there any way to set default for "Insert/Edit Link" to "Open link in new window"?

I almost always select "Open link in new window" when creating an URL/HREF. Is there any way to default this choice. Even if it requires a small source code change, I think it would be worthwhile (...
NealWalters's user avatar
0 votes
2 answers
1k views

Theme Advanced Styles in Visual Editor and Paragraphs

After i add these codes to functions.php: add_editor_style(); function childtheme_mce_btns2($orig) { return array('formatselect','styleselect', 'underline', 'justifyfull', 'forecolor', '|', '...
Ünsal Korkmaz's user avatar
0 votes
1 answer
3k views

How avoid WP editor to change <br/> by &nbsp;

Ok this is an old question and i may receive classical answers : use soft key I can't, i also use JIG and it makes the soft key invalid when i use it to make the text slightly downard to feet with my ...
bradypus's user avatar
0 votes
1 answer
2k views

How-to stop wordpress from saving utf8 non-breaking space characters

Anyone have a tip on how to prevent Wordpress from saving utf8 space characters (= hex C2 A0) in DB by replacing with space \x20 ? Is there a hook that can be used to do a replace before saving to ...
Mattias Fjalestad's user avatar
0 votes
1 answer
527 views

Add visual editor to Media Edit Screen

As of version 3.5, Wordpress added Quicktags to the media description field witch is an improvement over the simple textarea. However, I need a full Wysiwyg editor for a project I'm working on. How ...
hand_coding's user avatar