Skip to content

Commit 025b5b5

Browse files
committed
Downgraded vue-prism-editor to 0.6.1
1 parent 20ba615 commit 025b5b5

File tree

3 files changed

+38
-19
lines changed

3 files changed

+38
-19
lines changed

docs/.vuepress/components/MojsInteractive.vue

+2-15
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ circles.play()"
8181
<div class="mojs-interactive">
8282
<div class="mojs-interactive__code">
8383
<prism-editor
84-
v-model="code"
85-
:highlight="highlighter"
8684
:code="rawCode"
8785
language="js"
8886
@change="change"
@@ -113,15 +111,8 @@ circles.play()"
113111
</template>
114112

115113
<script>
116-
// import Prism Editor
117-
import { PrismEditor } from "vue-prism-editor";
118-
import "vue-prism-editor/dist/prismeditor.min.css"; // import the styles somewhere
119-
120-
// import highlighting library (you can use any library you want just return html string)
121-
import { highlight, languages } from "prismjs/components/prism-core";
122-
import "prismjs/components/prism-clike";
123-
import "prismjs/components/prism-javascript";
124-
import "prismjs/themes/prism-tomorrow.css"; // import syntax highlighting styles
114+
import prism from "prismjs";
115+
import PrismEditor from "vue-prism-editor";
125116
126117
export default {
127118
components: {
@@ -154,10 +145,6 @@ export default {
154145
},
155146
156147
methods: {
157-
highlighter: function (code) {
158-
return highlight(code, languages.js); // languages.<insert language> to return html with markup
159-
},
160-
161148
change: function (c) {
162149
this.rawCode = c;
163150
},

package-lock.json

+35-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
"@mojs/curve-editor": "^1.5.0",
3434
"@mojs/player": "^0.43.16",
3535
"@vuepress/shared-utils": "^1.7.1",
36-
"vue-prism-editor": "^2.0.0-alpha.2"
36+
"vue-prism-editor": "^0.6.1"
3737
}
3838
}

0 commit comments

Comments
 (0)