Skip to content
Snippets Groups Projects
Commit 1fa2ecdc authored by chris's avatar chris
Browse files

coko docs fixes

parent 489090e2
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,8 @@ const Editoria = () => { ...@@ -57,6 +57,8 @@ const Editoria = () => {
// console.log(JSON.stringify(source)); // console.log(JSON.stringify(source));
// }, 200)} // }, 200)}
user={user} user={user}
scrollMargin={200}
scrollThreshold={200}
/> />
</> </>
), ),
......
...@@ -45,6 +45,8 @@ const Wax = forwardRef((props, ref) => { ...@@ -45,6 +45,8 @@ const Wax = forwardRef((props, ref) => {
user, user,
onChange, onChange,
targetFormat, targetFormat,
scrollMargin,
scrollThreshold,
} = props; } = props;
if (!application) return null; if (!application) return null;
...@@ -71,6 +73,8 @@ const Wax = forwardRef((props, ref) => { ...@@ -71,6 +73,8 @@ const Wax = forwardRef((props, ref) => {
placeholder={placeholder} placeholder={placeholder}
readonly={readonly} readonly={readonly}
ref={ref} ref={ref}
scrollMargin={scrollMargin}
scrollThreshold={scrollThreshold}
serializer={serializer} serializer={serializer}
targetFormat={targetFormat} targetFormat={targetFormat}
TrackChange={ TrackChange={
......
...@@ -42,6 +42,8 @@ const WaxView = forwardRef((props, ref) => { ...@@ -42,6 +42,8 @@ const WaxView = forwardRef((props, ref) => {
user, user,
targetFormat, targetFormat,
serializer, serializer,
scrollMargin,
scrollThreshold,
} = props; } = props;
const WaxEditorRef = useRef(); const WaxEditorRef = useRef();
...@@ -77,8 +79,8 @@ const WaxView = forwardRef((props, ref) => { ...@@ -77,8 +79,8 @@ const WaxView = forwardRef((props, ref) => {
dispatchTransaction, dispatchTransaction,
disallowedTools: [], disallowedTools: [],
user, user,
scrollMargin: 200, scrollMargin: scrollMargin || 200,
scrollThreshold: 200, scrollThreshold: scrollThreshold || 200,
attributes: { attributes: {
spellcheck: browserSpellCheck ? 'true' : 'false', spellcheck: browserSpellCheck ? 'true' : 'false',
}, },
......
...@@ -39,10 +39,11 @@ export default ({ area }) => { ...@@ -39,10 +39,11 @@ export default ({ area }) => {
each(marksNodes[area], (markNode, pos) => { each(marksNodes[area], (markNode, pos) => {
const id = const id =
markNode instanceof Mark ? markNode.attrs.id : markNode.node.attrs.id; markNode instanceof Mark ? markNode.attrs.id : markNode.node.attrs.id;
let activeTrackChange = null;
const activeComment = commentPlugin.getState(activeView.state).comment; const activeComment = commentPlugin.getState(activeView.state).comment;
const activeTrackChange = trakChangePlugin.getState(activeView.state) if (trakChangePlugin)
.trackChange; activeTrackChange = trakChangePlugin.getState(activeView.state)
.trackChange;
let isActive = false; let isActive = false;
if ( if (
......
...@@ -33,8 +33,8 @@ export default class Image extends Tools { ...@@ -33,8 +33,8 @@ export default class Image extends Tools {
} }
renderTool(view) { renderTool(view) {
if (isEmpty(view)) return null;
const context = useContext(WaxContext); const context = useContext(WaxContext);
if (isEmpty(view)) return null;
const upload = fileUpload( const upload = fileUpload(
view, view,
this.config.get('fileUpload'), this.config.get('fileUpload'),
......
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