UNPKG

@uiw/react-md-editor

Version:

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

28 lines (26 loc) 608 B
import React from 'react'; import { jsx as _jsx } from "react/jsx-runtime"; export var title1 = { name: 'title1', keyCommand: 'title1', shortcuts: 'ctrlcmd+1', buttonProps: { 'aria-label': 'Insert title 1', title: 'Insert title 1' }, icon: /*#__PURE__*/_jsx("div", { style: { fontSize: 18, textAlign: 'left' }, children: "Title 1" }), execute: (state, api) => { var modifyText = "# " + state.selectedText + "\n"; if (!state.selectedText) { modifyText = "# "; } api.replaceSelection(modifyText); } }; //# sourceMappingURL=title1.js.map