Skip to content
Snippets Groups Projects
Commit 7a0fd576 authored by chris's avatar chris
Browse files

serialize content

parent cc427e56
No related branches found
No related tags found
1 merge request!298Multiple configs
......@@ -54,6 +54,7 @@ const Editoria = () => {
onChange={debounce(source => {
console.log(source);
}, 3000)}
onBlur={source => console.log(source)}
user={user}
/>
</>
......
......@@ -89,6 +89,7 @@ const Wax = props => {
});
}
};
const TrackChange = application.config.get('config.EnableTrackChangeService');
const Layout = application.container.get('Layout');
......@@ -109,6 +110,7 @@ const Wax = props => {
TrackChange={TrackChange}
user={user}
value={value}
serializer={serializer}
>
{({ editor }) => <WaxRender className={className} editor={editor} />}
</WaxView>
......
......@@ -65,9 +65,9 @@ export default props => {
scrollThreshold: 200,
handleDOMEvents: {
blur: onBlur
? // eslint-disable-next-line no-shadow
view => {
onBlur(view.state.doc.content);
? editorView => {
const serialize = props.serializer(schema);
onBlur(serialize(editorView.state.doc.content));
}
: null,
},
......
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