Skip to content

Commit 730aaa6

Browse files
christopherdohertymariohernandez
christopherdoherty
authored and
mariohernandez
committed
Issue #3272498: Allow markup display in Cygnet theme UI
1 parent f729d6d commit 730aaa6

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

js/patternkit.jsoneditor.cygnet.es6.js

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class cygnetTheme extends JSONEditor.AbstractTheme {
88
getFormInputDescription (text) {
99
const el = super.getFormInputDescription(text)
1010
el.classList.add('je-cygnet-form-input-label')
11+
el.innerHTML = text
1112
return el
1213
}
1314

@@ -28,6 +29,13 @@ class cygnetTheme extends JSONEditor.AbstractTheme {
2829
return el
2930
}
3031

32+
getDescription (text) {
33+
const el = super.getDescription(text)
34+
el.classList.add('je-cygnet-description')
35+
el.innerHTML = text
36+
return el
37+
}
38+
3139
// If no title, use the text as title so that we have can use the
3240
// title attr as a CSS selector to style the collapse/expand state.
3341
setButtonText (button, text, icon, title) {

js/patternkit.jsoneditor.js

+10
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ var cygnetTheme = /*#__PURE__*/function (_JSONEditor$AbstractT) {
285285
var el = _get(_getPrototypeOf(cygnetTheme.prototype), "getFormInputDescription", this).call(this, text);
286286

287287
el.classList.add('je-cygnet-form-input-label');
288+
el.innerHTML = text;
288289
return el;
289290
}
290291
}, {
@@ -308,6 +309,15 @@ var cygnetTheme = /*#__PURE__*/function (_JSONEditor$AbstractT) {
308309

309310
el.classList.add('je-cygnet-child-editor-holder');
310311
return el;
312+
}
313+
}, {
314+
key: "getDescription",
315+
value: function getDescription(text) {
316+
var el = _get(_getPrototypeOf(cygnetTheme.prototype), "getDescription", this).call(this, text);
317+
318+
el.classList.add('je-cygnet-description');
319+
el.innerHTML = text;
320+
return el;
311321
} // If no title, use the text as title so that we have can use the
312322
// title attr as a CSS selector to style the collapse/expand state.
313323

0 commit comments

Comments
 (0)