tinymce

Limit Paste in TinyMCE

I have a TinyMCE widget that is limited to only <p> tags and non-block-level elements. Thus, the user is unable to insert tags like <div> or <table>. Which is the desired behavior. However, the user can copy any content from any web page and paste it to TinyMCE. Is there a way to prevent pasting there, or better yet, limit paste to only...

How can I make a silent mode for TinyMCE editor

I want to create TinyMCE editor on the page, but it should boot and render only after focus on action. How can I do that, please, can you give advice to me. Recession Page may have include scores TinyMCE elements, and page will hang. Therefore, the field should be converted into TinyMCE as needed, initially it's just textarea. ...

tinyMCE simple syntax highlighting

I want a simple real-time syntax highlighting in a tinyMce editor. I want to highlight (change background or color of the text) for every #{keyword} and #{more keywords} in the text. Keyword can only contain letters, numbers and dots (.). I don't know if my idea is good: bind to onChange event of the editor remove all occurrences of <s...

How to enable copy/paste formatted text from Lotus Notes to TinyMCE?

This question was previously posted to the TinyMCE HowTo Forum with no responses. Here's hoping that someone out there has encountered (and solved) this issue. The question: Is there some way to enable correct copy/paste of formatted text from a Lotus Notes email directly into TinyMCE? The scenario: A rolling comments system on a web s...

TinyMCE adds closing div

Greetings, I want to know if it is possible to stop tinyMCE from adding closing divs to the text. For example if I enter this text: <div id="content"> <div id="section-content"> <h3>Our Work</h3> It then becomes this: <div id="content"> <div id="section-content"> <h3>Our Work</h3> </div> </div> I do not want those 2 closing divs ...

javascript html editor copy/paste problem

We run some large directories where users often copy/paste content from word documents etc into our TinyMCE html editor. The problem with this is often the following text for example gets hidden there which shows up on our webpages: <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; ...

tiny mce valid elements end tag

I have a custom tag like this: <content name="Home" /> When I click the Html button of the TinyMCE it was replaced with <content name="Home"></content> Currently my settings are: valid_elements: "content[name]" What should I put in the valid_elements variable so that the tag will will be: <content name="Home" />? ...

How to disable tinymce's textarea.

I've tried all of the following: $(#"tbxNote").attr("disabled", "disabled"); ////doesn't work $(#"tbxNote").attr("disabled", "true"); //doesn't work either :) tinyMCE.init( mode: "none" ); //throws an error This is how I'm loading tinymce: //load tinymce plugin $('#tbxNote').tinymce({ // Location of TinyMCE scrip...

Add a button after loading TinyMCE via JQuery and it's not working

I'm loading TinyMCE via JQuery and after it's loaded, I'd like to add a save button to it. The save button is calling a function but Firebug says the function is not defined, in this case destroyTinyMCE() is not defined. What's wrong? $('div#introText').click(function() { loadTinyMCE(); $('div#introText').after('<input v...

how change content by CHANGE event and save/hold last cursor position

I want clear content by change event and save last cursor position ed.onChange.add(function(ed, o) { var newContent = o.content.replace(/SOMEREGEXP/ig, ""); ed.setContent(newContent); //ed.selection.select(ed.getBody(), true); //ed.selection.collapse(false); }); How can this do? ...

Why TinyMCE's getContent() returns epmty string if content is several space/&nbsp;

Why TinyMCE's getContent() returns empty string if content is several space? If my content contain only spaces, then getContent() method return empty string. I want count up chars in TinyMCE's body. ...

tinyMCE to AS3 htmlText

I'm using tinyMCE to edit/markup text in a Zend Framework backend. I'd like to use the generated HTML in a Flash AS3 Application. The problem is that Flash doesn't support attributes in <span>'s, <em> tags, <strong> tags etc. I guess there are two possibilities here: change the tinyMCE config so it uses font-tags instead of span's, <b...

How to keep TinyMCE after postback in an UpdatePanel

When I click a button that causes a postback on the UpdatePanel it calls the tinyMCE.triggerSave(). It reloads the panel and the editor show up again, but when I try to call tinyMCE.triggerSave() the second time I get the following error: g.win.document is null I though it was getting the old instance, but I'm also removing the contr...

tinyMCE wrap element in a div

Hi all, I am using tinymce 3.3.6 (in Drupal) and I need a way to highlight multiple paragraphs and wrap them in a new div with a class. e.g. <p>bob</p> <p>bob</p> <p>bob</p> will become (after highlighting and doing something) <div class="accordion"> <p>bob</p> <p>bob</p> <p>bob</p> </div> At the moment, if I just highlight every...

django grappelli, filebrowser and Tiny MCE insert image dialog

So, I found django admin interface called 'grappelli'. Looked at the screenshots and decided that I like it. Went to sources page and checked out trunk. Set it up and noticed that it looks nothing like screenshots. No dashboard, no side panel, different colors of the elements and model item lists are very narrow. From that point I'm won...

how to make tiny mce editor transparent ?

Hi All ! I want to make my tiny mce's editor's background transparent. I tried to edit the Ui.css and content.css for advanced themes. but no luck. I tried to add allowTransparency:"allowTransparency", after frameBorder:"0", but this also could not help. How to do this ? Thanks in advance. ...

Highlight/Format textareas

I'm looking to implement a live diff inside a webpage that preserves whitespace. I've done something similar in the past using a combination of TinyMCE and JQuery in IE6 (required for that project) but it didn't preserve whitespace. (It wasn't supposed to, but I didn't add anything to make it do that, it just did). TinyMCE wasn't idea...

paste_preprocess tinymce issue

i want to strip all the html tags when pasting in tinymce editor. following is the code which is not functional... following is the tinymce settings... the paste_preprocess callback is not trigering... am i missing some option..? tinyMCESettings = [ { mode : "none,textareas", height:heightEditor, width:'100%', ...

TinyMCE: Nested lists if tab key is pressed

if you create an unordered list in tinymce and hit the tab key the code created looks like this: <ul> <li><span style="white-space: pre;"> </span>list item 1</li> </ul> however, if you click on the indent button in the editor's toolbar (instead of the tab key), the following code is created: <ul> <li>list item 1 <ul> <li>list item 1....

TinyMCE: Enable Individual Buttons

Can I add individual buttons? I would like to give the user control, but not too much control so I need to enable some buttons but disable others. Can this be done? ...