-
chris authored203a6a61
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
BlockQuote.js 617 B
import Tools from '../../lib/Tools';
import { injectable } from 'inversify';
import { wrapIn } from 'prosemirror-commands';
@injectable()
class BlockQuote extends Tools {
title = 'Change to Block Quote';
content = 'Block Quote';
get run() {
return (state, dispatch) => {
wrapIn(state.config.schema.nodes.blockquote)(state, dispatch);
};
}
select = (state, activeViewId) => {
if (activeViewId !== 'main') return false;
return true;
};
get enable() {
return state => {
return wrapIn(state.config.schema.nodes.blockquote)(state);
};
}
}
export default BlockQuote;