diff --git a/src/Repl.vue b/src/Repl.vue index 30e0bc20..3520a8df 100644 --- a/src/Repl.vue +++ b/src/Repl.vue @@ -28,6 +28,11 @@ export interface Props { importCode?: string useCode?: string } + showRuntimeError?: boolean + showRuntimeWarning?: boolean + } + editorOptions?: { + ShowErrorText?: string } } @@ -51,8 +56,13 @@ const props = withDefaults(defineProps(), { importCode: '', useCode: '', }, + showRuntimeError: true, + showRuntimeWarning: true, }), layout: 'horizontal', + editorOptions: () => ({ + ShowErrorText: 'Show Error', + }), }) if (!props.editor) { @@ -73,6 +83,7 @@ provide('import-map', toRef(props, 'showImportMap')) provide('tsconfig', toRef(props, 'showTsConfig')) provide('clear-console', toRef(props, 'clearConsole')) provide('preview-options', props.previewOptions) +provide('editor-options', props.editorOptions) provide('theme', toRef(props, 'theme')) provide('preview-theme', toRef(props, 'previewTheme')) provide('preview-ref', () => outputRef.value?.previewRef?.container) diff --git a/src/editor/MessageToggle.vue b/src/editor/MessageToggle.vue index 7c7943cf..107ff665 100644 --- a/src/editor/MessageToggle.vue +++ b/src/editor/MessageToggle.vue @@ -1,10 +1,14 @@