refactoring
This commit is contained in:
@@ -184,11 +184,11 @@ export class Editor extends EventEmitter {
|
|||||||
this.emit('update', { transaction })
|
this.emit('update', { transaction })
|
||||||
}
|
}
|
||||||
|
|
||||||
getMarkAttrs(name: string) {
|
public getMarkAttrs(name: string) {
|
||||||
return getMarkAttrs(this.state, this.schema.marks[name])
|
return getMarkAttrs(this.state, this.schema.marks[name])
|
||||||
}
|
}
|
||||||
|
|
||||||
isActive(name: string, attrs = {}) {
|
public isActive(name: string, attrs = {}) {
|
||||||
const schemaType = getSchemaTypeByName(name, this.schema)
|
const schemaType = getSchemaTypeByName(name, this.schema)
|
||||||
|
|
||||||
if (schemaType === 'node') {
|
if (schemaType === 'node') {
|
||||||
|
|||||||
Reference in New Issue
Block a user