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

display on toggle Change

parent 93c16f6a
No related branches found
No related tags found
No related merge requests found
......@@ -53,9 +53,9 @@ const Editoria = () => {
value={demo}
// readonly
layout={layout}
onChange={debounce(source => {
console.log(JSON.stringify(source));
}, 200)}
// onChange={debounce(source => {
// console.log(JSON.stringify(source));
// }, 200)}
user={user}
scrollMargin={200}
scrollThreshold={200}
......
......@@ -18,7 +18,7 @@ export default props => {
pmViews: props.view || {},
activeView: props.activeView || {},
activeViewId: props.activeViewId || {},
options: { fullScreen: false },
options: { fullScreen: false, AiOn: false },
transaction: {},
setTransaction: tr => {
Object.assign(context.transaction, tr);
......
......@@ -23,8 +23,10 @@ const ToggleAiComponent = () => {
if (!isEditable) isDisabled = true;
const handleChange = () => {
setChecked(!checked);
context.setOption({ AiOn: !checked });
setChecked(!checked);
main.dispatch(main.state.tr.setMeta('addToHistory', false));
main.focus();
};
return useMemo(
......
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