Get text in TextEditor mini

Hi everyone!

I’m dev of word-map atom package, which the target is get the text, find replacement acc. dict-pairs, delete selected text and insert new text. it is useful e.g. convert s -> σ or D->Δ with single key.

I can’t find how to get text from TextEdit with mini flag,
e.g. the pointer is in find-and-replace panel -> atom-text-editor “editor mini” object, but the code below get text always from last TextEditor without mini flag.

const editor = atom.workspace.getActiveTextEditor()
var selections = editor.getSelections()

Do you have idea how to solve it?