editor options

This commit is contained in:
Lone Iversen
2023-10-05 10:46:18 +02:00
committed by Jacob Overgaard
parent 58a6d41dc7
commit e165aecd6c
2 changed files with 7 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
* @element umb-input-markdown
* @fires change - when the value of the input changes
*/
@customElement('umb-input-markdown')
export class UmbInputMarkdownElement extends FormControlMixin(UmbLitElement) {
protected getFormElement() {
@@ -31,6 +32,11 @@ export class UmbInputMarkdownElement extends FormControlMixin(UmbLitElement) {
async #loadCodeEditor() {
try {
await loadCodeEditor();
this._codeEditor?.editor?.updateOptions({
lineNumbers: false,
minimap: false,
folding: false,
});
this.#isCodeEditorReady.next(true);
} catch (error) {
console.error(error);

View File

@@ -10,8 +10,4 @@ const meta: Meta<UmbInputMarkdownElement> = {
export default meta;
type Story = StoryObj<UmbInputMarkdownElement>;
export const Overview: Story = {
args: {
value: 'markdown',
},
};
export const Overview: Story = {};