|
|
@@ -22,6 +22,11 @@ export default class Preview extends React.Component {
|
|
|
ref={(elm) => {
|
|
|
this.previewElement = elm;
|
|
|
this.props.inputRef(elm);
|
|
|
+ }}
|
|
|
+ onScroll={(event) => {
|
|
|
+ if (this.props.onScroll != null) {
|
|
|
+ this.props.onScroll(event.target.scrollTop);
|
|
|
+ }
|
|
|
}}>
|
|
|
|
|
|
<RevisionBody
|
|
|
@@ -39,4 +44,5 @@ Preview.propTypes = {
|
|
|
isMathJaxEnabled: PropTypes.bool,
|
|
|
renderMathJaxOnInit: PropTypes.bool,
|
|
|
previewOptions: PropTypes.instanceOf(PreviewOptions),
|
|
|
+ onScroll: PropTypes.func,
|
|
|
};
|