Refactor the way of symbols was handled, now compatible with "monks enhanced journal".
This commit is contained in:
@@ -47,7 +47,7 @@ export const RegisterHandlebars = function () {
|
||||
/* ------------------------------------ */
|
||||
/* Utility */
|
||||
/* ------------------------------------ */
|
||||
// Json - Display a object in textarea (for debug)
|
||||
// Json - Display an object in textarea (for debug)
|
||||
Handlebars.registerHelper("json", function (...objects) {
|
||||
objects.pop(); // remove this function call
|
||||
return new Handlebars.SafeString(objects.map((e) => `<textarea>${JSON.stringify(e)}</textarea>`));
|
||||
@@ -64,6 +64,11 @@ export const RegisterHandlebars = function () {
|
||||
return objects.join("");
|
||||
});
|
||||
|
||||
// enrichHTML
|
||||
Handlebars.registerHelper("enrichHTML", function (text, options = {}) {
|
||||
return TextEditor.enrichHTML(text, options);
|
||||
});
|
||||
|
||||
// Add a setter
|
||||
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
|
||||
options.data.root[varName] = varValue;
|
||||
|
||||
Reference in New Issue
Block a user