fix #11285: Pasting HTML into Code Editor in IE

This commit is contained in:
Doug Bell 2010-02-11 14:48:20 -06:00
parent c785474fb4
commit 0041aee54b
4 changed files with 454 additions and 39 deletions

View file

@ -169,6 +169,9 @@ sub toHtml {
$style->setScript($url->extras("yui/build/resize/resize-min.js"),{type=>"text/javascript"});
$style->setScript($url->extras("yui/build/editor/editor-min.js"),{type=>"text/javascript"});
$style->setScript($url->extras("yui-webgui/build/code-editor/code-editor.js"),{type=>"text/javascript"});
#$style->setLink($url->extras("yui/build/logger/assets/logger.css"), {type=>"text/css", rel=>"stylesheet"});
#$style->setLink($url->extras("yui/build/logger/assets/skins/sam/logger.css"), {type=>"text/css", rel=>"stylesheet"});
#$style->setScript($url->extras("yui/build/logger/logger.js"),{type=>"text/javascript"});
my $codeCss = $url->extras("yui-webgui/build/code-editor/code.css");
my $out = <<"END_HTML";
<textarea id="$id" name="$name" $extras rows="10" cols="60" style="font-family: monospace; $styleAttr; height: 100%; width: 100%; resize: none;">$value</textarea>
@ -177,6 +180,8 @@ sub toHtml {
YAHOO.util.Event.onDOMReady( function () {
var myeditor = new YAHOO.widget.CodeEditor('${id}', { handleSubmit: true, css_url: '${codeCss}', height: '${height}px', width: '${width}px', status: true, resize: true });
myeditor.render();
//var myLogReader = new YAHOO.widget.LogReader();
} );
}());
</script>