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

Wait, replace and insert couldn't be this easy, could it?

This is the way that uses


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

JavaScript TinyMCE/jQuery race condition on firefox


Making JQuery work within an iFrame

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

New jQuery Plugin - $.frameReady()

How to access iframe in jQuery

From Drupaler Nate Haug, how to access things in an iFrame with JQuery:


Searched words: 
jquery refresh


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>
  • Lines and paragraphs break automatically.

More information about formatting options

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