mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
feat(editor): replace slot with rxjs subject (#10768)
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
"date-fns": "^4.0.0",
|
||||
"lit": "^3.2.0",
|
||||
"minimatch": "^10.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"yjs": "^13.6.21",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user