X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Fjot-header.tpl;h=eb74c31dad41466d3ba270aaf088564e053427d4;hb=20d4fda22f26a99e7da930be639874f80ae7060d;hp=8e671a0b3d55aebfc9009c0e764530392fcb63c5;hpb=abc01cad20f599a205e5c2534936092f6820e702;p=friendica.git diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 8e671a0b3d..eb74c31dad 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 : "", @@ -141,7 +142,7 @@ function initEditor(cb){ if(reply && reply.length) { reply = bin2hex(reply); $('#profile-rotator').show(); - $.get('parse_url?url=' + reply, function(data) { + $.get('parse_url?binurl=' + reply, function(data) { tinyMCE.execCommand('mceInsertRawHTML',false,data); $('#profile-rotator').hide(); }); @@ -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(); + }); }); } }