mobiledoc-kit
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -43,3 +43,11 @@ 'use strict'; | ||
var payload = (0, _utilsCopy.shallowCopyObject)(this.payload); | ||
return this.builder.createCardSection(this.name, payload); | ||
var card = this.builder.createCardSection(this.name, payload); | ||
// If this card is currently rendered, clone the mode it is | ||
// currently in as the default mode of the new card. | ||
var mode = this._initialMode; | ||
if (this.renderNode && this.renderNode.cardNode) { | ||
mode = this.renderNode.cardNode.mode; | ||
} | ||
card.setInitialMode(mode); | ||
return card; | ||
} | ||
@@ -46,0 +54,0 @@ |
{ | ||
"name": "mobiledoc-kit", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A toolkit for building WYSIWYG editors with Mobiledoc", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/bustlelabs/mobiledoc-kit", |
@@ -27,4 +27,12 @@ import Section from './_section'; | ||
clone() { | ||
const payload = shallowCopyObject(this.payload); | ||
return this.builder.createCardSection(this.name, payload); | ||
let payload = shallowCopyObject(this.payload); | ||
let card = this.builder.createCardSection(this.name, payload); | ||
// If this card is currently rendered, clone the mode it is | ||
// currently in as the default mode of the new card. | ||
let mode = this._initialMode; | ||
if (this.renderNode && this.renderNode.cardNode) { | ||
mode = this.renderNode.cardNode.mode; | ||
} | ||
card.setInitialMode(mode); | ||
return card; | ||
} | ||
@@ -31,0 +39,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1821563
26106