|
@@ -311,6 +311,17 @@ class Cell extends Widget {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Clone the cell, using the same model.
|
|
|
+ */
|
|
|
+ clone() {
|
|
|
+ let constructor = this.constructor as typeof Cell;
|
|
|
+ return new constructor({
|
|
|
+ model: this.model,
|
|
|
+ contentFactory: this.contentFactory
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Dispose of the resources held by the widget.
|
|
|
*/
|
|
@@ -609,6 +620,18 @@ class CodeCell extends Cell {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Clone the cell, using the same model.
|
|
|
+ */
|
|
|
+ clone() {
|
|
|
+ let constructor = this.constructor as typeof CodeCell;
|
|
|
+ return new constructor({
|
|
|
+ model: this.model,
|
|
|
+ contentFactory: this.contentFactory,
|
|
|
+ rendermime: this._rendermime
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Dispose of the resources used by the widget.
|
|
|
*/
|
|
@@ -849,6 +872,18 @@ class MarkdownCell extends Cell {
|
|
|
return Promise.resolve(void 0);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Clone the cell, using the same model.
|
|
|
+ */
|
|
|
+ clone() {
|
|
|
+ let constructor = this.constructor as typeof MarkdownCell;
|
|
|
+ return new constructor({
|
|
|
+ model: this.model,
|
|
|
+ contentFactory: this.contentFactory,
|
|
|
+ rendermime: this._rendermime
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
private _monitor: ActivityMonitor<any, any> = null;
|
|
|
private _renderer: IRenderMime.IRenderer = null;
|
|
|
private _rendermime: RenderMime;
|