A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
default compliments
-
hey guys, is there any way to insert HTML tags in a remote JSON file for copliments default module?
ie:
< font color=‘red’ >hello sweety< font >thanks
-
@MrDondoT said in default compliments:
< font color=‘red’ >hello sweety< font >
It is possible but you need to change the current module code as well, right now it is creating text node but to support html text code needs to be changed as below
for (var part of parts) { // create a text element for each part //compliment.appendChild(document.createTextNode(part)); //Comment this line compliment.innerHTML += part; //Add this line // add a break ` compliment.appendChild(document.createElement("BR")); }
Result should be as below if your compliments are like below
evening: ["Wow, you look hot!", "You look nice!", "Hi, <i>sexy!</i>","< font color='red'>hello sweety< /font>"],
–
Ashish -
@ashishtank fantastic! that’s correct. Thanks