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