@tiptap/core
Advanced tools
Comparing version 2.0.0-beta.9 to 2.0.0-beta.10
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-beta.10](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-beta.9...@tiptap/core@2.0.0-beta.10) (2021-03-31) | ||
**Note:** Version bump only for package @tiptap/core | ||
# [2.0.0-beta.9](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-beta.8...@tiptap/core@2.0.0-beta.9) (2021-03-28) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { EditorState, Plugin, Transaction } from 'prosemirror-state'; | ||
import { EditorState, Plugin, PluginKey, Transaction } from 'prosemirror-state'; | ||
import { EditorView } from 'prosemirror-view'; | ||
@@ -67,3 +67,3 @@ import { Schema, Node } from 'prosemirror-model'; | ||
*/ | ||
unregisterPlugin(name: string): void; | ||
unregisterPlugin(nameOrPluginKey: string | PluginKey): void; | ||
/** | ||
@@ -70,0 +70,0 @@ * Creates an extension manager. |
@@ -6,3 +6,4 @@ import { Plugin, Transaction } from 'prosemirror-state'; | ||
import { Node } from './Node'; | ||
import { GlobalAttributes, RawCommands, ExtensionConfig } from './types'; | ||
import { GlobalAttributes, RawCommands } from './types'; | ||
import { ExtensionConfig } from '.'; | ||
declare module '@tiptap/core' { | ||
@@ -9,0 +10,0 @@ interface ExtensionConfig<Options = any> { |
@@ -5,3 +5,4 @@ import { DOMOutputSpec, MarkSpec, Mark as ProseMirrorMark, MarkType } from 'prosemirror-model'; | ||
import { InputRule } from 'prosemirror-inputrules'; | ||
import { Attributes, RawCommands, GlobalAttributes, MarkConfig } from './types'; | ||
import { Attributes, RawCommands, GlobalAttributes } from './types'; | ||
import { MarkConfig } from '.'; | ||
import { Editor } from './Editor'; | ||
@@ -8,0 +9,0 @@ declare module '@tiptap/core' { |
@@ -5,3 +5,4 @@ import { DOMOutputSpec, NodeSpec, Node as ProseMirrorNode, NodeType } from 'prosemirror-model'; | ||
import { InputRule } from 'prosemirror-inputrules'; | ||
import { Attributes, NodeViewRenderer, GlobalAttributes, RawCommands, NodeConfig } from './types'; | ||
import { Attributes, NodeViewRenderer, GlobalAttributes, RawCommands } from './types'; | ||
import { NodeConfig } from '.'; | ||
import { Editor } from './Editor'; | ||
@@ -8,0 +9,0 @@ declare module '@tiptap/core' { |
@@ -8,4 +8,3 @@ import { Node as ProseMirrorNode, Mark as ProseMirrorMark, ParseOptions } from 'prosemirror-model'; | ||
import { Editor } from './Editor'; | ||
import { Commands, ExtensionConfig, NodeConfig, MarkConfig } from '.'; | ||
export { Commands, ExtensionConfig, NodeConfig, MarkConfig, }; | ||
import { Commands } from '.'; | ||
export declare type Extensions = (Extension | Node | Mark)[]; | ||
@@ -12,0 +11,0 @@ export interface EditorOptions { |
{ | ||
"name": "@tiptap/core", | ||
"description": "headless rich text editor", | ||
"version": "2.0.0-beta.9", | ||
"version": "2.0.0-beta.10", | ||
"homepage": "https://tiptap.dev", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"@types/prosemirror-keymap": "^1.0.4", | ||
"@types/prosemirror-model": "^1.11.3", | ||
"@types/prosemirror-model": "^1.13.0", | ||
"@types/prosemirror-schema-list": "^1.0.3", | ||
@@ -43,5 +43,5 @@ "@types/prosemirror-state": "^1.2.6", | ||
"prosemirror-transform": "^1.2.12", | ||
"prosemirror-view": "^1.18.1" | ||
"prosemirror-view": "^1.18.2" | ||
}, | ||
"gitHead": "1a7288eb3ba9fda08e8c85e8e9bdb3f9ad84de69" | ||
"gitHead": "0e31fff97f6b107ccaf892ffba36459f59e742db" | ||
} |
@@ -1,2 +0,4 @@ | ||
import { EditorState, Plugin, Transaction } from 'prosemirror-state' | ||
import { | ||
EditorState, Plugin, PluginKey, Transaction, | ||
} from 'prosemirror-state' | ||
import { EditorView } from 'prosemirror-view' | ||
@@ -175,6 +177,15 @@ import { Schema, DOMParser, Node } from 'prosemirror-model' | ||
*/ | ||
public unregisterPlugin(name: string): void { | ||
public unregisterPlugin(nameOrPluginKey: string | PluginKey): void { | ||
if (this.isDestroyed) { | ||
return | ||
} | ||
const name = typeof nameOrPluginKey === 'string' | ||
? `${nameOrPluginKey}$` | ||
// @ts-ignore | ||
: nameOrPluginKey.key | ||
const state = this.state.reconfigure({ | ||
// @ts-ignore | ||
plugins: this.state.plugins.filter(plugin => !plugin.key.startsWith(`${name}$`)), | ||
plugins: this.state.plugins.filter(plugin => !plugin.key.startsWith(name)), | ||
}) | ||
@@ -181,0 +192,0 @@ |
@@ -7,3 +7,4 @@ import { Plugin, Transaction } from 'prosemirror-state' | ||
import mergeDeep from './utilities/mergeDeep' | ||
import { GlobalAttributes, RawCommands, ExtensionConfig } from './types' | ||
import { GlobalAttributes, RawCommands } from './types' | ||
import { ExtensionConfig } from '.' | ||
@@ -10,0 +11,0 @@ declare module '@tiptap/core' { |
import { NodeSpec, MarkSpec, Schema } from 'prosemirror-model' | ||
import { | ||
Extensions, | ||
ExtensionConfig, | ||
NodeConfig, | ||
MarkConfig, | ||
} from '../types' | ||
import { Extensions } from '../types' | ||
import { ExtensionConfig, NodeConfig, MarkConfig } from '..' | ||
import splitExtensions from './splitExtensions' | ||
@@ -9,0 +5,0 @@ import getAttributesFromExtensions from './getAttributesFromExtensions' |
@@ -14,2 +14,3 @@ export * from './Editor' | ||
export { default as mergeAttributes } from './utilities/mergeAttributes' | ||
export { default as generateHTML } from './helpers/generateHTML' | ||
@@ -16,0 +17,0 @@ export { default as getSchema } from './helpers/getSchema' |
@@ -11,8 +11,4 @@ import { | ||
import mergeDeep from './utilities/mergeDeep' | ||
import { | ||
Attributes, | ||
RawCommands, | ||
GlobalAttributes, | ||
MarkConfig, | ||
} from './types' | ||
import { Attributes, RawCommands, GlobalAttributes } from './types' | ||
import { MarkConfig } from '.' | ||
import { Editor } from './Editor' | ||
@@ -19,0 +15,0 @@ |
@@ -16,4 +16,4 @@ import { | ||
RawCommands, | ||
NodeConfig, | ||
} from './types' | ||
import { NodeConfig } from '.' | ||
import { Editor } from './Editor' | ||
@@ -20,0 +20,0 @@ |
@@ -17,16 +17,4 @@ import { | ||
import { Editor } from './Editor' | ||
import { | ||
Commands, | ||
ExtensionConfig, | ||
NodeConfig, | ||
MarkConfig, | ||
} from '.' | ||
import { Commands } from '.' | ||
export { | ||
Commands, | ||
ExtensionConfig, | ||
NodeConfig, | ||
MarkConfig, | ||
} | ||
export type Extensions = (Extension | Node | Mark)[] | ||
@@ -33,0 +21,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
2328190
14992
+ Addedprosemirror-model@1.24.0(transitive)
- Removedprosemirror-model@1.23.0(transitive)
Updatedprosemirror-view@^1.18.2