Skip to content

Commit 614fd8d

Browse files
committed
Allow plugins for all templates
1 parent 2287e8f commit 614fd8d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

code-input.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ var codeInput = {
316316
includeCodeInputInHighlightFunc: includeCodeInputInHighlightFunc,
317317
preElementStyled: preElementStyled,
318318
isCode: isCode,
319+
plugins: plugins,
319320
};
320321
},
321322
prism(prism, plugins=[]) { // Dependency: Prism.js (https://prismjs.com/)
@@ -338,7 +339,7 @@ var codeInput = {
338339
},
339340
characterLimit() {
340341
return {
341-
highlight: function(result_element, code_input) {
342+
highlight: function(result_element, code_input, plugins=[]) {
342343

343344
let character_limit = Number(code_input.getAttribute("data-character-limit"));
344345

@@ -352,10 +353,11 @@ var codeInput = {
352353
},
353354
includeCodeInputInHighlightFunc: true,
354355
preElementStyled: true,
355-
isCode: false
356+
isCode: false,
357+
plugins: plugins,
356358
}
357359
},
358-
rainbowText(rainbow_colors=["red", "orangered", "orange", "goldenrod", "gold", "green", "darkgreen", "navy", "blue", "magenta"], delimiter="") {
360+
rainbowText(rainbow_colors=["red", "orangered", "orange", "goldenrod", "gold", "green", "darkgreen", "navy", "blue", "magenta"], delimiter="", plugins=[]) {
359361
return {
360362
highlight: function(result_element, code_input) {
361363
let html_result = [];
@@ -369,7 +371,8 @@ var codeInput = {
369371
preElementStyled: true,
370372
isCode: false,
371373
rainbow_colors: rainbow_colors,
372-
delimiter: delimiter
374+
delimiter: delimiter,
375+
plugins: plugins,
373376
}
374377
}
375378
}

0 commit comments

Comments
 (0)