diff --git a/docs/src/demos/Examples/CollaborativeEditing/index.vue b/docs/src/demos/Examples/CollaborativeEditing/index.vue index f1be445c..6566ba61 100644 --- a/docs/src/demos/Examples/CollaborativeEditing/index.vue +++ b/docs/src/demos/Examples/CollaborativeEditing/index.vue @@ -135,11 +135,11 @@ export default { this.editor = new Editor({ extensions: [ ...defaultExtensions(), - Collaboration.set({ + Collaboration.configure({ provider: this.provider, type: this.type, }), - CollaborationCursor.set({ + CollaborationCursor.configure({ provider: this.provider, name: this.name, color: this.color, diff --git a/docs/src/demos/Examples/Formatting/index.vue b/docs/src/demos/Examples/Formatting/index.vue index a42d1dbd..4d628f42 100644 --- a/docs/src/demos/Examples/Formatting/index.vue +++ b/docs/src/demos/Examples/Formatting/index.vue @@ -64,7 +64,7 @@ export default { Document, Paragraph, Text, - Heading.set({ + Heading.configure({ level: [1, 2, 3], }), Bold, diff --git a/docs/src/demos/Extensions/Collaboration/index.vue b/docs/src/demos/Extensions/Collaboration/index.vue index 73d8e929..14838608 100644 --- a/docs/src/demos/Extensions/Collaboration/index.vue +++ b/docs/src/demos/Extensions/Collaboration/index.vue @@ -40,7 +40,7 @@ export default { Document, Paragraph, Text, - Collaboration.set({ + Collaboration.configure({ provider: this.provider, type: this.type, }), diff --git a/docs/src/demos/Extensions/CollaborationCursor/index.vue b/docs/src/demos/Extensions/CollaborationCursor/index.vue index ed764a06..571d362a 100644 --- a/docs/src/demos/Extensions/CollaborationCursor/index.vue +++ b/docs/src/demos/Extensions/CollaborationCursor/index.vue @@ -41,11 +41,11 @@ export default { Document, Paragraph, Text, - Collaboration.set({ + Collaboration.configure({ provider: this.provider, type: this.type, }), - CollaborationCursor.set({ + CollaborationCursor.configure({ provider: this.provider, name: 'Cyndi Lauper', color: '#f783ac', diff --git a/docs/src/demos/Extensions/Focus/index.vue b/docs/src/demos/Extensions/Focus/index.vue index 7da2bc89..fcd1730a 100644 --- a/docs/src/demos/Extensions/Focus/index.vue +++ b/docs/src/demos/Extensions/Focus/index.vue @@ -31,7 +31,7 @@ export default { Document, Paragraph, Text, - Focus.set({ + Focus.configure({ className: 'has-focus', nested: true, }), diff --git a/docs/src/demos/Nodes/Heading/index.vue b/docs/src/demos/Nodes/Heading/index.vue index 2f8c474d..b8d47e8e 100644 --- a/docs/src/demos/Nodes/Heading/index.vue +++ b/docs/src/demos/Nodes/Heading/index.vue @@ -39,7 +39,7 @@ export default { Document, Paragraph, Text, - Heading.set({ + Heading.configure({ levels: [1, 2, 3], }), ], diff --git a/docs/src/docPages/guide/custom-styling.md b/docs/src/docPages/guide/custom-styling.md index ca5b91ec..168556c7 100644 --- a/docs/src/docPages/guide/custom-styling.md +++ b/docs/src/docPages/guide/custom-styling.md @@ -34,12 +34,12 @@ Most extensions allow you to add attributes to the rendered HTML through the `HT new Editor({ extensions: [ Document, - Paragraph.set({ + Paragraph.configure({ HTMLAttributes: { class: 'my-custom-paragraph', }, }), - Heading.set({ + Heading.configure({ HTMLAttributes: { class: 'my-custom-heading', }, diff --git a/packages/core/src/Extension.ts b/packages/core/src/Extension.ts index 9c4063a9..6cf271ed 100644 --- a/packages/core/src/Extension.ts +++ b/packages/core/src/Extension.ts @@ -90,16 +90,16 @@ export class Extension { return new Extension(config) } - set(options: Partial) { + configure(options: Partial) { return Extension .create(this.config as ExtensionSpec) - .#set({ + .#configure({ ...this.config.defaultOptions, ...options, }) } - #set = (options: Partial) => { + #configure = (options: Partial) => { this.options = { ...this.config.defaultOptions, ...options, diff --git a/packages/core/src/MarkExtension.ts b/packages/core/src/MarkExtension.ts index a934eb7c..66f64e80 100644 --- a/packages/core/src/MarkExtension.ts +++ b/packages/core/src/MarkExtension.ts @@ -140,16 +140,16 @@ export class MarkExtension { return new MarkExtension(config) } - set(options: Partial) { + configure(options: Partial) { return MarkExtension .create(this.config as MarkExtensionSpec) - .#set({ + .#configure({ ...this.config.defaultOptions, ...options, }) } - #set = (options: Partial) => { + #configure = (options: Partial) => { this.options = { ...this.config.defaultOptions, ...options, diff --git a/packages/core/src/NodeExtension.ts b/packages/core/src/NodeExtension.ts index 84e9cf77..80aa9b40 100644 --- a/packages/core/src/NodeExtension.ts +++ b/packages/core/src/NodeExtension.ts @@ -192,16 +192,16 @@ export class NodeExtension { return new NodeExtension(config) } - set(options: Partial) { + configure(options: Partial) { return NodeExtension .create(this.config as NodeExtensionSpec) - .#set({ + .#configure({ ...this.config.defaultOptions, ...options, }) } - #set = (options: Partial) => { + #configure = (options: Partial) => { this.options = { ...this.config.defaultOptions, ...options, diff --git a/packages/starter-kit/src/index.ts b/packages/starter-kit/src/index.ts index 26524cb1..89d6cd6f 100644 --- a/packages/starter-kit/src/index.ts +++ b/packages/starter-kit/src/index.ts @@ -26,14 +26,14 @@ export function defaultExtensions(options: { Dropcursor, Gapcursor, Document, - History.set(options?.history), + History.configure(options?.history), Paragraph, Text, Bold, Italic, Code, - CodeBlock.set(options?.codeBlock), - Heading.set(options?.heading), + CodeBlock.configure(options?.codeBlock), + Heading.configure(options?.heading), HardBreak, Strike, Blockquote,