mirror of
https://github.com/strapi/strapi.git
synced 2025-09-28 18:01:26 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
34905eaa8d
@ -173,9 +173,7 @@ class Wysiwyg extends React.Component {
|
|||||||
if (selectedText !== '') {
|
if (selectedText !== '') {
|
||||||
return this.setState(
|
return this.setState(
|
||||||
{
|
{
|
||||||
// Move the cursor to the end (this line forces the cursor to be at the end of the content)
|
editorState: newEditorState,
|
||||||
// It may go at the end of the last block
|
|
||||||
editorState: EditorState.moveFocusToEnd(newEditorState),
|
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
this.focus();
|
this.focus();
|
||||||
@ -309,7 +307,14 @@ class Wysiwyg extends React.Component {
|
|||||||
const newContentState = this.createNewContentStateFromBlock(newBlock);
|
const newContentState = this.createNewContentStateFromBlock(newBlock);
|
||||||
const newEditorState = this.createNewEditorState(newContentState, text);
|
const newEditorState = this.createNewEditorState(newContentState, text);
|
||||||
|
|
||||||
return this.setState({ editorState: EditorState.moveFocusToEnd(newEditorState) });
|
return this.setState(
|
||||||
|
{
|
||||||
|
editorState: newEditorState,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
this.focus();
|
||||||
|
},
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user