Skip to content

Can the editor be used separately? #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
huodoushigemi opened this issue Feb 22, 2025 · 4 comments
Open

Can the editor be used separately? #323

huodoushigemi opened this issue Feb 22, 2025 · 4 comments
Labels
enhancement New feature or request

Comments

@huodoushigemi
Copy link

huodoushigemi commented Feb 22, 2025

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>
@wangcch
Copy link
Collaborator

wangcch commented Feb 24, 2025

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

@huodoushigemi
Copy link
Author

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

@edison1105 edison1105 added the enhancement New feature or request label Feb 25, 2025
@2091124175
Copy link

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

@wangcch
Copy link
Collaborator

wangcch commented Apr 9, 2025

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants