fix: expose accordion contents and add clear insert actions (1.8.3)
This commit is contained in:
1 parent
a108e7d143
commit
a3029966cb
12 files changed
+257
-18
No files matched your search
@@ -224,6 +224,17 @@ test('v6 containers accept only their own children and an accordion starts with
|
||||
assert.equal(canContain(block, { type: 'accordionitem' }), true);
|
||||
assert.equal(canContain({ type: 'section', children: [] }, { type: 'accordionitem' }), false);
|
||||
assert.equal(canContain(block.children[0], { type: 'text' }), true);
|
||||
// Selecting the group must not silently put a text outside it. Choose the entry first.
|
||||
assert.equal(insertionTarget(history.document, accordion, 'text'), null);
|
||||
assert.equal(insertBlock(history.document, 'text', accordion), null);
|
||||
const entry = block.children[0].id;
|
||||
const text = history.change(doc => insertBlock(doc, 'text', entry));
|
||||
assert.equal(locate(history.document.blocks, text).parent.id, entry);
|
||||
history.undo();
|
||||
assert.equal(locate(history.document.blocks, entry).block.children.length, 0);
|
||||
history.redo();
|
||||
assert.equal(locate(history.document.blocks, text).parent.id, entry);
|
||||
history.undo();
|
||||
|
||||
// A logo strip takes images only, like a gallery.
|
||||
const logos = history.change(doc => insertBlock(doc, 'logos', 's2'));
|
||||
|
||||
Reference in new issue
Block a user