UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

20 lines (16 loc) 517 B
import marked from 'marked'; import uiModules from 'ui/modules'; import 'angular-sanitize'; marked.setOptions({ gfm: true, // Github-flavored markdown sanitize: true // Sanitize HTML tags }); const module = uiModules.get('kibana/markdown_vis', ['kibana', 'ngSanitize']); module.controller('KbnMarkdownVisController', function ($scope, $element) { $scope.$watch('vis.params.markdown', function (html) { if (html) { $scope.html = marked(html); } $element.trigger('renderComplete'); }); });