Browse Source

Merge branch 'dev' of https://github.com/artf/grapesjs into dev

pull/2062/head v0.14.62
Artur Arseniev 7 years ago
parent
commit
60c1755c57
  1. 3
      .github/FUNDING.yml
  2. 6
      src/dom_components/model/Component.js

3
.github/FUNDING.yml

@ -0,0 +1,3 @@
# Shows a funding button via Open Collective
open_collective: grapesjs

6
src/dom_components/model/Component.js

@ -757,12 +757,12 @@ const Component = Backbone.Model.extend(Styleable).extend(
* @param {Options} opts Options for the add
* @return {Array} Array of added traits
* @example
* component.addTrat('title', { at: 1 }); // Add title trait (`at` option is the position index)
* component.addTrat({
* component.addTrait('title', { at: 1 }); // Add title trait (`at` option is the position index)
* component.addTrait({
* type: 'checkbox',
* name: 'disabled',
* });
* component.addTrat(['title', {...}, ...]);
* component.addTrait(['title', {...}, ...]);
*/
addTrait(trait, opts = {}) {
const { em } = this;

Loading…
Cancel
Save