themotte / rDrama

This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
GNU Affero General Public License v3.0
27 stars 31 forks source link

Formatting button improvements #716

Closed gldrk closed 11 months ago

gldrk commented 1 year ago

Currently, the comment preview is not updated when the text is changed using the formatting buttons. One has to type something on the keyboard in order to see the change. Another nuisance is that when there are no characters left in the text area, the preview retains its old state. This PR makes both cases show the expected behavior.

It also slightly adjusts the buttons’ implementation, so that e.g. ‘Quote’ won’t remove innocuous > characters in the middle of lines. Quoting now also handles multiple paragraphs and adds one level of quoting whenever at least one unquoted line is selected, which should make it easier to work with nested quotations.

zorbathut commented 11 months ago

Sorry this took a bit, I had to sit down and actually understand it :V Looks great!