|
@@ -574,7 +574,7 @@ class MimeRendererFactory extends ABCWidgetFactory<MimeRenderer, DocumentRegistr
|
|
* Construct a new markdown widget factory.
|
|
* Construct a new markdown widget factory.
|
|
*/
|
|
*/
|
|
constructor(options: MimeRendererFactory.IOptions) {
|
|
constructor(options: MimeRendererFactory.IOptions) {
|
|
- super({ ...options, readOnly: true });
|
|
|
|
|
|
+ super(Private.createRegistryOptions(options));
|
|
this._rendermime = options.rendermime;
|
|
this._rendermime = options.rendermime;
|
|
this._mimeType = options.mimeType;
|
|
this._mimeType = options.mimeType;
|
|
this._renderTimeout = options.renderTimeout || 1000;
|
|
this._renderTimeout = options.renderTimeout || 1000;
|
|
@@ -649,3 +649,17 @@ namespace MimeRendererFactory {
|
|
dataType?: 'string' | 'json';
|
|
dataType?: 'string' | 'json';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * The namespace for the module implementation details.
|
|
|
|
+ */
|
|
|
|
+namespace Private {
|
|
|
|
+ /**
|
|
|
|
+ * Create the document registry options.
|
|
|
|
+ */
|
|
|
|
+ export
|
|
|
|
+ function createRegistryOptions(options: MimeRendererFactory.IOptions): DocumentRegistry.IWidgetFactoryOptions {
|
|
|
|
+ return { ...options, readOnly: true } as DocumentRegistry.IWidgetFactoryOptions;
|
|
|
|
+ }
|
|
|
|
+}
|