Commit 2e552534 authored by chris's avatar chris

fix

parent 3d4906f5
......@@ -82,7 +82,8 @@ class Wax extends Component {
onBlur,
layout,
theme,
debug
debug,
TrackChange
} = this.props;
const defaultRender = ({ editor, state, dispatch, fileUpload }) => (
......@@ -105,6 +106,7 @@ class Wax extends Component {
onBlur={onBlur || (value => true)}
onChange={this.onChange || (value => true)}
debug={debug}
TrackChange={TrackChange}
>
{WaxRender}
</WaxView>
......
......@@ -95,8 +95,11 @@ class WaxView extends Component {
};
dispatchTransaction = transaction => {
const trackedTr = trackedTransaction(transaction, this.view.state, this);
const state = this.view.state.apply(trackedTr);
const { TrackChange } = this.props;
const tr = TrackChange
? trackedTransaction(transaction, this.view.state, this)
: transaction;
const state = this.view.state.apply(tr);
this.view.updateState(state);
this.props.onChange(state.doc.content);
this.forceUpdate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment