substance
Version:
Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing systems.
15 lines (11 loc) • 345 B
JavaScript
import { SwitchTextTypeCommand } from '../../ui'
class InsertListCommand extends SwitchTextTypeCommand {
execute (params) {
let ordered = this.config.spec.ordered
let editorSession = params.editorSession
editorSession.transaction((tx) => {
tx.toggleList({ ordered: ordered })
})
}
}
export default InsertListCommand