aurelia-trumbowyg-plugin

0.1.7 • Public • Published

aurelia-trumbowyg-plugin

Install

npm i jquery trumbowyg aurelia-trumbowyg-plugin

Bundle (CLI requirejs)

"jquery",
{
    "name": "trumbowyg",
    "path": "../node_modules/trumbowyg/dist",
    "main": "trumbowyg",
    "deps": ["jquery"],
    "resources": [
        "ui/trumbowyg.css"
    ]
},
{
    "name": "aurelia-trumbowyg-plugin",
    "path": "../node_modules/aurelia-trumbowyg-plugin/dist/amd",
    "main": "index"
}

Register

aurelia.use.plugin('aurelia-trumbowyg-plugin');

WebPack

import svgPath from 'trumbowyg/dist/ui/icons.svg';

...
aurelia.use.plugin(PLATFORM.moduleName('aurelia-trumbowyg-plugin'), {svgPath});
...

Usage

<require from="trumbowyg/ui/trumbowyg.css"></require>

<trumbowyg-editor value.bind="message"></trumbowyg-editor>

Options

For global options pass a trumbowyg config object when registering the plugin:

let options = {
  /* trumbowyg options */
};

aurelia.use.plugin('aurelia-trumbowyg-plugin', options);

If you want per-instance options use the bindable options property:

<trumbowyg-editor value.bind="content"
        options.bind="{ /* trumbowyg options */ }">
</trumbowyg-editor>

Package Sidebar

Install

npm i aurelia-trumbowyg-plugin

Weekly Downloads

98

Version

0.1.7

License

MIT

Unpacked Size

27.4 kB

Total Files

11

Last publish

Collaborators

  • arabsight