Merge branch 'main' into feature/vue-node-views
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [2.0.0-alpha.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-alpha.5...@tiptap/core@2.0.0-alpha.6) (2020-11-19)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [2.0.0-alpha.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/core@2.0.0-alpha.4...@tiptap/core@2.0.0-alpha.5) (2020-11-18)
|
||||
|
||||
**Note:** Version bump only for package @tiptap/core
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tiptap/core",
|
||||
"version": "2.0.0-alpha.5",
|
||||
"version": "2.0.0-alpha.6",
|
||||
"homepage": "https://tiptap.dev",
|
||||
"keywords": [
|
||||
"tiptap",
|
||||
|
||||
@@ -65,6 +65,8 @@ export interface ExtensionConfig<Options = any, Commands = {}> {
|
||||
}
|
||||
|
||||
export class Extension<Options = any, Commands = any> {
|
||||
type = 'extension'
|
||||
|
||||
config: Required<ExtensionConfig> = {
|
||||
name: 'extension',
|
||||
defaultOptions: {},
|
||||
|
||||
@@ -111,6 +111,8 @@ export interface MarkConfig<Options = any, Commands = {}> extends Overwrite<Exte
|
||||
}> {}
|
||||
|
||||
export class Mark<Options = any, Commands = {}> {
|
||||
type = 'mark'
|
||||
|
||||
config: Required<MarkConfig> = {
|
||||
name: 'mark',
|
||||
defaultOptions: {},
|
||||
|
||||
@@ -155,6 +155,8 @@ export interface NodeConfig<Options = any, Commands = {}> extends Overwrite<Exte
|
||||
}> {}
|
||||
|
||||
export class Node<Options = any, Commands = {}> {
|
||||
type = 'node'
|
||||
|
||||
config: Required<NodeConfig> = {
|
||||
name: 'node',
|
||||
defaultOptions: {},
|
||||
|
||||
@@ -4,9 +4,9 @@ import { Node } from '../Node'
|
||||
import { Mark } from '../Mark'
|
||||
|
||||
export default function splitExtensions(extensions: Extensions) {
|
||||
const baseExtensions = extensions.filter(extension => extension instanceof Extension) as Extension[]
|
||||
const nodeExtensions = extensions.filter(extension => extension instanceof Node) as Node[]
|
||||
const markExtensions = extensions.filter(extension => extension instanceof Mark) as Mark[]
|
||||
const baseExtensions = extensions.filter(extension => extension.type === 'extension') as Extension[]
|
||||
const nodeExtensions = extensions.filter(extension => extension.type === 'node') as Node[]
|
||||
const markExtensions = extensions.filter(extension => extension.type === 'mark') as Mark[]
|
||||
|
||||
return {
|
||||
baseExtensions,
|
||||
|
||||
Reference in New Issue
Block a user