Adapted GUI: display user fields in tinymce-editor on doubleclick

Signed-off-by: Cris <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2020-06-02 16:31:52 +02:00
parent 2906c1803e
commit 8304b4a1ae
+15
View File
@@ -78,6 +78,21 @@ $(document).ready(function ()
});
}
if ($("#user_fields"))
{
$("#user_fields").dblclick(function ()
{
if ($("#bodyTextArea"))
{
//if editor active add at cursor position, otherwise at end
if (tinymce.activeEditor.id === "bodyTextArea")
tinymce.activeEditor.execCommand('mceInsertContent', false, $(this).children(":selected").val());
else
tinyMCE.get("bodyTextArea").setContent(tinyMCE.get("bodyTextArea").getContent() + $(this).children(":selected").val());
}
});
}
if ($("#recipients"))
{
$("#recipients").change(tinymcePreviewSetContent);