This commit is contained in:
Kevin Jahns
2025-10-29 02:43:08 +01:00
parent 029aba44c3
commit 61e3459745
2 changed files with 1 additions and 2 deletions

View File

@@ -301,7 +301,6 @@ export const testUndoXml = tc => {
textchild.format(3, 4, { bold: {} }) textchild.format(3, 4, { bold: {} })
t.compare(xml0.getContentDeep(), delta.create('UNDEFINED').insert([delta.text().insert('con').insert('tent', { bold: true }).done()]).done()) t.compare(xml0.getContentDeep(), delta.create('UNDEFINED').insert([delta.text().insert('con').insert('tent', { bold: true }).done()]).done())
t.assert(xml0.toString() === '<undefined><p>con<bold>tent</bold></p></undefined>') t.assert(xml0.toString() === '<undefined><p>con<bold>tent</bold></p></undefined>')
debugger
undoManager.undo() undoManager.undo()
t.assert(xml0.toString() === '<undefined><p>content</p></undefined>') t.assert(xml0.toString() === '<undefined><p>content</p></undefined>')
undoManager.redo() undoManager.redo()

View File

@@ -1439,7 +1439,7 @@ export const testTypesAsEmbed = tc => {
text0.applyDelta(delta.create() text0.applyDelta(delta.create()
.insert([new Y.Map([['key', 'val']])]) .insert([new Y.Map([['key', 'val']])])
) )
t.compare(/** @type {any} */ (text0).getContentDeep().toJSON().children, [{ type: 'insert', insert: [{ attrs: { key: { type: 'insert', value: 'val' } }}] }]) t.compare(/** @type {any} */ (text0).getContentDeep().toJSON().children, [{ type: 'insert', insert: [{ attrs: { key: { type: 'insert', value: 'val' } } }] }])
let firedEvent = false let firedEvent = false
text1.observe(event => { text1.observe(event => {
const d = event.deltaDeep const d = event.deltaDeep