Questions tagged [tinymce]

TinyMCE is an open source WYSIWYG HTML editor that provides a modern rich text editing experience for web applications. Use this tag for questions regarding the usage of TinyMCE and its integration with CMSs and other web-based applications.

Filter by
Sorted by
Tagged with
142 votes
2 answers
132k views

JQuery to load Javascript file dynamically

I have a very large javascript file I would like to load only if the user clicks on a certain button. I am using jQuery as my framework. Is there a built-in method or plugin that will help me do ...
Jeff Meatball Yang's user avatar
54 votes
10 answers
133k views

Remove style attribute from HTML tags

I'm not too good with regular expressions, but with PHP I'm wanting to remove the style attribute from HTML tags in a string that's coming back from TinyMCE. So change <p style="...">Text</p&...
Martin Bean's user avatar
  • 38.8k
41 votes
6 answers
43k views

TinyMCE Paste As Plain Text

This is one of the common issue with RTEs on web. Could you please guide me through how to: Paste as the PLAIN TEXT Retain the HTML but remove the WORD/HTML styling I want to do it directly on paste ...
Saim's user avatar
  • 2,503
38 votes
14 answers
79k views

How do I remove tinyMCE and then re-add it?

I am trying to add the tinyMCE editor to my page, remove it, then add it again but am getting errors. When I run Part A, then Part B, Than Part A again I get the error: Error: g.win.document is null ...
Justin808's user avatar
  • 21.2k
114 votes
15 answers
124k views

jQuery and TinyMCE: textarea value doesn't submit

I am using jQuery and TinyMCE to submit a form, but there is a problem in serialization in that the Textarea value doesn't post. Here is the code: <form id="myForm" method="post" action="post.php"...
Agus Puryanto's user avatar
52 votes
10 answers
140k views

Detect click event inside iframe

I'm writing a plugin for TinyMCE and have a problem with detecting click events inside an iframe. From my search I've come up with this: Loading iframe: <iframe src='resource/file.php?mode=...
Philip G's user avatar
  • 4,098
35 votes
7 answers
42k views

Why is ValidateInput(False) not working?

I am converting an application I created using webforms to the asp.net mvc framework using vb.net. I have a problem with one of my views. I get the yellow screen of death saying "A potentially ...
Dekryptid's user avatar
  • 1,072
29 votes
16 answers
60k views

Limit the number of character in tinyMCE

Im using tinyMCe for my project.Everything is working fine but now i want to restrict the number of character that will be insert into tinyMce textarea tinyMCE.init({ // General options mode : "...
Rakesh Shetty's user avatar
9 votes
4 answers
14k views

PHP to clean-up pasted Microsoft input

I have a site where users can post stuff (as in forums, comments, etc) using a customised implementation of TinyMCE. A lot of them like to copy & paste from Word, which means their input often ...
da5id's user avatar
  • 9,118
68 votes
5 answers
98k views

Getting the value from a TinyMCE textarea

I have a news editor for my site with which I am using TinyMCE. What I would like to be able to do is have a button (outside of the TinyMCE editor itself) that I can click to scan the textarea for ...
Sanfly's user avatar
  • 1,021
57 votes
13 answers
91k views

make readonly/disable tinymce textarea

I need to disable or make readonly a tinymce textarea at runtime.
Ahmed-Anas's user avatar
  • 5,511
35 votes
12 answers
64k views

How to automatic resize tinyMCE?

I have a TinyMCE that is set over a TextArea, and I want this editor area to ocuppy all the space of its parent div, all times. I have a JS function that get the current space and set the textarea....
igorsantos07's user avatar
  • 4,538
110 votes
11 answers
99k views

How to make tinymce paste in plain text by default

Googled it thousands of times, No one gives a complete solution of how to make Tinymce paste in plain text by default and strip out any formatting without clicking the "paste as text" button. Any ...
CodeOverload's user avatar
  • 47.7k
48 votes
11 answers
93k views

How to get the content of a Tinymce textarea with JavaScript

i have an array of content then how we get content of Tinymce textarea in javascript
pooja's user avatar
  • 2,374
44 votes
9 answers
100k views

Problem when retrieving text in JSON format containing line breaks with jQuery

I'm having a strange problem when retrieving JSON formatted text. I use jQuery post to send some data (also JSON formatted) to the server (running PHP) which works fine. Then, when I request the same ...
Morten Christiansen's user avatar
39 votes
6 answers
104k views

XML parser error: entity not defined

I have searched stackoverflow on this problem and did find a few topics, but I feel like there isn't really a solid answer for me on this. I have a form that users submit and the field's value is ...
NightHawk's user avatar
  • 3,631
36 votes
12 answers
57k views

What's the best way to set cursor/caret position?

If I'm inserting content into a textarea that TinyMCE has co-opted, what's the best way to set the position of the cursor/caret? I'm using tinyMCE.execCommand("mceInsertRawHTML", false, content); to ...
Daniel Bachhuber's user avatar
28 votes
12 answers
68k views

How can I remove p tags that are auto added within tinymce

I am using tinymce 4.0.1 and it automatically adds p tags when you either start typing or hit enter. How can I dynamically remove these p tags and then reinsert the content into the editor.
Juan Gonzales's user avatar
4 votes
6 answers
7k views

TinyMCE & Fancybox - editor won't work on second view

I've added TinyMCE to my project, and am using it on a text area which pops up in a fancybox. The first time I action it, it works fine, but if I then close it and try to open it again, it doesn't ...
Sharon's user avatar
  • 3,583
2 votes
6 answers
5k views

Unable to get TinyMCE working with jQuery Unobtrusive Validation

I've got a form that's using unobtrusive validation and works as expected for all of my fields but once I added TinyMCE (or any other WYSIWYG editor) the textarea it uses gets hidden and is preventing ...
Brian Surowiec's user avatar
42 votes
2 answers
52k views

TinyMce Allow all Html tag

I'm using TinyMce and even though the danger of a script attack, I need to enable all html tags with the editor. Currently, I'm use like: valid_elements: "@[class],p[style],h3,h4,h5,h6,a[href|target]...
E-A's user avatar
  • 1,995
20 votes
3 answers
37k views

Tiny MCE adding custom HTML tags

I am using Tiny 4.3.3 for MODx I need to add a <p class="classname"> <em class="openImg"></em> Some randome Input text by the user <em class="closeImg"></em> </p&...
Jonathan Thurft's user avatar
19 votes
7 answers
43k views

TinyMCE textarea and post form using ajax

I m using tinyMCE for textareas and POSTing form through AJAX. But when I m trying to save textarea value, it is taking old values on first click, but it takes updated values on second click. I have ...
Sanjay Panchal's user avatar
17 votes
10 answers
12k views

Tiny MCE popups blank in Django admin

I have got tinyMCE working in the django admin, but all the popups are blank (eg. edit HTML, add image) The paths to the popup html pages all exist in the right places http://thatch.media/js/...
Cato Johnston's user avatar
13 votes
3 answers
20k views

TinyMCE not sending value

Hi All It's the first time I've used Tiny Mce and I have a problem. Please Help The editor works fine in editing but when I click submit nothing is sent from the textarea input Here is the code: &...
SamarLover's user avatar
8 votes
5 answers
25k views

Setting up line-height via TinyMCE

Is there a way to give user possibility to easily changing line-height attribute of paragraph in tinyMCE editor? Something like its native "Font size" or "Format" <select> or anything else. I ...
avall's user avatar
  • 2,045
6 votes
2 answers
33k views

%22 (double quotes) added to url out of nowhere

I'm making a mail programm that wil be used to mail newsletters to customers, in the newsletters will be images and links. When I tested it on localhost everything worked fine and the links worked. ...
Daanvn's user avatar
  • 1,246
6 votes
4 answers
9k views

angular2 wysiwyg tinymce implementation and 2-way-binding

Hi I'm trying to implement tinymce into an angular 2 component for a small forum to create a new thread. I want the content of the textarea (tinymce) be 2-way-binded to a variable inside the component....
Han Che's user avatar
  • 8,299
3 votes
3 answers
8k views

Using Tinymce in Angular2 project

I'm trying to embed tinymce into my website which is built using Angular2. Following is my component: export class myComponent implements OnInit { //some code constructor(private af: ...
Yin's user avatar
  • 73
2 votes
2 answers
15k views

tinymce remove text spaces and line breaks

I have initialised tinyMCE like so: $('#description').tinymce({ // Location of TinyMCE script script_url : 'tinymce/jscripts/tiny_mce/tiny_mce.js', // General options ...
user avatar
47 votes
5 answers
54k views

Inserting text in TinyMCE Editor where the cursor is

I've been trying to insert text into the TinyMCE Editor at the focused paragraph element (<p>) exactly where the cursor is but got no luck!! var elem = tinyMCE.activeEditor.dom.get('tinymce'); ...
Ruba's user avatar
  • 877
21 votes
3 answers
31k views

How do i use TinyMCE jQuery package and what is the difference with TinyMCE jQuery plugin

I've seen this post What is the TinyMCE jQuery Package? which explains what the v4 TinyMCE jQuery package is but the post and the tinymce site only contain examples of v3. When I download the v4 ...
Andy's user avatar
  • 10.8k
20 votes
12 answers
38k views

Changing the default font family in TinyMCE

I've successfully changed the default font inside the editor using the documentation here but that leaves me with a problem. The original default font no longer works in the font drop down list. ...
Paul Fleming's user avatar
  • 24.4k
20 votes
3 answers
26k views

Magento - How to allow certain tags (iframe, embed) in Magento's CMS editor?

I would like to allow to enter certain html tags such as iframe and embed in Magento's CMS editor. Magento does not allow those tags. Is there a model or controller that I can edit to allow iframe ...
Moon's user avatar
  • 22.4k
17 votes
2 answers
31k views

TinyMCE and importing / copy paste from Microsoft Word

I am struggling to get an accurate answer on this questions on whether TinyMCE supports pasting from Microsoft word. I guess there may be a lot of out of date information on the web on this topic as I ...
leora's user avatar
  • 191k
15 votes
11 answers
9k views

TinyMCE instances in jquery sortable

I'm stumped and frustrated so time to ask for help. Done a lot of googling but yet to find a solution that works for me. What I have is a whole bunch of divs that can be sorted using Jquery sortable,...
Hayden's user avatar
  • 151
14 votes
2 answers
24k views

How to load html using jquery into a TinyMCE textarea

I've a textarea that uses TinyMCE as a WYSIWYG. Once that this textarea is loaded I want that, clicking a button "Edit" some html code that I bring with AJAX jquery is loaded in that textarea. I ...
user191687's user avatar
9 votes
2 answers
22k views

Add tinymce to new textarea dynamically

How can i do this function addTinyText(id, text){ //add textarea to DOM $('<textarea id="txt'+id+'"></textarea>').append(text).appendTo('body'); //init tineMCE tinyMCE.init({ ...
Luciuz's user avatar
  • 1,707
5 votes
2 answers
4k views

How to sanitize input from MCE in ASP.NET?

Is there a utility/function in C# to sanitize the source code of tinyMCE rich text. I would like to remove dangerous tags but like to whitelist safe html tags.
Gengar's user avatar
  • 123
2 votes
3 answers
12k views

How to input text into tinceMCE editior using selenium/webdriver

I am trying to automatically insert some text using Selenium/Webdriver into a text box created using tinymce The text box is not a plain vanilla textbox so following is not working: System.out....
Watt's user avatar
  • 3,134
128 votes
5 answers
91k views

Remove menu and status bars in TinyMCE 4

I am trying to remove the menu and status bars from TinyMCE 4 because I want to setup a very basic editor. Is this possible? The documentation for TinyMCE 3 does not seem to be relevant and I cannot ...
Tom Haigh's user avatar
  • 57.5k
52 votes
5 answers
44k views

TinyMCE is removing <style> tags

I'm facing a problem with TinyMCE. When I enter a style tag in the HTML editor of TinyMCE, it removes the tags when I click update. <style type="text/css"> .newclasss { color:#c9c9c9; } ...
jyoti's user avatar
  • 521
49 votes
5 answers
55k views

tinymce adding p tags automatically?

Im using tinymce and saving it to a database. When I edit the saved content using tinymce and save again, it inserts a p tag at the beginning. Editing the content over and over again leaves a large ...
panthro's user avatar
  • 23.3k
40 votes
13 answers
67k views

How do you set the focus of a TinyMCE textarea element?

I'm using TinyMCE for a textarea on a page but it doesn't play nice in the tabbing order of the other elements. I can use the following code to capture when I tab out of the first element: $('#title'...
Justin's user avatar
  • 4,223
33 votes
8 answers
52k views

Get value of tinymce textarea with jquery selector

I want to get the value of a tinymce textarea <textarea id="thetextarea"></textarea> on key up in order to feed it into a show-preview script using: function showPreview(value) { $(...
Joseph's user avatar
  • 1,734
29 votes
12 answers
42k views

TinyMCE width and height disobedient!

According to the (conflicting) documentation of TinyMCE, the editor takes on the size of the textarea (or other) element that it replaces. It also says that you can set the size of the editor by ...
Jimbo's user avatar
  • 22.6k
27 votes
2 answers
36k views

Wait for TinyMCE to load

I have these two lines of code one after another. tinymce.execCommand('mceAddControl',true,'email_body'); tinyMCE.activeEditor.setContent(data.tplCustom.htmltemplate); Second line tries to set ...
Pit Digger's user avatar
  • 9,658
20 votes
5 answers
38k views

How do I initialize TinyMCE on a ajax loaded textarea in 4.x?

I am upgrading to tinyMCE 4.x and I am attempting to initialize tinyMCE on a textarea loaded via AJAX. In 3.x I did something of the sort: TinyMCE - attach to divs loaded via AJAX calls but this does ...
Mike Dotterer's user avatar
16 votes
11 answers
40k views

Change tinyMce editor's height dynamically

I am using tinymce editor in my page. What I want to do is to change the height of the editor dynamically. I have created a function: function setComposeTextareaHeight() { $("#compose").height(...
Ansh's user avatar
  • 357
16 votes
6 answers
14k views

Google fonts and TinyMCE

Can google fonts be used with tinyMCE? how can this be done?
tzador's user avatar
  • 2,561

1
2 3 4 5
14