Questions tagged [tinymce]

TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL. TinyMCE has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

Filter by
Sorted by
Tagged with
0
votes
1answer
699 views

Wordpress tinyMCE Keep Wrapping <p> Tags To HTML Codes When Saving

Wordpress tinyMCE keep adding <p> tags when I saved my custom post types in visual mode opened! I had searching for many solutions, but not working. Here is the solution that I found, but this ...
0
votes
1answer
941 views

How to use value from <select> modal tinymce windowManager?

Hello im using a Javascript File for integrating a button with a function in my TinyMCE editor in my Wordpress enviroment. I want to get the value from the select-Tag field and use it for further ...
0
votes
1answer
433 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....
12
votes
6answers
30k views

Wordpress automatically adding “&nbsp;”?

I'm not sure if is wordpress itself or Tiny MCE that's doing it. But when switching between HTML and Visual editor it's adding &nbsp;, and adding an extra one each time I switch back and forth. I ...
1
vote
2answers
817 views

wp-tinymce.php 404

My visual editor isn't working on a site after just launching it to a new server. I assumed a permissions issue, but the file itself is set to 644. I tried 755 on it as well and still no go. The ...
3
votes
2answers
2k views

Use rich text editor in comments?

I've been trying to get the TinyMCE editor working in the comments field but I've been unable to do so. Another suggestion I found was http://nicedit.com, the editor is working but the comments are ...
1
vote
1answer
2k views

Disable TinyMCE Table formatting width/height

Hi there I want to disable automatic formatting of table/td/tr widths and heights in WordPress TinyMCE. I create the table, literally type the data in (not copying it from word or anything like that) ...
1
vote
1answer
507 views

Multiple Tinymce/wp_editor in WordPress >4.8

I'm struggling for two days and started here with success: Why Can't wp_editor Be Used in a Custom Widget? I managed to have multiple TMCE on one page (displayed by a widget); all save data ...
1
vote
2answers
927 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 ...
0
votes
1answer
826 views

how to see P and BR tags in tinymce?

As a developer, I'd really like to have the ability to see every tag written out on the editor in source mode. Is there a way? Some filter, action, or so?
0
votes
1answer
21 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 ...
0
votes
1answer
1k views

Inline Editing with wp_editor and tinymce (problem with textarea)

I want to use the new inline editing from tinymce with the wp_editor function in wordpress. Here is some info on how to set up tinymce inline editing http://www.tinymce.com/tryit/inline.php The code ...
1
vote
1answer
446 views

accessing wp.media api from a tinymce plugin

I'm trying to create a tinymce plugin that generates a shortcode containing two image ids: [image-fade old="xx" new="yy"] I would like to let users select images directly from the media selector ...
0
votes
1answer
470 views

Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php

Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php while insert image in to post, and when I add custom html widget in to side bar this error will appear....
1
vote
1answer
26 views

TinyMCE Visual Blocks plugin set Show blocks option for all users

I want the Show blocks feature of the TinyMCE Visual Blocks Plugin to be activated for all users. I can activate the Show blocks feature under the View menu dropdown manually. See picture. This ...
0
votes
0answers
120 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
27 views

TinyMCE in customizer is Not working Properly

I used this code for tinyMCE for my wordpress theme https://wordpress.stackexchange.com/a/274333/77065 but when I try to put text and use option like Bold nothing works, Even after entering text ...
1
vote
2answers
452 views

TinyMCE Styles Dropdown not adding html tags other than span

I am trying to add h1,h2 .. in the TinyMCE Styles Dropdown with my other html elements. I have tried the following code, but the problem is it only adds styles if I use span as 'block' value. If I ...
0
votes
0answers
30 views

TinyMCE code works as Theme Template File But Not as Short Code

I have a strange problem I'm hoping you can help me with. The following code works fine in a template file for a theme. But it does NOT work as code in a class in a plugin for a short code. I am ...
1
vote
1answer
497 views

How to make float element in tinymce

I would know how its possible to add a float:left or float:right in tinymce ? I know how to do this for a picture but what is the best solutions for all elements ?
1
vote
1answer
486 views

Preserve shortcode content formatting

How can I preserve the formatting of the content within a shortcode block when I switch back and forth between the visual and text editor in TinyMCE? As in, the stuff between [myshortcode] and [/...
0
votes
1answer
43 views

Did Gutenberg block editor change the html in post content during import?

Which HTML is better, pre-Gutenberg or post-Gutenberg? I imported post content from an old and large WP site into a fresh install and new database. Almost 1200 posts along with their meta and related ...
1
vote
1answer
1k views

onClick inside post_content does not appear in post tinymce editor

I'm doing a migration. I made a PHP script to generate posts in the new WordPress database. The post content contains an HTML link containing href="javascript:" and onClick="trackOutboundLink('url')"....
0
votes
1answer
651 views

Use schema.org HTML in TinyMCE Editor

I want to use HTML (schema.org) in my TinyMCE Editor. I use the following script in my custom.php // Prevent TinyMCE from stripping out schema.org metadata function schema_TinyMCE_init($in) { /** ...
0
votes
1answer
610 views

TinyMCE Multiple Custom Classes Selections

I wanted to use some classes inside my WP TinyMCE Editor. I googled some scripts/functions and seems working fine at the beginning. While I am exploring to add more stuff to the script and add style ...
0
votes
1answer
524 views

Is it possible to disable the image alignment options in the post editor?

By default, when you insert an image into a post, it has some image alignment options (see below). In my theme I want every image to be full width. Of course, it's easy for me to change the front-end ...
0
votes
0answers
27 views

Configuring buttons on the TimyMCE Toolbar in WordPress (bbPress environment)

If I use this php code to display a Tiny MCE Editor in my bbPress forum (front end): //editor bbpress function bsp_enable_visual_editor( $args = array() ) { global $bsp_style_settings_form ; $...
0
votes
1answer
582 views

DOM reference to TinyMCE editor element (button)

I guess this should be a very simple question, but I'm not too familiar with overall functioning of Wordpress / TinyMCE so I'm struggling: I've added a custom button to TinyMCE and need some kind of ...
0
votes
1answer
636 views

How to force wp excerpt to use br tag?

wp editor was replacing br tag with p tag. not all the solutions here worked. It was causing problem with design. So i disabled wpautop with below code.... remove_filter( 'the_content', 'wpautop' ); ...
0
votes
1answer
572 views

TinyMCE HTML Encode Backslash

so my question is similar to the one found here, following the example there i am trying to force Tiny MCE to encode backslashes...... currently all i am doing to test this is setting a break point ...
0
votes
1answer
724 views

`tinyMCE is not defined` after migrating site to server

After migrating site tinyMCE (text editor) top bar have disappeared & text color have changed to black, I am getting 4 errors in concole and below is a snapshot of it. I am using WordPress ...
2
votes
1answer
509 views

Show All Posts Insert Edit Link

When I click to insert/edit link in the tinyMCE rich editor for a post, then click "Or link to existing content", it shows only posts that are live and published. Is there a way to get the list that ...
1
vote
1answer
569 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('...
0
votes
1answer
26 views

WordPress removes paragraphs. How to disable this behavior?

For example, this code: <div><p>Some text here</p></div> Becomes formatted as this: <div>Some text here</div> I think that this is MCE related behavior, because ...
0
votes
1answer
521 views

Using TinyMCE fiddle for node filter to add id attribute to anchors

I'd like to edit the code of the anchor-maker in TineMCE so it will paste into the code the following line: <a name="#ANCHOR" id="#ANCHOR"> instead of: <a name="#ANCHOR"> Where do I find a ...
0
votes
0answers
63 views

Custom Drop Down in TinyMce in Elementor

I'm using elementor and added text in drop down,"Span", but its not working i want to know how to add functionality such that it will also work like "Heading 1,2,3,4.." are working. I added "Span" ...
1
vote
1answer
643 views

TinyMCE 4 remove/add attributes for all images

i want to search for all images that have been add to TinyMCE 4 and: Remove the height attribute from the images Add style="max-width: 100%;" to all images what is the best way to do this tasks? ...
0
votes
0answers
6 views

Hook into tinymce 4 with javascript

I have a Wordpress site using ACF, where several TinyMCE instances may be loaded. I want to be able to hook into these with javascript but am unable to find any documentation on how to do so. In ...
2
votes
1answer
616 views

TinyMCE - Add button that changes direction of selected text

Ok, I am going to create website in Urdu(rtl) & English(ltr) language that contain paragraphs like this: <p style="direction:rtl">کیا حال ہے buddy? سب خیریت ہے؟</p> You can see that ...
0
votes
0answers
18 views

How can I get the Description textarea field to use the Visual Editor for Attachment Posts

I saw this post involving tags. But I can't figure out which /** * Display advanced TinyMCE editor in taxonomy page */ function wpse_7156_enqueue_category() { global $pagenow, $current_screen; if( ...
0
votes
0answers
35 views
0
votes
1answer
708 views

Adding microdata using Structured Data Markup Helper HTML

I am trying to add schema microdata to a wordpress website. I have tried to insert some microdata directly in the wp editor (text mode) but every time i save the page it does not save the code. I ...
0
votes
0answers
13 views

Custom TinyMCE buttons not loaded in html mode

I'm trying to add multiple shortcode custom buttons to the TinyMCE wordpress editor. I have writed this code and it's working fine but the buttons are loaded only on the visual editor mode, Is it ...
0
votes
0answers
17 views

Use font-awesome for TinyMCE icons

I've found a solution to add my custom shortcodes to the wordpress TinyMCE editor. I don't have custom icons for the shortcodes ao I'm thinking to use font-awesome. Is possible to set them inside the ...
0
votes
1answer
677 views

Add Button to TinyMCE Custom Menu

I've added a new button with a menu to the TinyMCE visual editor using this tremendously helpful tutorial but would now like to add further items to this menu depending on whether various post types ...
0
votes
1answer
737 views

Add WordPress Core CSS into editor-style.css

I am using a custom child theme (from Parabola, Cryout Creations, lastest version), but it seems that the editor-style.css file is not up-to-date. Rather than rewriting everything, I would like it to ...
0
votes
1answer
62 views

TinyMCE Advanced Link Class List on the main editor

I'm using the plugin TinyMCE Advanced and would like to achive a "link_class_list" to the editor when inserting a link. I tried a hundred things, but can't seem to get this work with the main (content)...
2
votes
3answers
1k views

Should the WP post editor B (bold) button be inserting a <b> tag instead of <strong> in HTML5?

Using WP 4.0. I thought that the html5 schema was supposed to be turned on by default. That would mean that clicking the B (Bold) button would generate a <b> tag, rather than a <strong> ...
2
votes
2answers
2k 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>...
0
votes
0answers
47 views

Visual editor keeps removing non-breaking spaces

I'm on a virgin WordPress 5.2.3 installation with twenty nineteen theme using the classic editor. I'm facing the problem, that &nbsp; entities added in text tab are removed once I edit the text in ...