diff --git a/src/controls/richText/RichText.tsx b/src/controls/richText/RichText.tsx index b64614e22..81fb66434 100644 --- a/src/controls/richText/RichText.tsx +++ b/src/controls/richText/RichText.tsx @@ -760,7 +760,7 @@ export class RichText extends React.Component { // do we need to pass this to a handler? if (onChange) { // yes, get the changed text from the handler - let newText: string = this.props.onChange(value); + let newText: string = onChange(value); this.setState({ text: newText }); } else { // no, write the text to the state diff --git a/src/webparts/controlsTest/components/ControlsTest.tsx b/src/webparts/controlsTest/components/ControlsTest.tsx index 0ff80b38f..80a1b8de0 100644 --- a/src/webparts/controlsTest/components/ControlsTest.tsx +++ b/src/webparts/controlsTest/components/ControlsTest.tsx @@ -40,6 +40,7 @@ import { Link } from 'office-ui-fabric-react/lib/components/Link'; */ export default class ControlsTest extends React.Component { private taxService: SPTermStorePickerService = null; + private richTextValue: string = null; constructor(props: IControlsTestProps) { super(props); @@ -53,7 +54,8 @@ export default class ControlsTest extends React.Component console.log("DateTimePicker value:", value)} /> console.log("DateTimePicker value:", value)} /> - + { this.richTextValue = value; return value; }} />