UNPKG

@novacbn/svelte-codejar

Version:

Svelte Binding for the embeddable code editor CodeJar

13 lines (12 loc) 533 B
import type { IOptions } from "../types/codejar"; import type { IActionHandle } from "./actions"; export declare type ICodeJarAction = IActionHandle; export declare type IHighlightCode = (code: string, syntax?: string) => string; export interface ICodeJarOptions extends Partial<IOptions> { highlight?: IHighlightCode; onUpdate?: (value: string) => void; syntax?: string; withLineNumbers?: boolean; value: string; } export declare function codejar(element: HTMLElement, options: ICodeJarOptions): ICodeJarAction;