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