We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First of all, this is an amazing library, I spent quite some time trying to find this exact package, I didn't want a full editor.
Also, could you support Typescript typings ?
So, thank very much.
The text was updated successfully, but these errors were encountered:
Here's a definitions file you can copy paste into your project for Typescript support:
declare module 'textarea-editor' { interface TAE_Prefix { value: string | ((text: string, line: number, ...args: any[] ) => string); // eslint-disable-line @typescript-eslint/no-explicit-any pattern: string; antipattern?: string | undefined; } interface TAE_Format { block?: boolean | undefined; multiline?: boolean | undefined; prefix: TAE_Prefix; suffix?: TAE_Prefix | undefined; } class TextAreaEditor { constructor( textarea: HTMLTextAreaElement ); range() : [start: number, end: number]; range( range: number[] ) : TextAreaEditor; public range( range?: [start: number, end: number] | undefined ) : [start: number, end: number] | TextAreaEditor; public insert( text: string ) : TextAreaEditor; public focus() : TextAreaEditor; public toggle( format: string | TAE_Format, ...args: unknown[] ) : TextAreaEditor; public format( name: string | TAE_Format, ...args: unknown[] ) : TextAreaEditor; public unformat( name: string | TAE_Format ) : TextAreaEditor; public hasFormat( name: string | TAE_Format ) : boolean; } export default TextAreaEditor; }
Sorry, something went wrong.
No branches or pull requests
First of all, this is an amazing library, I spent quite some time trying to find this exact package, I didn't want a full editor.
Also, could you support Typescript typings ?
So, thank very much.
The text was updated successfully, but these errors were encountered: