Commit 34d0c083 by Rashid Khan

ensure text panel content is hidden until showdown.js is available

parent 3eb9c5de
<kibana-panel ng-controller='text' ng-init="init()">
<!--<p ng-style="panel.style" ng-bind-html-unsafe="panel.content | striphtml | newlines"></p>-->
<markdown>
<markdown ng-show="ready">
{{panel.content}}
</markdown>
</kibana-panel>
\ No newline at end of file
......@@ -10,6 +10,7 @@ angular.module('kibana.text', [])
_.defaults($scope.panel,_d);
$scope.init = function() {
$scope.ready = false;
}
}).directive('markdown', function() {
......@@ -23,6 +24,7 @@ angular.module('kibana.text', [])
function render_panel() {
var scripts = $LAB.script("panels/text/lib/showdown.js")
scripts.wait(function(){
scope.ready = true;
var converter = new Showdown.converter();
var text = scope.panel.content.replace(/&/g, '&amp;')
.replace(/>/g, '&gt;')
......
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