summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/THtmlArea.php
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/UI/WebControls/THtmlArea.php')
-rw-r--r--framework/Web/UI/WebControls/THtmlArea.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/THtmlArea.php b/framework/Web/UI/WebControls/THtmlArea.php
index 383411c5..e5d62c58 100644
--- a/framework/Web/UI/WebControls/THtmlArea.php
+++ b/framework/Web/UI/WebControls/THtmlArea.php
@@ -413,6 +413,7 @@ class THtmlArea extends TTextBox
$scripts = $this->getPage()->getClientScript();
if(!$scripts->isScriptFileRegistered('prado:THtmlArea'))
$scripts->registerScriptFile('prado:THtmlArea', $this->getScriptUrl());
+ $scripts->registerPradoScript('htmlarea');
}
/**
@@ -422,7 +423,7 @@ class THtmlArea extends TTextBox
{
$scripts = $this->getPage()->getClientScript();
$options = TJavaScript::encode($this->getEditorOptions(),true,true); // Force encoding of empty strings
- $script = "if(typeof(tinyMCE)!='undefined')\r\n{ tinyMCE.init($options); }";
+ $script = "new Prado.WebUI.THtmlArea($options)";
$scripts->registerEndScript('prado:THtmlArea'.$this->ClientID,$script);
}