tiptap: remove scroll

This commit is contained in:
fantasticit 2022-05-05 17:48:21 +08:00
parent 514873f31a
commit bb1924e89b
1 changed files with 1 additions and 11 deletions

View File

@ -108,17 +108,7 @@ export const CollaborationKit = [
Loading,
OrderedList,
SelectionExtension,
ScrollIntoView.configure({
onScroll: debounce((editor) => {
setTimeout(() => {
const element = editor.options.element;
// 脏代码:这里使用 parentElement 是和布局有关的,需要根据实际情况修改
const parentElement = element.parentNode as HTMLElement;
const nextScrollTop = element.scrollHeight;
parentElement.scrollTop = nextScrollTop;
}, 0);
}, 200),
}),
ScrollIntoView,
Strike,
Subscript,
Superscript,