0.0.8 • Published 1 year ago

vue-xml-editor v0.0.8

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Package installed

"dependencies": {
    "highlight.js": "^11.0.1",
    "vue-xml-editor": "^0.0.5"
  }

OR

npm highlight.js vue-xml-editor --save

Highlight.js xml editor plugin for Vue.js

Then simply register the plugin with Vue:

import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import xmlEditorPlugin from "vue-xml-editor";

hljs.registerLanguage('javascript', javascript);

const app = createApp(App)
app.use(xmlEditorPlugin)
app.mount('#app')

Using component locally

<template>
  <div>test</div>
  <xmlEditor
    class=""
    language="xml"
    :code="inputContent"
    @update="updateNow"
  ></xmlEditor>
</template>

<script lang="ts">
import axios from "axios";
import { defineComponent } from "vue";
export default defineComponent({
  name: "app",
  data() {
    return {
      inputContent: "",
      test: "jlj",
    };
  },
  methods: {
    updateNow(val) {
      console.log(val, "val");
    },
  },
  async mounted() {
  },
});
</script>
0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago