@mdxeditor/editor 0.17.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -66,6 +66,10 @@ export interface MDXEditorMethods {
66
66
  * Updates the markdown value of the editor.
67
67
  */
68
68
  setMarkdown: (value: string) => void;
69
+ /**
70
+ * Sets focus on input
71
+ */
72
+ focus: () => void;
69
73
  }
70
74
  /**
71
75
  * The MDXEditor React component. See {@link MDXEditorProps} for the list of properties supported and the {@link MDXEditorMethods} for the methods accessible through the ref.
package/dist/MDXEditor.js CHANGED
@@ -88,6 +88,10 @@ const Methods = ({ mdxRef }) => {
88
88
  },
89
89
  setMarkdown: (markdown) => {
90
90
  realm.pubKey("setMarkdown", markdown);
91
+ },
92
+ focus: () => {
93
+ var _a;
94
+ (_a = realm.getKeyValue("rootEditor")) == null ? void 0 : _a.focus();
91
95
  }
92
96
  };
93
97
  },
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "private": false,
10
10
  "sideEffects": false,
11
11
  "type": "module",
12
- "version": "0.17.2",
12
+ "version": "0.18.0",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",