feat!: Replace defaultOptions with addOptions (#2088)
* add new addOptions option * replace defaultOptions with addOptions for all extensions * replace defaultOptions with addOptions for all demos * replace defaultOptions with addOptions in docs * refactoring * refactoring * drop object support for addOptions * fix optional options * fix tests
This commit is contained in:
@@ -10,8 +10,10 @@ export interface CharacterCountOptions {
|
||||
export const CharacterCount = Extension.create<CharacterCountOptions>({
|
||||
name: 'characterCount',
|
||||
|
||||
defaultOptions: {
|
||||
limit: 0,
|
||||
addOptions() {
|
||||
return {
|
||||
limit: 0,
|
||||
}
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
|
||||
Reference in New Issue
Block a user