UNPKG

@uiw/react-md-editor

Version:

A markdown editor with preview, implemented with React.js and TypeScript.

27 lines 718 B
import * as React from 'react'; import { insertAtLineStart } from '../utils/InsertTextAtPosition'; import { jsx as _jsx } from "react/jsx-runtime"; export var title6 = { name: 'title6', keyCommand: 'title6', shortcuts: 'ctrlcmd+6', buttonProps: { 'aria-label': 'Insert title6', title: 'Insert title 6' }, icon: /*#__PURE__*/_jsx("div", { style: { fontSize: 12, textAlign: 'left' }, children: "Title 6" }), execute: (state, api) => { if (state.selection.start === 0 || /\n$/.test(state.text)) { api.replaceSelection('###### '); } else { insertAtLineStart('###### ', state.selection.start, api.textArea); } } }; //# sourceMappingURL=title6.js.map