|
@@ -82,7 +82,9 @@ class Preview extends React.PureComponent {
|
|
|
className="page-editor-preview-body"
|
|
className="page-editor-preview-body"
|
|
|
ref={(elm) => {
|
|
ref={(elm) => {
|
|
|
this.previewElement = elm;
|
|
this.previewElement = elm;
|
|
|
- this.props.inputRef(elm);
|
|
|
|
|
|
|
+ if (this.props.innerRef != null) {
|
|
|
|
|
+ this.props.innerRef(elm);
|
|
|
|
|
+ }
|
|
|
}}
|
|
}}
|
|
|
onScroll={(event) => {
|
|
onScroll={(event) => {
|
|
|
if (this.props.onScroll != null) {
|
|
if (this.props.onScroll != null) {
|
|
@@ -112,7 +114,7 @@ Preview.propTypes = {
|
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
|
|
|
|
|
markdown: PropTypes.string,
|
|
markdown: PropTypes.string,
|
|
|
- inputRef: PropTypes.func.isRequired, // for getting div element
|
|
|
|
|
|
|
+ innerRef: PropTypes.func,
|
|
|
isMathJaxEnabled: PropTypes.bool,
|
|
isMathJaxEnabled: PropTypes.bool,
|
|
|
renderMathJaxOnInit: PropTypes.bool,
|
|
renderMathJaxOnInit: PropTypes.bool,
|
|
|
onScroll: PropTypes.func,
|
|
onScroll: PropTypes.func,
|