github uiwjs/react-md-editor v3.16.0

latest releases: v3.19.8, v3.19.7, v3.19.6...
22 months ago

Documentation v3.16.0: https://raw.githack.com/uiwjs/react-md-editor/a482f99/index.html
Comparing Changes: v3.15.0...v3.16.0

npm i @uiw/react-md-editor@3.16.0
const title2 = {
  name: 'title3',
  keyCommand: 'title3',
+  render: (command, disabled, executeCommand) => {
+    return (
+      <button 
+        aria-label="Insert title3"
+        disabled={disabled}
+        onClick={(evn) => {
+          evn.stopPropagation();
+          executeCommand(command, command.groupName)
+        }}
+      >
+        btn
+      </button>
+    )
+  },
  execute: (state, api) => {
    let modifyText = `## ${state.selectedText}\n`;
    if (!state.selectedText) {
      modifyText = `## `;
    }
    api.replaceSelection(modifyText);
  },
}

Don't miss a new react-md-editor release

NewReleases is sending notifications on new releases.