🐛 fix for #187
This commit is contained in:
@@ -802,10 +802,25 @@ export class YText extends AbstractType {
|
||||
}
|
||||
case ContentEmbed:
|
||||
packStr()
|
||||
ops.push({
|
||||
/**
|
||||
* @type {Object<string,any>}
|
||||
*/
|
||||
const attributes = {}
|
||||
let addAttributes = false;
|
||||
for (const [key, value] of currentAttributes) {
|
||||
addAttributes = true;
|
||||
attributes[key] = value
|
||||
}
|
||||
/**
|
||||
* @type {Object<string,any>}
|
||||
*/
|
||||
const op = {
|
||||
insert: /** @type {ContentEmbed} */ (n.content).embed
|
||||
})
|
||||
break
|
||||
}
|
||||
if(addAttributes) {
|
||||
op.attributes = attributes
|
||||
}
|
||||
ops.push(op)
|
||||
case ContentFormat:
|
||||
if (isVisible(n, snapshot)) {
|
||||
packStr()
|
||||
|
||||
Reference in New Issue
Block a user