]> git.0d.be Git - panikdb.git/commitdiff
wiki: instruct browser to insert paragraphs
authorFrédéric Péters <fpeters@0d.be>
Sat, 20 Jun 2020 17:22:58 +0000 (19:22 +0200)
committerFrédéric Péters <fpeters@0d.be>
Sat, 20 Jun 2020 17:22:58 +0000 (19:22 +0200)
(this was worked around before, and note sure it's really a good way as
execCommand use should be reduced)

panikdb/static/js/combo.wiki.js

index 71d13aa3842026281ce9dd54f5acabd193f50163..680fc851142646d19a491228d49f70fbd3179326 100644 (file)
@@ -137,6 +137,7 @@ function auto_anchors() {
       $image_upload.on('change', upload_image);
       $image_upload.appendTo(document.body);
 
+      document.execCommand('defaultParagraphSeparator', false, 'p');
       $(document).on('click', 'div.figure span.empty', function() {
         window.active_figure = this.parentNode;
         $('#image-upload').trigger('click');