BookStack/resources/js/components/code-textarea.js

16 lines
348 B
JavaScript
Raw Normal View History

/**
* A simple component to render a code editor within the textarea
* this exists upon.
*/
import {Component} from './component';
2022-11-15 07:44:57 -05:00
export class CodeTextarea extends Component {
async setup() {
const {mode} = this.$opts;
const Code = await window.importVersioned('code');
Code.inlineEditor(this.$el, mode);
}
}