generated from laur/svelte-tailwind-storybook
19 lines
350 B
TypeScript
19 lines
350 B
TypeScript
|
export class MarkdownView {
|
||
|
textarea: any;
|
||
|
|
||
|
constructor(target: any, content: any) {
|
||
|
this.textarea = target.appendChild(document.createElement('textarea'));
|
||
|
this.textarea.value = content;
|
||
|
}
|
||
|
|
||
|
get content() {
|
||
|
return this.textarea.value;
|
||
|
}
|
||
|
focus() {
|
||
|
this.textarea.focus();
|
||
|
}
|
||
|
destroy() {
|
||
|
this.textarea.remove();
|
||
|
}
|
||
|
}
|