@ewizardjs/vue-editor

4.4.1 • Public • Published

Usage

const edit = require('vue-editor');

edit('path/to/slide/index.vue')
    .setTemplate(template)
    .setStyle(style)
    .save();

Arguments template and style should be taken from cobat API .getSlide() method on front end:

co.getSlide(slideId)
    .then({ template, style } => {...}

Example of .setTemplate's template argument:

<div class="slide">
    <h1>Slide 1</h1>
<div class="slide">

Example of .setStyle's style argument

{
    '#v-header-9dfe': {
        background: 'green',
        color: 'black'
    },
    '#v-button-1111': {
        background: 'white',
        'line-height': '1em'
    }
};

validateContentType(contentPath, contentType)

  • Arguments:

    • {String} contentPath
    • {String} contentType
  • Returns: {Promise}

  • Usage: Take content path and content type and validate it.

  • Success Response: Fulfills if content type corresponding to requested.

  • Error Response:

    • ContentTypeValidationError - type not corresponding to requested.
    • EwizardContentValidationError - package is not an eWizard content.

Readme

Keywords

none

Package Sidebar

Install

npm i @ewizardjs/vue-editor

Weekly Downloads

0

Version

4.4.1

License

ISC

Unpacked Size

138 kB

Total Files

70

Last publish

Collaborators

  • serhii_but
  • alexbelov
  • v.kobyletskiy
  • m.polevchuk
  • b.hryhoriev
  • ewizardjs-team
  • vasylshylov