valitas / Pardus-Sweetener

A browser extension that enhances the user interface of the online game Pardus
9 stars 6 forks source link

Add a preview function to PMs and AMs #50

Open valitas opened 7 years ago

valitas commented 7 years ago

The latest Pardus update added smileys and BB code to private and alliance messages, but it's easy to cock it up by typing invalid codes, which are sent as gibberish immediately to the recipient, or the whole alliance.

Which is rather embarrassing.

Ideally it would be something like the preview tab here on Github, which switches from an editable textarea to a rendered div. We'd have to figure out the subset of the formatting codes that are valid in PMs and AMs ([color=red], :yarr: etc.), parse them in Javascript and create HTML as close as we can to what Pardus will create on the actual submit.