-
Notifications
You must be signed in to change notification settings - Fork 24
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
Problem with mode #11
Comments
Could you provide a minimal reproducible codesandbox link? I can not reproduce this. |
I tried this Vue 2.6.14 CDN example and the <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatiple" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
</head>
<body>
<div id="app">
<json-editor-vue :mode.sync="mode"></json-editor-vue>
</div>
<script>
window.process = { env: { NODE_ENV: 'production' } }
</script>
<script type="importmap">
{
"imports": {
"vue": "https://unpkg.com/vue@2.6/dist/vue.esm.browser.min.js",
"@vue/composition-api": "https://unpkg.com/@vue/composition-api/dist/vue-composition-api.mjs",
"@vue/composition-api/dist/vue-composition-api.mjs": "https://unpkg.com/@vue/composition-api/dist/vue-composition-api.mjs",
"vue-demi": "https://unpkg.com/vue-demi/lib/v2/index.mjs",
"vanilla-jsoneditor": "https://unpkg.com/vanilla-jsoneditor",
"json-editor-vue": "https://unpkg.com/json-editor-vue@0.6/dist/json-editor-vue.mjs"
}
}
</script>
<script type="module">
import { createApp, ref } from '@vue/composition-api'
import JsonEditorVue from 'json-editor-vue'
const app = createApp({
setup: () => ({
mode: ref('text'),
}),
})
app.use(JsonEditorVue)
app.mount('#app')
</script>
</body> |
Closed for now, feel free to reach out to me if you have any question. |
TS is not required. You can have a try with the Vue 2.6.14 CDN example I provided previously, it's unlikely related to Temporarily close this due to the lack of enough information. |
After a discussion with the original author, it's not correct in the document saying text mode only take strings. Now you can directly pass JSON value to |
I could not understand, can I assign "text" to mode after 0.7.2? Anyway, I have found another way, thanks for the effort. |
It means you can pass anything in any mode now. |
Hi,
I am using this beautiful editor but having a problem with mode. I have Vue 2.6.14.
Here is my usage:
In data I also have:
mode: 'text'
,I also tried :
mode.sync="mode"
But editor is not showing up in text mode.
Thanks
The text was updated successfully, but these errors were encountered: