mirror of
https://github.com/yjs/yjs.git
synced 2025-12-29 00:25:01 +01:00
Merge pull request #153 from calibr/124-text-embeds
process embeds in YText.toDelta
This commit is contained in:
@@ -74,3 +74,16 @@ export const testBasicFormat = tc => {
|
||||
t.compare(delta, [{ retain: 1 }, { retain: 1, attributes: { bold: null } }])
|
||||
compare(users)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {t.TestCase} tc
|
||||
*/
|
||||
export const testGetDeltaWithEmbeds = tc => {
|
||||
const { users, text0 } = init(tc, { users: 1 })
|
||||
text0.applyDelta([{
|
||||
insert: {linebreak: "s"}
|
||||
}])
|
||||
t.compare(text0.toDelta(), [{
|
||||
insert: {linebreak: "s"}
|
||||
}])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user