User login

TinyMCE, iFrames, JQuery and Drupal scattered notes

Drag and drop into the TinyMCE textarea triggers onEvent twice in such close succession that it creates a race condition, and the same values for the length of the textarea before and after are given.

Getting around this by putting the character change check new value set before running the code. Maybe a timer check, or ideally a way to check the textarea with just a timer and not use onEvent at all, would be best.

I am trying very hard to make a plugin that needs to watch the text area, that is, simply run code that isn't triggered by a button. Is there a plugin that would have an example of this? Any other advice? Many thanks.

Was not a question to which I found a straightforward answer.

You can take a look at what all has been done with a
git clone http://git.agariclabs.com/git/other/tinymce-cleanword.git

Wait, replace and insert couldn't be this easy, could it?
tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent());
http://tinymce.moxiecode.com/punbb/viewtopic.php?id=12070

This is the way that uses

Resources

Many of these I haven't really gone through yet. The work in this case was more about figuring out TinyMCE than

Enumerating JavaScript Objects

JQuery selector for inline style property

http://jquery.bassistance.de/api-browser/#loadStringObjectFunction

http://www.w3schools.com/htmldom/met_win_settimeout.asp

JavaScript TinyMCE/jQuery race condition on firefox
http://stackoverflow.com/questions/346926/javascript-tinymce-jquery-race-condition-on-firefox

tinyMCE.execCommand('mceSetContent',false,theText);
http://markmail.org/message/p7v4xxrdrgrp6ndu

http://blog.rebeccamurphey.com/2009/01/12/jquery-validation-and-tinymce/

http://tinymce.moxiecode.com/punbb/viewtopic.php?id=8686

http://brian.pontarelli.com/2007/09/12/how-to-get-jquery-and-tinymce-to-work/

http://dev.jquery.com/wiki/Plugins/tinyMCE

Making JQuery work within an iFrame

We didn't use this approach, doing things from within TinyMCE instead.

http://query7.com/manipulation-in-jquery/

New jQuery Plugin - $.frameReady()
http://ideamill.synaptrixgroup.com/?p=6

How to access iframe in jQuery
http://simple.procoding.net/2008/03/21/how-to-access-iframe-in-jquery/

http://jquery.bassistance.de/api-browser/#loadStringObjectFunction

From Drupaler Nate Haug, how to access things in an iFrame with JQuery:
http://quicksketch.org/node/263

Resolution

Searched words: 
jquery refresh

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.