Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
6d366410
Commit
6d366410
authored
Mar 19, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(text panel): fixed escaping issue with markdown in text panel, fixes #4409
parent
662dbaf8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
public/app/plugins/panel/text/module.ts
+6
-11
No files found.
public/app/plugins/panel/text/module.ts
View file @
6d366410
...
...
@@ -12,7 +12,7 @@ var panelDefaults = {
export
class
TextPanelCtrl
extends
PanelCtrl
{
static
templateUrl
=
`public/app/plugins/panel/text/module.html`
;
converter
:
any
;
remarkable
:
any
;
content
:
string
;
/** @ngInject */
...
...
@@ -54,21 +54,16 @@ export class TextPanelCtrl extends PanelCtrl {
}
renderMarkdown
(
content
)
{
var
text
=
content
.
replace
(
/&/g
,
'&'
)
.
replace
(
/>/g
,
'>'
)
.
replace
(
/</g
,
'<'
);
if
(
this
.
converter
)
{
this
.
updateContent
(
this
.
converter
.
makeHtml
(
text
));
}
else
{
if
(
!
this
.
remarkable
)
{
return
System
.
import
(
'remarkable'
).
then
(
Remarkable
=>
{
var
md
=
new
Remarkable
();
this
.
remarkable
=
new
Remarkable
();
this
.
$scope
.
$apply
(()
=>
{
this
.
updateContent
(
md
.
render
(
tex
t
));
this
.
updateContent
(
this
.
remarkable
.
render
(
conten
t
));
});
});
}
this
.
updateContent
(
this
.
remarkable
.
render
(
content
));
}
updateContent
(
html
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment