Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<a
href="https://github.com/vue-styleguidist/vue-live/tree/master/demo"
>Check out the source for this demo</a>
<h2>With imported components</h2>
<VueLive :code="codeTemplate" :layout="CustomLayout" :components="registeredComponents" />
<h2>With imported components and the code-editor lineNumers</h2>
<VueLive :editorProps="{lineNumbers: true}" :code="codeTemplate" :layout="CustomLayout" :components="registeredComponents" />
<h2>Display Single File Components</h2>
<VueLive :code="codeSfc" :layout="CustomLayout" />
<h2>Pure JavaScript code</h2>
Expand Down
11 changes: 10 additions & 1 deletion src/VueLive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:components="components"
>
<template v-slot:editor>
<PrismEditor v-model="stableCode" @change="updatePreview" :language="prismLang" />
<PrismEditor v-model="stableCode" @change="updatePreview" :language="prismLang" v-bind="editorProps" />
</template>
<template v-slot:preview>
<Preview
Expand Down Expand Up @@ -100,6 +100,15 @@ export default {
layoutProps: {
type: Object,
default: undefined
},
/**
* they can change the vue-prism-editor props
* there props will use to the vue-prism-editor example { lineNumbers }
* more https://github.com/koca/vue-prism-editor
*/
editorProps: {
type: Object,
default: () => ({})
}
},
data() {
Expand Down