Skip to content

Add TinyMCE WYSIWYG editor, HTML emails, template DRY refactor, DataT… - #5

Merged
claire-peters merged 2 commits into
mainfrom
feature/wysiwyg-html-emails
Jul 9, 2026
Merged

claire-peters merged 2 commits into
mainfrom
feature/wysiwyg-html-emails

Conversation

@antonio-rodriguez-tam

Copy link
Copy Markdown
Collaborator

Add TinyMCE WYSIWYG editor, HTML emails, template DRY refactor, Datatables fixes

Description:

  • Switch to EmailMultiAlternatives with HTML + plain text fallback
  • Add TinyMCE editor (self-hosted) for compose, template form, and resend pages
  • All body reads/writes go through getBodyContent()/setBodyContent() helpers
  • Variable insert uses TinyMCE API with plain textarea fallback
  • Preview modals render HTML body (.html() instead of .text(),
    instead of
    )
  • Campaign detail sidebar and sent email modal render HTML body
  • Auto-select template from ?template=ID URL param on compose page
  • Extract 6 shared template includes: _email_preview_modal, _recipient_preview_modal, _delete_confirm_base, _status_badge_td, _stat_card, _danger_zone_card
  • Fix nested form bug in variable_form danger zone card
  • Fix DataTables crash on empty filtered results (skip init when no data rows)
  • Fix DataTables layout: inline Show/Search controls, table outside card body, load Bootstrap4 theme CSS, pagination overflow handling
  • Fix aria-hidden warnings on modal close (campaign_detail, resend_compose)
  • Campaign detail log table: simple_numbers pagination, default 50 rows

Security Checklist

  • Input Validation: All user inputs are properly validated and sanitized to prevent injection attacks.
  • Authentication & Authorization: The PR does not introduce unauthorized access, public endpoints or privilege escalation risks.
  • Secrets Management: No hardcoded secrets, API keys, or sensitive data are present.
  • [X ] Data Protection: Sensitive data is encrypted both at rest and in transit where applicable.
  • [X ] Logging & Monitoring: New features include proper logging and monitoring where necessary, without logging sensitive information.
  • Security Headers: If applicable, relevant security headers (CSP, HSTS, X-Frame-Options) are correctly configured.
  • [X ] Error Handling: Errors do not expose sensitive system details.
  • [X ] Third-Party Services: Any new third-party integrations follow security best practices (e.g. authentication, encryption, logging).
  • [X ] Code Review: The PR has been reviewed for potential security flaws.

Additional Notes

Checklist

  • [X ] I have performed a self-review of my code
  • [X ] I have tested the changes locally
  • I have run security tests where applicable
  • [X ] This PR follows the coding and security guidelines of the project

…ables fixes

- Switch to EmailMultiAlternatives with HTML + plain text fallback
- Add TinyMCE editor (self-hosted) for compose, template form, and resend pages
- All body reads/writes go through getBodyContent()/setBodyContent() helpers
- Variable insert uses TinyMCE API with plain textarea fallback
- Preview modals render HTML body (.html() instead of .text(), <div> instead of <pre>)
- Campaign detail sidebar and sent email modal render HTML body
- Auto-select template from ?template=ID URL param on compose page
- Extract 6 shared template includes: _email_preview_modal, _recipient_preview_modal,
  _delete_confirm_base, _status_badge_td, _stat_card, _danger_zone_card
- Fix nested form bug in variable_form danger zone card
- Fix DataTables crash on empty filtered results (skip init when no data rows)
- Fix DataTables layout: inline Show/Search controls, table outside card body,
  load Bootstrap4 theme CSS, pagination overflow handling
- Fix aria-hidden warnings on modal close (campaign_detail, resend_compose)
- Campaign detail log table: simple_numbers pagination, default 50 rows
@antonio-rodriguez-tam
antonio-rodriguez-tam marked this pull request as ready for review July 9, 2026 18:40

@claire-peters claire-peters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested sending of formatted emails on dev and it worked without issue.

@claire-peters
claire-peters merged commit 5af2e07 into main Jul 9, 2026
5 checks passed
@claire-peters
claire-peters deleted the feature/wysiwyg-html-emails branch July 9, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants