PHP Classes

File: bootstrap/ckeditor/plugins/basewidget/README.md

Recommend this page to a friend!
  Classes of Minh Tien   Noblesse CMS   bootstrap/ckeditor/plugins/basewidget/README.md   Download  
File: bootstrap/ckeditor/plugins/basewidget/README.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Noblesse CMS
Content management system with custom plugins
Author: By
Last change:
Date: 8 years ago
Size: 1,579 bytes
 

Contents

Class file image Download

Base widget plugin

Description

This plugin allows you to use reuse,override and define functions. It also enables you to decide which nested functions will be exucted in the base.

Configuration

require:'basewidget'

Sample widget creation process

 var definition = {
    template: '',
    extend: { //Functions defined here will be executed with the same context as the onedd in the base widget
        init: function() {

        }
    },
    configuration: {
        init: { //Specifies in which main function you are controlling the sub-functions flow.
            blockEvents: false, //blockEvents function will not be executed
            configToolbar: { //Configure the popup menu bar on each widget
            defaultButtons: {
                edit: {
                    onClick: function() { //All onClick functions are bound to the widget context

                    }
                }
            },
            buttons: [{
                label: 'added from config',
                icon: '',
                onClick: function() {

                }
            }]
            }
        }
    },
    editables: {
        contentfield: {
            selector: '.bootstrapalert',
            allowedContent: ''
        }
    }
};

CKEDITOR.basewidget.addWidget(editor, name, def);
```

#### If you want to override entire main function defined in the base just add it alone in the definition object.