@lexical/react 0.13.0 → 0.13.1
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.
|
@@ -21,11 +21,6 @@ function AutoFocusPlugin({
|
|
|
21
21
|
}) {
|
|
22
22
|
const [editor] = LexicalComposerContext.useLexicalComposerContext();
|
|
23
23
|
react.useEffect(() => {
|
|
24
|
-
editor.registerUpdateListener(({
|
|
25
|
-
editorState
|
|
26
|
-
}) => {
|
|
27
|
-
console.info(editorState.toJSON());
|
|
28
|
-
});
|
|
29
24
|
editor.focus(() => {
|
|
30
25
|
// If we try and move selection to the same point with setBaseAndExtent, it won't
|
|
31
26
|
// trigger a re-focus on the element. So in the case this occurs, we'll need to correct it.
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
'use strict';var e=require("@lexical/react/LexicalComposerContext"),f=require("react");exports.AutoFocusPlugin=function({defaultSelection:
|
|
7
|
+
'use strict';var e=require("@lexical/react/LexicalComposerContext"),f=require("react");exports.AutoFocusPlugin=function({defaultSelection:c}){let [a]=e.useLexicalComposerContext();f.useEffect(()=>{a.focus(()=>{let d=document.activeElement,b=a.getRootElement();null===b||null!==d&&b.contains(d)||b.focus({preventScroll:!0})},{defaultSelection:c})},[c,a]);return null}
|
package/package.json
CHANGED
|
@@ -8,29 +8,29 @@
|
|
|
8
8
|
"rich-text"
|
|
9
9
|
],
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"version": "0.13.
|
|
11
|
+
"version": "0.13.1",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@lexical/clipboard": "0.13.
|
|
14
|
-
"@lexical/code": "0.13.
|
|
15
|
-
"@lexical/dragon": "0.13.
|
|
16
|
-
"@lexical/hashtag": "0.13.
|
|
17
|
-
"@lexical/history": "0.13.
|
|
18
|
-
"@lexical/link": "0.13.
|
|
19
|
-
"@lexical/list": "0.13.
|
|
20
|
-
"@lexical/mark": "0.13.
|
|
21
|
-
"@lexical/markdown": "0.13.
|
|
22
|
-
"@lexical/overflow": "0.13.
|
|
23
|
-
"@lexical/plain-text": "0.13.
|
|
24
|
-
"@lexical/rich-text": "0.13.
|
|
25
|
-
"@lexical/selection": "0.13.
|
|
26
|
-
"@lexical/table": "0.13.
|
|
27
|
-
"@lexical/text": "0.13.
|
|
28
|
-
"@lexical/utils": "0.13.
|
|
29
|
-
"@lexical/yjs": "0.13.
|
|
13
|
+
"@lexical/clipboard": "0.13.1",
|
|
14
|
+
"@lexical/code": "0.13.1",
|
|
15
|
+
"@lexical/dragon": "0.13.1",
|
|
16
|
+
"@lexical/hashtag": "0.13.1",
|
|
17
|
+
"@lexical/history": "0.13.1",
|
|
18
|
+
"@lexical/link": "0.13.1",
|
|
19
|
+
"@lexical/list": "0.13.1",
|
|
20
|
+
"@lexical/mark": "0.13.1",
|
|
21
|
+
"@lexical/markdown": "0.13.1",
|
|
22
|
+
"@lexical/overflow": "0.13.1",
|
|
23
|
+
"@lexical/plain-text": "0.13.1",
|
|
24
|
+
"@lexical/rich-text": "0.13.1",
|
|
25
|
+
"@lexical/selection": "0.13.1",
|
|
26
|
+
"@lexical/table": "0.13.1",
|
|
27
|
+
"@lexical/text": "0.13.1",
|
|
28
|
+
"@lexical/utils": "0.13.1",
|
|
29
|
+
"@lexical/yjs": "0.13.1",
|
|
30
30
|
"react-error-boundary": "^3.1.4"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"lexical": "0.13.
|
|
33
|
+
"lexical": "0.13.1",
|
|
34
34
|
"react": ">=17.x",
|
|
35
35
|
"react-dom": ">=17.x"
|
|
36
36
|
},
|