X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/28228fc438edfd3275ce50a90bd3f87180344036..a762ebd5cfcee80c43074973566c84f7a1cab0c6:/redakcja/static/js/wiki/view_editor_wysiwyg.js diff --git a/redakcja/static/js/wiki/view_editor_wysiwyg.js b/redakcja/static/js/wiki/view_editor_wysiwyg.js index 01deb58f..3ec4f701 100644 --- a/redakcja/static/js/wiki/view_editor_wysiwyg.js +++ b/redakcja/static/js/wiki/view_editor_wysiwyg.js @@ -206,7 +206,7 @@ if($('div.html-editarea textarea')[0]) { var specialCharsContainer = $("
Zamknij
"); - var specialChars = ['Ą','ą','Ć','ć','Ę','ę','Ł','ł','Ń','ń','Ó','ó','Ś','ś','Ż','ż','Ź','ź','Á','á','À','à', + var specialChars = [' ', 'Ą','ą','Ć','ć','Ę','ę','Ł','ł','Ń','ń','Ó','ó','Ś','ś','Ż','ż','Ź','ź','Á','á','À','à', 'Â','â','Ä','ä','Å','å','Ā','ā','Ă','ă','Ã','ã', 'Æ','æ','Ç','ç','Č','č','Ċ','ċ','Ď','ď','É','é','È','è', 'Ê','ê','Ë','ë','Ē','ē','Ě','ě','Ġ','ġ','Ħ','ħ','Í','í','Î','î', @@ -524,6 +524,7 @@ $('.accept-button', $overlay).click(function(){ save(); + $(document).unbind('click.blur-overlay'); }); $(document).bind('click.blur-overlay', function(event){ @@ -618,7 +619,16 @@ xml2html({ xml: this.doc.text, success: function(element){ - $('#html-view').html(element); + var htmlView = $('#html-view'); + htmlView.html(element); + htmlView.find('*[x-node]').dblclick(function(e) { + if($(e.target).is('textarea')) + return; + var selection = window.getSelection(); + selection.collapseToStart(); + selection.modify('extend', 'forward', 'word'); + e.stopPropagation(); + }); _finalize(success); }, error: function(text, source){