diff options
Diffstat (limited to 'framework/Web/UI/WebControls')
-rw-r--r-- | framework/Web/UI/WebControls/THtmlArea.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php index efe3e6d9..19971eed 100644 --- a/framework/Web/UI/WebControls/THtmlArea.php +++ b/framework/Web/UI/WebControls/THtmlArea.php @@ -289,6 +289,7 @@ class THtmlArea extends TTextBox $this->loadJavascriptLibrary();
if($this->getEnableCompression())
$this->preLoadCompressedScript();
+ $this->applyJavascriptFixes();
}
/**
@@ -350,6 +351,27 @@ class THtmlArea extends TTextBox }
/**
+ * Changes the TinyMCE triggerSave() function to allow for missing textareas.
+ */
+ protected function applyJavascriptFixes()
+ {
+ $scripts = $this->getPage()->getClientScript();
+ $js = <<<EOD
+if(typeof(tinyMCE)!='undefined')
+{
+ TinyMCE_Control.prototype.triggerSave_old = TinyMCE_Control.prototype.triggerSave;
+ TinyMCE_Control.prototype.triggerSave = function(skip_cleanup, skip_callback)
+ {
+ if(this.getDoc()!=null)
+ this.triggerSave_old(skip_cleanup, skip_callback);
+ }
+}
+EOD;
+ if(!$scripts->isEndScriptRegistered('prado:THtmlArea:fix'))
+ $scripts->registerEndScript('prado:THtmlArea:fix', $js);
+ }
+
+ /**
* Registers the editor javascript file and code to initialize the editor.
*/
protected function registerEditorClientScript($writer)
|