refactor(editor): align rich text util apis (#11039)

This commit is contained in:
Saul-Mirone
2025-03-20 10:40:11 +00:00
parent 77e659d0b0
commit 66ea3038af
18 changed files with 57 additions and 73 deletions
@@ -15,7 +15,7 @@ export const splitParagraphCommand: Command<
}
> = (ctx, next) => {
const { std } = ctx;
const { store, host, selection } = std;
const { store, selection } = std;
let blockId = ctx.blockId;
if (!blockId) {
const text = selection.find(TextSelection);
@@ -26,7 +26,7 @@ export const splitParagraphCommand: Command<
const model = store.getBlock(blockId)?.model;
if (!model || !matchModels(model, [ParagraphBlockModel])) return;
const inlineEditor = getInlineEditorByModel(host, model);
const inlineEditor = getInlineEditorByModel(std, model);
const range = inlineEditor?.getInlineRange();
if (!range) return;