fix raw editor formatting controls
This commit is contained in:
parent
faec38ac19
commit
54e77bd80c
@ -128,7 +128,7 @@ export default class RawEditor extends React.Component {
|
|||||||
surroundSelection(chars) {
|
surroundSelection(chars) {
|
||||||
const selection = this.getSelection();
|
const selection = this.getSelection();
|
||||||
const newSelection = Object.assign({}, selection);
|
const newSelection = Object.assign({}, selection);
|
||||||
const { value } = this.props;
|
const { value } = this.state;
|
||||||
const escapedChars = chars.replace(/\*/g, '\\*');
|
const escapedChars = chars.replace(/\*/g, '\\*');
|
||||||
const regexp = new RegExp(`^${ escapedChars }.*${ escapedChars }$`);
|
const regexp = new RegExp(`^${ escapedChars }.*${ escapedChars }$`);
|
||||||
let changed = chars + selection.selected + chars;
|
let changed = chars + selection.selected + chars;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user