• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Module compliments

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 3 Posters 2.1k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    Xenobiologist
    last edited by Xenobiologist Nov 21, 2017, 5:11 PM Nov 21, 2017, 5:08 PM

    Hi there,

    how to format my compliments? Let’s say, I want to add a line break like
    or something like that?
    Is there an easy way, or do I have to split long texts into multiple compliments?

    I know, I could use iFrame or HTMLBox :-)

    Thanks!
    Mega

    B 1 Reply Last reply Nov 21, 2017, 5:13 PM Reply Quote 0
    • B Offline
      broberg Project Sponsor @Xenobiologist
      last edited by broberg Nov 22, 2017, 8:42 AM Nov 21, 2017, 5:13 PM

      I don’t know if the compliments allows it, but you might try <br /> ?

      1 Reply Last reply Reply Quote 0
      • X Offline
        Xenobiologist
        last edited by Nov 21, 2017, 5:41 PM

        Guess what, I have tried that already.
        Within the quotes and outside the quotes with +

        None of those worked.

        1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User
          last edited by A Former User Nov 21, 2017, 5:52 PM Nov 21, 2017, 5:50 PM

          line 153 in compliments.js

          var compliment = document.createTextNode(complimentText);
          

          Modify it.

          var compliment = document.createElement("div")
          compliment.innerHTML = complimentText
          

          I didn’t test it.

          B 1 Reply Last reply Nov 22, 2017, 8:46 AM Reply Quote 2
          • B Offline
            broberg Project Sponsor @Guest
            last edited by Nov 22, 2017, 8:46 AM

            Yeah textnode doesn’t parse html.

            1 Reply Last reply Reply Quote 0
            • X Offline
              Xenobiologist
              last edited by Nov 22, 2017, 10:42 AM

              Oh man, I forgot that everything is right there in the “source files”, so that I can edit it myself.
              Thanks! That works!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy