prosemirror-state
Advanced tools
Comparing version 1.3.3 to 1.3.4
@@ -0,1 +1,7 @@ | ||
## 1.3.4 (2021-01-20) | ||
### Bug fixes | ||
Remove (broken, poorly conceptualized) `schema` option to `EditorState.reconfigure`. | ||
## 1.3.3 (2020-03-18) | ||
@@ -2,0 +8,0 @@ |
@@ -883,3 +883,3 @@ import { Slice, Fragment, Mark, Node } from 'prosemirror-model'; | ||
// schema:: ?Schema | ||
// The schema to use. | ||
// The schema to use (only relevant if no `doc` is specified). | ||
// | ||
@@ -898,3 +898,3 @@ // doc:: ?Node | ||
EditorState.create = function create (config) { | ||
var $config = new Configuration(config.schema || config.doc.type.schema, config.plugins); | ||
var $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins); | ||
var instance = new EditorState($config); | ||
@@ -916,9 +916,6 @@ for (var i = 0; i < $config.fields.length; i++) | ||
// | ||
// schema:: ?Schema | ||
// New schema to use. | ||
// | ||
// plugins:: ?[Plugin] | ||
// plugins:: [Plugin] | ||
// New set of active plugins. | ||
EditorState.prototype.reconfigure = function reconfigure (config) { | ||
var $config = new Configuration(config.schema || this.schema, config.plugins); | ||
var $config = new Configuration(this.schema, config.plugins); | ||
var fields = $config.fields, instance = new EditorState($config); | ||
@@ -925,0 +922,0 @@ for (var i = 0; i < fields.length; i++) { |
@@ -887,3 +887,3 @@ 'use strict'; | ||
// schema:: ?Schema | ||
// The schema to use. | ||
// The schema to use (only relevant if no `doc` is specified). | ||
// | ||
@@ -902,3 +902,3 @@ // doc:: ?Node | ||
EditorState.create = function create (config) { | ||
var $config = new Configuration(config.schema || config.doc.type.schema, config.plugins); | ||
var $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins); | ||
var instance = new EditorState($config); | ||
@@ -920,9 +920,6 @@ for (var i = 0; i < $config.fields.length; i++) | ||
// | ||
// schema:: ?Schema | ||
// New schema to use. | ||
// | ||
// plugins:: ?[Plugin] | ||
// plugins:: [Plugin] | ||
// New set of active plugins. | ||
EditorState.prototype.reconfigure = function reconfigure (config) { | ||
var $config = new Configuration(config.schema || this.schema, config.plugins); | ||
var $config = new Configuration(this.schema, config.plugins); | ||
var fields = $config.fields, instance = new EditorState($config); | ||
@@ -929,0 +926,0 @@ for (var i = 0; i < fields.length; i++) { |
{ | ||
"name": "prosemirror-state", | ||
"version": "1.3.3", | ||
"version": "1.3.4", | ||
"description": "ProseMirror editor state", | ||
@@ -27,4 +27,4 @@ "main": "dist/index.js", | ||
"prosemirror-test-builder": "^1.0.0", | ||
"rollup": "^1.26.3", | ||
"@rollup/plugin-buble": "^0.20.0" | ||
"rollup": "^2.26.3", | ||
"@rollup/plugin-buble": "^0.21.3" | ||
}, | ||
@@ -31,0 +31,0 @@ "scripts": { |
@@ -13,3 +13,3 @@ module.exports = { | ||
plugins: [require('@rollup/plugin-buble')()], | ||
external(id) { return !/^[\.\/]/.test(id) } | ||
external(id) { return id[0] != "." && !require("path").isAbsolute(id) } | ||
} |
@@ -170,3 +170,3 @@ import {Node} from "prosemirror-model" | ||
// schema:: ?Schema | ||
// The schema to use. | ||
// The schema to use (only relevant if no `doc` is specified). | ||
// | ||
@@ -185,3 +185,3 @@ // doc:: ?Node | ||
static create(config) { | ||
let $config = new Configuration(config.schema || config.doc.type.schema, config.plugins) | ||
let $config = new Configuration(config.doc ? config.doc.type.schema : config.schema, config.plugins) | ||
let instance = new EditorState($config) | ||
@@ -203,9 +203,6 @@ for (let i = 0; i < $config.fields.length; i++) | ||
// | ||
// schema:: ?Schema | ||
// New schema to use. | ||
// | ||
// plugins:: ?[Plugin] | ||
// plugins:: [Plugin] | ||
// New set of active plugins. | ||
reconfigure(config) { | ||
let $config = new Configuration(config.schema || this.schema, config.plugins) | ||
let $config = new Configuration(this.schema, config.plugins) | ||
let fields = $config.fields, instance = new EditorState($config) | ||
@@ -212,0 +209,0 @@ for (let i = 0; i < fields.length; i++) { |
Sorry, the diff of this file is not supported yet
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
294440
2988