repl
repl copied to clipboard
Can the editor be used separately?
For example
<template>
<Monaco :value="value" />
</template>
<script setup>
import Monaco from '@vue/repl/monaco-editor'
const value = `<template>xxx</template>`
</script>
Or hide the preview
<template>
<Repl :editor="Monaco" :show-preview="false" />
</template>
<script setup>
import { Repl } from '@vue/repl'
import Monaco from '@vue/repl/monaco-editor'
</script>
Only the editor is displayed. Do you want to implement a custom layout? 🤔
I wanted to support Vue syntax in monaco editor, so I found this project
我想问下 能不能只用这个预览器 预览这个模板代码 模板代码是接口回来的
@2091124175 可以的,你可以直接使用 Sandbox
https://stackblitz.com/edit/vitejs-vite-socxduic?file=src%2FApp.vue