@bangle.dev/core
Advanced tools
Comparing version 0.30.0-alpha.1 to 0.30.0-alpha.2
@@ -482,3 +482,8 @@ import * as pmHistory from '@bangle.dev/pm'; | ||
}); | ||
this.pmState = EditorState.create(Object.assign({ schema, doc: createDocument({ schema, content: initialValue }), plugins: pmPlugins }, pmStateOpts)); | ||
this.pmState = EditorState.create({ | ||
schema, | ||
doc: createDocument({ schema, content: initialValue }), | ||
plugins: pmPlugins, | ||
...pmStateOpts, | ||
}); | ||
} | ||
@@ -518,6 +523,11 @@ } | ||
} | ||
this.view = new EditorView(element, Object.assign({ state: state.pmState, dispatchTransaction: (transaction) => { | ||
this.view = new EditorView(element, { | ||
state: state.pmState, | ||
dispatchTransaction: (transaction) => { | ||
const newState = this.view.state.apply(transaction); | ||
this.view.updateState(newState); | ||
}, attributes: { class: 'bangle-editor' } }, pmViewOpts)); | ||
}, | ||
attributes: { class: 'bangle-editor' }, | ||
...pmViewOpts, | ||
}); | ||
if (focusOnInit) { | ||
@@ -779,3 +789,6 @@ this.focusView(); | ||
function updateAttrs(pos, node, newAttrs, tr) { | ||
return tr.setNodeMarkup(pos, undefined, Object.assign(Object.assign({}, node.attrs), newAttrs)); | ||
return tr.setNodeMarkup(pos, undefined, { | ||
...node.attrs, | ||
...newAttrs, | ||
}); | ||
} | ||
@@ -782,0 +795,0 @@ |
{ | ||
"name": "@bangle.dev/core", | ||
"version": "0.30.0-alpha.1", | ||
"version": "0.30.0-alpha.2", | ||
"homepage": "https://bangle.dev", | ||
@@ -33,8 +33,8 @@ "authors": [ | ||
"dependencies": { | ||
"@bangle.dev/pm-commands": "0.30.0-alpha.1", | ||
"@bangle.dev/shared-types": "0.30.0-alpha.1", | ||
"@bangle.dev/utils": "0.30.0-alpha.1" | ||
"@bangle.dev/pm-commands": "0.30.0-alpha.2", | ||
"@bangle.dev/shared-types": "0.30.0-alpha.2", | ||
"@bangle.dev/utils": "0.30.0-alpha.2" | ||
}, | ||
"devDependencies": { | ||
"@bangle.dev/pm": "0.30.0-alpha.1", | ||
"@bangle.dev/pm": "0.30.0-alpha.2", | ||
"@types/jest": "^27.5.2", | ||
@@ -41,0 +41,0 @@ "@types/markdown-it": "^12.2.3", |
@@ -18,3 +18,2 @@ // components | ||
export { doc, editorStateCounter, history, paragraph, text }; | ||
export const criticalComponents = { | ||
@@ -21,0 +20,0 @@ doc, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125915
3568
+ Added@bangle.dev/pm@0.30.0-alpha.2(transitive)
+ Added@bangle.dev/pm-commands@0.30.0-alpha.2(transitive)
+ Added@bangle.dev/shared-types@0.30.0-alpha.2(transitive)
+ Added@bangle.dev/utils@0.30.0-alpha.2(transitive)
- Removed@bangle.dev/pm@0.30.0-alpha.1(transitive)
- Removed@bangle.dev/pm-commands@0.30.0-alpha.1(transitive)
- Removed@bangle.dev/shared-types@0.30.0-alpha.1(transitive)
- Removed@bangle.dev/utils@0.30.0-alpha.1(transitive)