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 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror UI components", "description": "Wax prosemirror UI components",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror core", "description": "Wax prosemirror core",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
...@@ -62,9 +62,10 @@ export default props => { ...@@ -62,9 +62,10 @@ export default props => {
const dispatchTransaction = transaction => { const dispatchTransaction = transaction => {
const { TrackChange } = props; const { TrackChange } = props;
const tr = TrackChange.enabled const tr =
? trackedTransaction(transaction, view.state, user) TrackChange && TrackChange.enabled
: transaction; ? trackedTransaction(transaction, view.state, user)
: transaction;
const state = view.state.apply(tr); const state = view.state.apply(tr);
view.updateState(state); view.updateState(state);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror layouts", "description": "Wax prosemirror layouts",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror plugins", "description": "Wax prosemirror plugins",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror schema", "description": "Wax prosemirror schema",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror services", "description": "Wax prosemirror services",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
import { Schema as PmPschema } from "prosemirror-model"; import { Schema as PmPschema } from 'prosemirror-model';
import { injectable } from "inversify"; import { injectable } from 'inversify';
import DefaultSchema from "./DefaultSchema"; import DefaultSchema from './DefaultSchema';
import Node from "./Node"; import Node from './Node';
import Mark from "./Mark"; import Mark from './Mark';
@injectable() @injectable()
export default class Schema { export default class Schema {
...@@ -60,7 +60,7 @@ export default class Schema { ...@@ -60,7 +60,7 @@ export default class Schema {
return this._nodes[instance.name] return this._nodes[instance.name]
? this._nodes[instance.name] ? this._nodes[instance.name]
: Object.assign(this._nodes, { : Object.assign(this._nodes, {
[instance.name]: instance [instance.name]: instance,
}); });
} }
...@@ -68,7 +68,7 @@ export default class Schema { ...@@ -68,7 +68,7 @@ export default class Schema {
return this._marks[instance.name] return this._marks[instance.name]
? this._marks[instance.name] ? this._marks[instance.name]
: Object.assign(this._marks, { : Object.assign(this._marks, {
[instance.name]: instance [instance.name]: instance,
}); });
} }
} }
...@@ -76,7 +76,7 @@ export default class Schema { ...@@ -76,7 +76,7 @@ export default class Schema {
addProsemirrorSchema(nodes, type) { addProsemirrorSchema(nodes, type) {
this.prosemirrorSchema[type] = Object.assign( this.prosemirrorSchema[type] = Object.assign(
this.prosemirrorSchema[type], this.prosemirrorSchema[type],
nodes nodes,
); );
} }
...@@ -94,7 +94,7 @@ export default class Schema { ...@@ -94,7 +94,7 @@ export default class Schema {
this.schema = new PmPschema({ this.schema = new PmPschema({
nodes: Object.assign(nodes, this.prosemirrorSchema.nodes), nodes: Object.assign(nodes, this.prosemirrorSchema.nodes),
marks: Object.assign(marks, this.prosemirrorSchema.marks) marks: Object.assign(marks, this.prosemirrorSchema.marks),
}); });
return this.schema; return this.schema;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror themes", "description": "Wax prosemirror themes",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "build": "BABEL_ENV=production rollup -c"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"version": "0.0.14", "version": "0.0.14",
"description": "Wax prosemirror utilities", "description": "Wax prosemirror utilities",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "BABEL_ENV=production rollup -c" "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