diff --git a/django_prose_editor/static/django_prose_editor/init.js b/django_prose_editor/static/django_prose_editor/init.js index d9b3304..b17285f 100644 --- a/django_prose_editor/static/django_prose_editor/init.js +++ b/django_prose_editor/static/django_prose_editor/init.js @@ -1 +1 @@ -(()=>{var i="data-django-prose-editor-default";function O(o){if(o.closest(".prose-editor"))return;let r=JSON.parse(o.getAttribute(i)),{Document:n,Dropcursor:s,Gapcursor:l,Paragraph:a,HardBreak:c,Text:u,History:d,Blockquote:g,Bold:p,BulletList:h,Heading:k,HorizontalRule:b,Italic:f,ListItem:m,OrderedList:E,Strike:I,Subscript:T,Superscript:B,Underline:S,Link:_,Menu:D,menuItemsFromConfig:H,NoSpellCheck:L,Typographic:j,createTextareaEditor:y}=DjangoProseEditor,e=(t=>C=>t!=null&&t.length?t.includes(C):!0)(r.types),z=[n,s,l,a,c,u,r.history&&d,D.configure({menuItems:H(r)}),L,r.typographic&&j,e("blockquote")&&g,e("strong")&&p,e("bullet_list")&&h,e("heading")&&k,e("horizontal_rule")&&b,e("em")&&f,e("link")&&_.configure({openOnClick:!1}),(e("bullet_list")||e("ordered_list"))&&m,e("ordered_list")&&E,e("strikethrough")&&I,e("sub")&&T,e("sup")&&B,e("underline")&&S].filter(Boolean);return y(o,z)}DjangoProseEditor.initializeEditors(O,`[${i}]`);})(); +(()=>{var i="data-django-prose-editor-default";function q(o){if(o.closest(".prose-editor"))return;let r=JSON.parse(o.getAttribute(i)),{Document:n,Dropcursor:s,Gapcursor:l,Paragraph:a,HardBreak:u,Text:c,History:d,Blockquote:g,Bold:p,BulletList:h,Heading:b,HorizontalRule:k,Italic:m,ListItem:E,OrderedList:f,Strike:I,Subscript:T,Superscript:B,Underline:S,Link:_,Menu:D,menuItemsFromConfig:H,NoSpellCheck:L,Typographic:j,createTextareaEditor:y}=DjangoProseEditor,e=(t=>P=>t!=null&&t.length?t.includes(P):!0)(r.types),z=[n,s,l,a,u,c,r.history&&d,D.configure({menuItems:H(r)}),L,r.typographic&&j,e("blockquote")&&g,e("strong")&&p,e("bullet_list")&&h,e("heading")&&b,e("horizontal_rule")&&k,e("em")&&m,e("link")&&_,(e("bullet_list")||e("ordered_list"))&&E,e("ordered_list")&&f,e("strikethrough")&&I,e("sub")&&T,e("sup")&&B,e("underline")&&S].filter(Boolean);return y(o,z)}DjangoProseEditor.initializeEditors(q,`[${i}]`);})(); diff --git a/src/init.js b/src/init.js index 881f986..52e54c5 100644 --- a/src/init.js +++ b/src/init.js @@ -55,10 +55,7 @@ function createEditor(textarea) { isTypeEnabled("heading") && Heading, isTypeEnabled("horizontal_rule") && HorizontalRule, isTypeEnabled("em") && Italic, - isTypeEnabled("link") && - Link.configure({ - openOnClick: false, - }), + isTypeEnabled("link") && Link, (isTypeEnabled("bullet_list") || isTypeEnabled("ordered_list")) && ListItem, isTypeEnabled("ordered_list") && OrderedList, isTypeEnabled("strikethrough") && Strike,