Skip to content

Build your personal knowledge base with Trilium Notes

text editor/collapsible: allow reordering

Adorian Doran8c2614dafe71
diff --git a/packages/ckeditor5-collapsible/src/collapsibleediting.ts b/packages/ckeditor5-collapsible/src/collapsibleediting.ts
index 343b3e5761..beacdb80be 100644
--- a/packages/ckeditor5-collapsible/src/collapsibleediting.ts
+++ b/packages/ckeditor5-collapsible/src/collapsibleediting.ts
@@ -40,7 +40,11 @@ export default class CollapsibleEditing extends Plugin {
schema.register("summary", {
allowIn: "details",
- allowContentOf: "$block"
+ allowContentOf: "$block",
+ // Marking as a block lets MoveBlockUpDownPlugin (and any other block-level
+ // command) resolve the caret-in-summary case to the enclosing <details>
+ // via its walk-up-to-top-level-block logic.
+ isBlock: true
});
// Conversion ----------------------------------------------------------
@@ -169,6 +173,7 @@ export default class CollapsibleEditing extends Plugin {
event.preventDefault();
event.stopPropagation();
}, true);
+
});
// Suppress the native click-to-toggle on <summary> in the editor — only the