Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment WYSIWYG Inputs #4815

Merged
merged 6 commits into from
Jan 31, 2024
Merged

Comment WYSIWYG Inputs #4815

merged 6 commits into from
Jan 31, 2024

Conversation

ssddanbrown
Copy link
Member

@ssddanbrown ssddanbrown commented Jan 30, 2024

This PR aims to bring the recently added simple book/chapter/shelf description WYSIWYG inputs to comments.

Todo

  • Added WYSWIYG loading and UI for comments.
  • Add back-end changes for submission/saving.
  • Add link selector support.
  • Load in WYSWIYG content gracefully where possible.
  • Remove old redundant comment regen command.
  • Add HTML cleaning on comment show/usage?
  • Set issue to drop old text (markdown) comment column in a future update?
  • Testing
    • RTL
    • Dark mode
    • Update tests not to use Comment->text property.
    • Test editor loads if cannot comment all, but can edit existing comment.
    • Test display of comments
    • Test updating of comments with HTML
    • Test HTML content filtering on submit

Doc Updates

  • Update advisory about limited compatibility with old markdown content.
  • Update advisory on removal of the comment regen command.
  • Remove docs content for comment regen command.

Not supporting old content, existing HTML or updating yet.
Also fixed handling of editors when moved in DOM, to properly remove
then re-init before & after move to avoid issues.
- Updated existing tests with recent back-end changes, mainly to use
  HTML data.
- Removed old comment regen command that's no longer required.
- Added filter on load to help prevent potentially dangerous comment
  HTML in DB at load time (if it gets passed input filtering, or is
  existing).
- Added TinyMCE valid_elements for input wysiwygs, to gracefully degrade
  content at point of user-view, rather than surprising the user by
  stripping content, which TinyMCE would show, post-save.
@ssddanbrown ssddanbrown merged commit 16af833 into development Jan 31, 2024
17 of 22 checks passed
@ssddanbrown ssddanbrown deleted the comment_wysiwyg branch January 31, 2024 16:57
@kernelry
Copy link

Will be possible to insert an image in WYSIWYG comment editor? 😁
similar to the old markdown Comment editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants