Skip to content

Yogi-Jiang/components-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-ueditor

A Vue component for ueditor.

Installation

npm install git+https://github.com/Yogi-Jiang/components-library.git

Dependency

Instruction

page.js

{
    "template": require("./page.html"),
    "components": {
        "ueditor": require("components/vue-ueditor")
    },
    "data": function () {
        return {
            editor: null,
            composition: '',
            UEConfig: {
                UEDITOR_HOME_URL: 'http://cdn.staticfile.org/ueditor/1.4.3/',
                themePath: 'http://cdn.staticfile.org/ueditor/1.4.3/themes/',
                customCssFile: 'static/iframe.css',
                serverUrl: 'static/nodejs/config.json',
                initialContent: '欢迎来到ueditor!',
                initialFrameWidth: 800,
                initialFrameHeight: 600,
                allowDivTransToP: false,
                pasteplain: true,
                imagePopup: true,
                autoFloatEnabled: true,
                topOffset: 50
            },
            businessConfig: {
                hideIcons: ['insertPano', 'insertPoi']
            },  
        }
    },
    "methods": {
        getEditor(editor) {
            editor.setContent(this.composition)
            this.editor = editor
        }
    }
}

page.html

<ueditor :UEConfig="'UEConfig'" :businessConfig="businessConfig" @ready="getEditor"></krpano>

Props

Name Description Example
UEConfig ueditor config object, UEDITOR_HOME_URL and serverUrl are required UEConfig
businessConfig custom config, eg hide some custom icons businessConfig

Events

Name Description Example
ready trigger when ueditor is ready, the editor instance will be passed as first parameter for handle function getEditor

About

For any question, please feel free to write email to [email protected]

About

vue components library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages