import * as React from 'react'; import { ICommand, TextState, TextApi } from './'; export const title5: ICommand = { name: 'title5', keyCommand: 'title5', shortcuts: 'ctrlcmd+5', buttonProps: { 'aria-label': 'Insert title5', title: 'Insert title 5' }, icon:
Title 5
, execute: (state: TextState, api: TextApi) => { let modifyText = `##### ${state.selectedText}\n`; if (!state.selectedText) { modifyText = `##### `; } api.replaceSelection(modifyText); }, };