Skip to content

yangxyo/document-editor-vue2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

git clone https://github.com/yangxyo/document-editor-vue2.git

Usage

Find below the component usage example:

<template>
  <DocumentEditor
    id="docEditor"
    documentServerUrl="http://documentserver/"
    :config="config"
    :events_onDocumentReady="onDocumentReady"
  />
</template>

<script lang="ts">
import { DocumentEditor } from "@/components/document-editor-vue2";

export default {
  name: "ExampleComponent",
  components: {
    DocumentEditor,
  },
  data() {
    return {
      config: {
        document: {
          fileType: "docx",
          key: "Khirz6zTPdfd7",
          title: "Example Document Title.docx",
          url: "https://example.com/url-to-example-document.docx",
        },
        documentType: "word",
        editorConfig: {
          callbackUrl: "https://example.com/url-to-callback.ashx",
        },
      },
    };
  },
  methods: {
    onDocumentReady() {
      console.log("Document is loaded");
    },
  },
};
</script>

API

See:https://github.com/ONLYOFFICE/document-editor-vue#api

About

Vue2 component for ONLYOFFICE Document Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 84.5%
  • JavaScript 15.5%