Skip to content
Snippets Groups Projects
Commit 4bedb047 authored by chris's avatar chris
Browse files

check for track change enable service

parent d3cb7547
No related branches found
No related tags found
1 merge request!150Various improvments
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror UI components",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror core",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
......@@ -62,9 +62,10 @@ export default props => {
const dispatchTransaction = transaction => {
const { TrackChange } = props;
const tr = TrackChange.enabled
? trackedTransaction(transaction, view.state, user)
: transaction;
const tr =
TrackChange && TrackChange.enabled
? trackedTransaction(transaction, view.state, user)
: transaction;
const state = view.state.apply(tr);
view.updateState(state);
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror layouts",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror plugins",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror schema",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror services",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
import { Schema as PmPschema } from "prosemirror-model";
import { injectable } from "inversify";
import DefaultSchema from "./DefaultSchema";
import { Schema as PmPschema } from 'prosemirror-model';
import { injectable } from 'inversify';
import DefaultSchema from './DefaultSchema';
import Node from "./Node";
import Mark from "./Mark";
import Node from './Node';
import Mark from './Mark';
@injectable()
export default class Schema {
......@@ -60,7 +60,7 @@ export default class Schema {
return this._nodes[instance.name]
? this._nodes[instance.name]
: Object.assign(this._nodes, {
[instance.name]: instance
[instance.name]: instance,
});
}
......@@ -68,7 +68,7 @@ export default class Schema {
return this._marks[instance.name]
? this._marks[instance.name]
: Object.assign(this._marks, {
[instance.name]: instance
[instance.name]: instance,
});
}
}
......@@ -76,7 +76,7 @@ export default class Schema {
addProsemirrorSchema(nodes, type) {
this.prosemirrorSchema[type] = Object.assign(
this.prosemirrorSchema[type],
nodes
nodes,
);
}
......@@ -94,7 +94,7 @@ export default class Schema {
this.schema = new PmPschema({
nodes: Object.assign(nodes, this.prosemirrorSchema.nodes),
marks: Object.assign(marks, this.prosemirrorSchema.marks)
marks: Object.assign(marks, this.prosemirrorSchema.marks),
});
return this.schema;
}
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror themes",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
......@@ -4,7 +4,7 @@
"version": "0.0.14",
"description": "Wax prosemirror utilities",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment