summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-07-21 17:22:36 +0000
committerctrlaltca@gmail.com <>2011-07-21 17:22:36 +0000
commitee0a68eddb3c63d072a1e9844522d58ea8b31757 (patch)
treed5aeca6606699ae0837adacfca4351184f15b840 /framework/Web/UI
parent6e62809df9632e1bc16f6564b4d8c10d08053f42 (diff)
added Gabor's HtmlArea registration patch (fixes #351)
Diffstat (limited to 'framework/Web/UI')
-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);
}