mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
more RTE fixes
This commit is contained in:
parent
8cb086ef31
commit
ba69e4365d
2 changed files with 3 additions and 2 deletions
|
@ -141,7 +141,8 @@ export function modifyText(contentState: ContentState, rangeToReplace: Selection
|
|||
for(let currentKey = startKey;
|
||||
currentKey && currentKey !== endKey;
|
||||
currentKey = contentState.getKeyAfter(currentKey)) {
|
||||
text += getText(currentKey).substring(startOffset, blockText.length);
|
||||
let blockText = getText(currentKey);
|
||||
text += blockText.substring(startOffset, blockText.length);
|
||||
|
||||
// from now on, we'll take whole blocks
|
||||
startOffset = 0;
|
||||
|
|
|
@ -199,7 +199,7 @@ export default class MessageComposerInput extends React.Component {
|
|||
if (contentJSON) {
|
||||
let content = convertFromRaw(JSON.parse(contentJSON));
|
||||
component.setState({
|
||||
editorState: component.createEditorState(this.state.isRichtextEnabled, content)
|
||||
editorState: component.createEditorState(component.state.isRichtextEnabled, content)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue