feat(editor): replace slot with rxjs subject (#10768)

This commit is contained in:
Mirone
2025-03-12 11:29:24 +09:00
committed by GitHub
parent 19f978d9aa
commit cd63e0ed8b
302 changed files with 1405 additions and 1251 deletions
@@ -81,7 +81,7 @@ export class LinkCell extends BaseCellRenderer<string> {
return;
}
std.getOptional(RefNodeSlotsProvider)?.docLinkClicked.emit({
std.getOptional(RefNodeSlotsProvider)?.docLinkClicked.next({
pageId: this.docId$.value,
host: std.host,
});
@@ -339,8 +339,10 @@ export class RichTextCell extends BaseCellRenderer<Text> {
effect(() => {
const editor = this.inlineEditor$.value;
if (editor) {
const disposable = editor.slots.keydown.on(this._handleKeyDown);
return () => disposable.dispose();
const disposable = editor.slots.keydown.subscribe(
this._handleKeyDown
);
return () => disposable.unsubscribe();
}
return;
})