Commit 51d1516d authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix wysiwyg element to allow pieforms autofocus to work on tinymce instances


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent f237dffc
......@@ -101,6 +101,9 @@ function pieform_element_wysiwyg_get_headdata() {
. "\nPieformManager.connect('onload', null, function() {\n";
foreach ($_PIEFORM_WYSIWYGS as $editor) {
$result .= " tinyMCE.execCommand('mceAddControl', false, '$editor');\n";
$result .= " $('{$editor}').focus = function() {\n";
$result .= " tinyMCE.execCommand('mceFocus', false, '$editor');\n";
$result .= " };\n";
}
$result .= "});\nPieformManager.connect('onreply', null, function() {\n";
foreach ($_PIEFORM_WYSIWYGS as $editor) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment