iachat/app/javascript/dashboard/helper/specs
Sivin Varghese df4c8cf58b
chore: Strip unsupported signature formatting by channel (#13046)
# Pull Request Template

## Description

1. This PR is an enhancement to
https://github.com/chatwoot/chatwoot/pull/13045
It strips unsupported formatting from **message signatures** based on
each channel’s formatting capabilities defined in the `FORMATTING`
config

2. Remove usage of plain editor in Compose new conversation modal

Only the following signature elements are considered:
<strong>bold (<code inline="">strong</code>), italic (<code
inline="">em</code>), links (<code inline="">link</code>), images (<code
inline="">image</code>)</strong>.</p>

Any formatting not supported by the target channel is automatically
removed before the signature is appended.

<h3>Channel-wise Signature Formatting Support</h3>

Channel | Keeps in Signature | Strips from Signature
-- | -- | --
Email | bold, italic, links, images | —
WebWidget | bold, italic, links, images | —
API | bold, italic | links, images
WhatsApp | bold, italic | links, images
Telegram | bold, italic, links | images
Facebook | bold, italic | links, images
Instagram | bold, italic | links, images
Line | bold, italic | links, images
SMS | — | everything
Twilio SMS | — | everything
Twitter/X | — | everything


<hr>
<h3>📝 Note</h3>
<blockquote>
<p>Message signatures only support <strong>bold, italic, links, and
images</strong>.<br>
Other formatting options available in the editor (lists, code blocks,
strike-through, etc.) do <strong>not apply</strong> to signatures and
are ignored.</p>
</blockquote>

## Type of change

- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

### Loom video
https://www.loom.com/share/d325ab86ca514c6d8f90dfe72a8928dd


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-12-11 19:58:59 +05:30
..
CacheHelper feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
fixtures chore: Remove defer attribute from widget-loader script (#11887) 2025-07-08 15:31:33 +05:30
actionCable.spec.js feat: Add stores for copilotMessages and copilotThreads (#11603) 2025-05-27 18:36:32 -06:00
actionQueryGenerator.spec.js feat: Add the ability to add new automation rule (#3459) 2022-02-02 18:46:07 +05:30
agentHelper.spec.js fix: Translate "None" option in agent assignment dropdown (#11060) 2025-03-11 14:49:27 -07:00
auditlogHelper.spec.js fix: TypeError: Cannot read properties of null (reading 'user_id') (#9884) 2024-08-07 14:42:01 +05:30
automationHelper.spec.js fix: Translate "None" option in automation select (#11076) 2025-03-13 16:44:46 -07:00
commons.spec.js feat: Agent assignment policy index page with CRUD actions (#12373) 2025-09-10 12:07:21 +05:30
conversationHelper.spec.js feat: Rewrite conversations mixin to a helper (#9931) 2024-08-13 15:15:04 +05:30
customViewsHelper.spec.js fix: Edit custom views folder (#7670) 2023-08-04 13:54:21 +05:30
DOMHelpers.spec.js feat: add promise based loader for FB script (#9780) 2024-07-22 11:32:05 +05:30
downloadHelper.spec.js feat: Add business hours in downloadable reports (#4674) 2022-05-27 09:26:59 +05:30
editorContentHelper.spec.js feat: Standardize rich editor across all channels (#12600) 2025-12-08 14:43:45 +05:30
editorHelper.spec.js chore: Strip unsupported signature formatting by channel (#13046) 2025-12-11 19:58:59 +05:30
emailQuoteExtractor.spec.js feat: allow quoted email thread in reply (#12545) 2025-09-30 17:47:09 +05:30
filterQueryGenerator.spec.js feat: Custom attributes in automations and refactor (#4548) 2022-11-10 10:53:29 +05:30
flag.spec.js chore: Replace packages with native functions (#5140) 2022-08-03 17:08:21 +05:30
inbox.spec.js chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
inboxFixture.js feat: Support Regex validation for custom attributes (#7856) 2024-01-23 18:01:57 +04:00
macrosFixtures.js feat: Add assign agent option in macro (#5821) 2022-11-09 09:52:48 -08:00
macrosHelper.spec.js chore(i18n): Improvements in automation and macros (#11231) 2025-04-02 15:48:42 -07:00
permissionsHelper.spec.js chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
portalHelper.spec.js fix: Add missing 'hc' path segment after custom domain in article URLs (#11353) 2025-04-22 21:53:50 +05:30
preChat.spec.js feat: Support Regex validation for custom attributes (#7856) 2024-01-23 18:01:57 +04:00
quotedEmailHelper.spec.js fix: Rendering on email without html content (#12561) 2025-10-01 13:43:05 +05:30
ReconnectService.spec.js chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
routeHelpers.spec.js chore: Custom Roles to manage permissions [ UI ] (#9865) 2024-09-17 11:40:11 -07:00
snoozeHelpers.spec.js feat(v4): Update Inbox view card design (#10599) 2025-01-07 21:11:54 +05:30
templateHelper.spec.js feat: Add media_name support for WhatsApp templates document files (#12462) 2025-09-18 15:25:31 +05:30
themeHelper.spec.js feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
uploadHelper.spec.js feat: Add the ability to paste images to editor (#10072) 2024-09-11 09:44:13 +05:30
URLHelper.spec.js feat: Add UI to manage web widget allowed domains (#12495) 2025-09-24 16:46:19 +05:30
validations.spec.js chore: Remove unused files in contact (#10570) 2024-12-11 19:29:24 -08:00