@uiw/react-md-editor
Version:
A markdown editor with preview, implemented with React.js and TypeScript.
28 lines (26 loc) • 614 B
JavaScript
import * as React from 'react';
import { jsx as _jsx } from "react/jsx-runtime";
export var title2 = {
name: 'title2',
keyCommand: 'title2',
shortcuts: 'ctrlcmd+2',
buttonProps: {
'aria-label': 'Insert title2',
title: 'Insert title 2'
},
icon: /*#__PURE__*/_jsx("div", {
style: {
fontSize: 16,
textAlign: 'left'
},
children: "Title 2"
}),
execute: (state, api) => {
var modifyText = "## " + state.selectedText + "\n";
if (!state.selectedText) {
modifyText = "## ";
}
api.replaceSelection(modifyText);
}
};
//# sourceMappingURL=title2.js.map