furbooru / philomena

Next-generation imageboard (furry edition)
https://furbooru.org/
GNU Affero General Public License v3.0
14 stars 3 forks source link

Setting text formatting doesn't work when the selected text is more than one line #49

Closed HushedFox closed 3 years ago

HushedFox commented 4 years ago

Describe the bug When marking text as bold/italics/underline/code/strikethrough/sup/sub either via the button above text field or via pressing keyboard shortcut symbols that designate text formatting are added only in two places - at the beginning of first line and at the end of the last line, but apparently it doesn't work like that.

To Reproduce Steps to reproduce the behavior:

  1. Go to any page that enables text input, for example Description part of https://furbooru.org/images/new
  2. Input text that has more then one line
  3. Select all lines and then use any of those: bold/italics/underline/code/strikethrough/sup/sub via the buttons above the text field or via keyboard shortcut.
  4. See that the formatting doesn't work.

Example with _ symbol that designates text that should be in italics:

image -> image

Expected behavior Text formatting should be applied in such a way that it works on all selected text.