From 54e77bd80c3cfcce37a5170a8372893e22b2f24f Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Fri, 23 Jun 2017 14:53:35 -0400 Subject: [PATCH] fix raw editor formatting controls --- .../Widgets/Markdown/MarkdownControl/RawEditor/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js b/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js index 9a21b161..f9faddcf 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js @@ -128,7 +128,7 @@ export default class RawEditor extends React.Component { surroundSelection(chars) { const selection = this.getSelection(); const newSelection = Object.assign({}, selection); - const { value } = this.props; + const { value } = this.state; const escapedChars = chars.replace(/\*/g, '\\*'); const regexp = new RegExp(`^${ escapedChars }.*${ escapedChars }$`); let changed = chars + selection.selected + chars;