repl icon indicating copy to clipboard operation
repl copied to clipboard

Can the editor be used separately?

Open huodoushigemi opened this issue 9 months ago • 2 comments

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>

huodoushigemi avatar Feb 22 '25 20:02 huodoushigemi

Only the editor is displayed. Do you want to implement a custom layout? 🤔

wangcch avatar Feb 24 '25 03:02 wangcch

I wanted to support Vue syntax in monaco editor, so I found this project

huodoushigemi avatar Feb 25 '25 08:02 huodoushigemi

我想问下 能不能只用这个预览器 预览这个模板代码 模板代码是接口回来的

2091124175 avatar Apr 09 '25 03:04 2091124175

@2091124175 可以的,你可以直接使用 Sandbox

https://stackblitz.com/edit/vitejs-vite-socxduic?file=src%2FApp.vue

wangcch avatar Apr 09 '25 06:04 wangcch