fix: monaco editor disabled state
This commit is contained in:
@@ -54,7 +54,10 @@
|
||||
fontSize: monacoFontSize,
|
||||
lineNumbersMinChars: 3,
|
||||
automaticLayout: true,
|
||||
language: '{{ $language }}'
|
||||
language: '{{ $language }}',
|
||||
domReadOnly: '{{ $readonly ?? false }}',
|
||||
contextmenu: '!{{ $readonly ?? false }}',
|
||||
renderLineHighlight: '{{ $readonly ?? false }} ? none : all'
|
||||
});
|
||||
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
@@ -95,7 +98,7 @@
|
||||
}, 5);" :id="monacoId">
|
||||
</div>
|
||||
<div class="relative z-10 w-full h-full">
|
||||
<div x-ref="monacoEditorElement" class="w-full h-96 text-md"></div>
|
||||
<div x-ref="monacoEditorElement" class="w-full h-96 text-md {{ $readonly ? 'opacity-65' : '' }}"></div>
|
||||
<div x-ref="monacoPlaceholderElement" x-show="monacoPlaceholder" @click="monacoEditorFocus()"
|
||||
:style="'font-size: ' + monacoFontSize"
|
||||
class="w-full text-sm font-mono absolute z-50 text-gray-500 ml-14 -translate-x-0.5 mt-0.5 left-0 top-0"
|
||||
|
||||
Reference in New Issue
Block a user