react-crossword
react-crossword copied to clipboard
Rich text formatting of clues
If I pass through JSON with HTML elements e.g., <em>...</em>, it automatically gets converted to HTML entities \u003cem\u003e ... \u003c/em\u003e.
Can support for rich text formatting be added to a future release?
Great idea! I'll have to think about what the "most natural" way to embed formatting in a clue would be... raw HTML doesn't seem very React-y, and is potentially risky/insecure... for the use-cases you're imagining, would Markdown support be enough? That would get you bold and italic, and other common kinds of formatting. In fact, are bold and italic the only things you really need? (I can maybe see a use-case for links, for something like "a video clue"... but multi-paragraph text, lists, etc., seem really unlikely to be needed.)
Markdown also seems like a sensible approach! Italics are nice for names of things (eg, “This actor starred in the film In Bruges.”)