Screeps3D icon indicating copy to clipboard operation
Screeps3D copied to clipboard

Strip html content from console output

Open Eeems opened this issue 7 years ago • 2 comments

You currently display all console output as plain text. html tags should either be stripped completely or interpreted to some level.

Eeems avatar Dec 22 '17 20:12 Eeems

Per our conversation on slack, if you are going to support the style tag at some level, you will want to probably support the following css properties:

  • color
  • background-color
  • text-align
  • verticle-align
  • margin
  • margin-*
  • padding
  • padding-*
  • border
  • border-*
  • font-weight
  • font-size
  • width
  • height
  • min-width
  • min-height
  • max-width
  • max-height
  • cursor

Eeems avatar Dec 22 '17 20:12 Eeems

I've changed to using a script tag hoist my style tags to the document head so that it persists console clears, or if the style log line goes off the top of the console. Not sure how this would be supported unless you allowed for a noscript tag as well to embed the style tag. (https://github.com/Eeems/screeps-scripts/blob/ai/src/log.ts#L29-L40)

Eeems avatar Jan 06 '18 05:01 Eeems