X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fjot-header.tpl;h=6195c5bbc6d4b506c4db89d3cb1374e9060f359e;hb=cdf2fe859f439a9d3689ea946e23d9aef1fb6cac;hp=8e671a0b3d55aebfc9009c0e764530392fcb63c5;hpb=5c9eb197679fc66378152c891904a0766e1ae621;p=friendica.git diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 8e671a0b3d..6195c5bbc6 100644 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -11,6 +11,7 @@ function initEditor(cb){ theme : "advanced", mode : "specific_textareas", editor_selector: /(profile-jot-text|prvmail-text)/, + auto_focus: "profile-jot-text", plugins : "bbcode,paste,autoresize", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", theme_advanced_buttons2 : "", @@ -187,8 +188,8 @@ function initEditor(cb){ function jotShare(id) { $('#like-rotator-' + id).show(); - $.get('share/' + id, function(data) { + if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ tinyMCE.execCommand('mceInsertRawHTML',false,data); $('#like-rotator-' + id).hide(); @@ -211,8 +212,11 @@ function initEditor(cb){ if(reply && reply.length) { $('#profile-rotator').show(); $.get('parse_url?url=' + reply, function(data) { - tinyMCE.execCommand('mceInsertRawHTML',false,data); - $('#profile-rotator').hide(); + if (!editor) $("#profile-jot-text").val(""); + initEditor(function(){ + tinyMCE.execCommand('mceInsertRawHTML',false,data); + $('#profile-rotator').hide(); + }); }); } }