fix optional starter kit options
This commit is contained in:
@@ -171,7 +171,7 @@ export class Extension<Options = any, Commands = any> {
|
|||||||
return new Extension<O, C>(config)
|
return new Extension<O, C>(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(options: Partial<Options>) {
|
configure(options?: Partial<Options>) {
|
||||||
return Extension
|
return Extension
|
||||||
.create<Options, Commands>(this.config as ExtensionConfig<Options, Commands>)
|
.create<Options, Commands>(this.config as ExtensionConfig<Options, Commands>)
|
||||||
.#configure({
|
.#configure({
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ export class Mark<Options = any, Commands = {}> {
|
|||||||
return new Mark<O, C>(config)
|
return new Mark<O, C>(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(options: Partial<Options>) {
|
configure(options?: Partial<Options>) {
|
||||||
return Mark
|
return Mark
|
||||||
.create<Options, Commands>(this.config as MarkConfig<Options, Commands>)
|
.create<Options, Commands>(this.config as MarkConfig<Options, Commands>)
|
||||||
.#configure({
|
.#configure({
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ export class Node<Options = any, Commands = {}> {
|
|||||||
return new Node<O, C>(config)
|
return new Node<O, C>(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(options: Partial<Options>) {
|
configure(options?: Partial<Options>) {
|
||||||
return Node
|
return Node
|
||||||
.create<Options, Commands>(this.config as NodeConfig<Options, Commands>)
|
.create<Options, Commands>(this.config as NodeConfig<Options, Commands>)
|
||||||
.#configure({
|
.#configure({
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import BulletList, { BulletListOptions } from '@tiptap/extension-bullet-list'
|
|||||||
import OrderedList, { OrderedListOptions } from '@tiptap/extension-ordered-list'
|
import OrderedList, { OrderedListOptions } from '@tiptap/extension-ordered-list'
|
||||||
import ListItem, { ListItemOptions } from '@tiptap/extension-list-item'
|
import ListItem, { ListItemOptions } from '@tiptap/extension-list-item'
|
||||||
|
|
||||||
export function defaultExtensions(options: {
|
export function defaultExtensions(options?: Partial<{
|
||||||
dropursor: DropcursorOptions,
|
dropursor: DropcursorOptions,
|
||||||
paragraph: ParagraphOptions,
|
paragraph: ParagraphOptions,
|
||||||
history: HistoryOptions,
|
history: HistoryOptions,
|
||||||
@@ -33,7 +33,7 @@ export function defaultExtensions(options: {
|
|||||||
bulletList: BulletListOptions,
|
bulletList: BulletListOptions,
|
||||||
orderedList: OrderedListOptions,
|
orderedList: OrderedListOptions,
|
||||||
listItem: ListItemOptions,
|
listItem: ListItemOptions,
|
||||||
}) {
|
}>) {
|
||||||
return [
|
return [
|
||||||
Dropcursor.configure(options?.dropursor),
|
Dropcursor.configure(options?.dropursor),
|
||||||
Gapcursor,
|
Gapcursor,
|
||||||
|
|||||||
Reference in New Issue
Block a user