Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
3 additions
and
2 deletions.
-
+2
−1
src/RichText.js
-
+1
−1
src/components/views/rooms/MessageComposerInput.js
|
@@ -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) |
|
|
}); |
|
|
} |
|
|
} |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.