Note that there are some explanatory texts on larger screens.

plurals
  1. POinput value won't update
    primarykey
    data
    text
    <p>Ok, I've been trying to get this script to work but I just can't figure out what's wrong. I'm trying to get tinyMCE to take input from 2 fields using jquery dialogue and output it in specific format. Here is my tinyMCE plugin code:</p> <pre><code>(function() { tinymce.create('tinymce.plugins.RMFtooltip', { init : function(ed, url) { ed.addButton('RMFtooltip', { title : 'ToolTip', image : url+'/RMFtooltipbutton.png', onclick : function() { i = jQuery('&lt;div title="Create your tooltip" &gt;&lt;/div&gt;'); /*jQuery.get(url+'/ajax/form.html', function(data) { i.html(data); });*/ i.load(url+'/ajax/form.html'); i.dialog({ autoOpen: true, draggable: false, resizable: false, modal: true, buttons: { "OK": function() { RMFtooltip_text = jQuery("#RMFtooltip_text").val(); RMFtooltip_tip = jQuery("#RMFtooltip_tip").val(); if (RMFtooltip_text != null &amp;&amp; RMFtooltip_text != '' &amp;&amp; RMFtooltip_tip != null &amp;&amp; RMFtooltip_tip != ''){ ed.execCommand('mceInsertContent', false, '[tooltip tip="'+RMFtooltip_tip+'"]'+RMFtooltip_text+'[/tooltip]'); } jQuery( this ).dialog( "close" ); }, Cancel: function() { jQuery( this ).dialog( "destroy" ); } } }); ... </code></pre> <p>Now, the first time I click the button in tinyMCE everything works fine, but if I click it again I get the same out put no matter what the input is. eg: I enter foo in the text and bar in the tip and click ok, everything works fine (I get "[tooltip tip="bar"]foo[/tooltip]"), then I use it again, this time I enter blah in the text and blue in the tip, but I still get the same output ("[tooltip tip="bar"]foo[/tooltip]"). It seems that it doesn't re read the input... Please help</p> <hr> <p>PS: I'm using ajax to get the form (because this is a js file), I can attach it here but it doesn't seems like it could matter to me....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload