This repository was archived by the owner on Jul 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Options
Abdullah Marax edited this page Nov 2, 2016
·
5 revisions
###List
This options take a many parameters for customize.
Vue.use(plekan,{
defaultLanguage : "tr", // Preview Language
languages : ["tr","en"], // Transalte Languages
modules:modules, // Module list
customComponents:[]
rows : [] // see [rows](Concept#row-object)
exceptButtons : {}, // not Yet
thumbnailPath:"",
customEditorButtons:[],
plekanEvent: {
onAdd : () => {},
onDelete : () => {},
onSort : () => {},
onDuplicate : () => {},
onUpdate : () => {},
onInit : () => {},
onFileUpload : function (file,cb) {
// File upload operation.
// You must give src,alt,title object of file then file upload.
// We are handle it then callback
cb({
src: "src",
alt : "alt text",
title : "Title"
})
},
},
allowedFileTypes : "png|jpg|jpeg", // Allowed upload files
plekan_buttons : { // Special buttons
save : {
text : "Save",
class:"plekan-footer-button cancel",
callback : function (e) {
// do this
}
},
cancel : {
text : "Cancel",
class:"plekan-footer-button save",
callback : function (e) {
// do this
}
}
}
})
You can access options except customComponents, modules, defaultLanguage, languages, rows on global instance or run time.
For example:
this.$plekan_buttons.cancel.callback = (e) => {
// Do this
}