mirror of https://github.com/fantasticit/think.git
tiptap: remove scroll
This commit is contained in:
parent
514873f31a
commit
bb1924e89b
|
@ -108,17 +108,7 @@ export const CollaborationKit = [
|
||||||
Loading,
|
Loading,
|
||||||
OrderedList,
|
OrderedList,
|
||||||
SelectionExtension,
|
SelectionExtension,
|
||||||
ScrollIntoView.configure({
|
ScrollIntoView,
|
||||||
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),
|
|
||||||
}),
|
|
||||||
Strike,
|
Strike,
|
||||||
Subscript,
|
Subscript,
|
||||||
Superscript,
|
Superscript,
|
||||||
|
|
Loading…
Reference in New Issue