Commit 3d593492 by Torkel Ödegaard

fix to text panel and transparent mode

parent 150d2180
......@@ -13,14 +13,15 @@ export class TextPanelCtrl extends PanelCtrl {
mode : "markdown", // 'html', 'markdown', 'text'
content : "# title",
};
/** @ngInject */
/** @ngInject **/
constructor($scope, $injector, private templateSrv, private $sce) {
super($scope, $injector);
_.defaults(this.panel, this.panelDefaults);
this.events.on('init-edit-mode', this.onInitEditMode.bind(this));
this.events.on('refresh', this.onRender.bind(this));
this.events.on('refresh', this.onRefresh.bind(this));
this.events.on('render', this.onRender.bind(this));
}
......@@ -29,6 +30,10 @@ export class TextPanelCtrl extends PanelCtrl {
this.editorTabIndex = 1;
}
onRefresh() {
this.render();
}
onRender() {
if (this.panel.mode === 'markdown') {
this.renderMarkdown(this.panel.content);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment