Skip to the content

Hikidashi引き出し

Era dates (和暦) and kanji numerals both ways, the dictionary forms of a conjugated word, a reading shared out over its kanji, words pulled from pasted text, and how hard a sentence is to read.

Hikidashi (引き出し) is a drawer: each tool is pulled out when it is wanted. About the name

Contents

Reference · /element

HikidashiElementOptionstype

Host callbacks for a text-tool element. Native events carry the same result or message.

Import it

import type { HikidashiElementOptions } from "@johnmorrisdotca/hikidashi/element";

Also exported from: @johnmorrisdotca/hikidashi/element/define

Definition

type HikidashiElementOptions = {
    onChange?: (result: HikidashiResult) => void;
    onError?: (detail: {
        message: string;
    }) => void;
};

Members

NameTypeDescription
onChange (optional)((result: HikidashiResult) => void) | undefined

Called after input or presentation changes, with the result or null.

onError (optional)((detail: { message: string; }) => void) | undefined

Called with a plain message when the input cannot be read.

Examples

import type { HikidashiElementOptions } from "@johnmorrisdotca/hikidashi/element";
const options: HikidashiElementOptions = { onChange: result => console.log(result) };
console.log(typeof options.onChange);
function

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hikidashi 1.1.0.