fix: use dangerouslyPasteHTML to preserve ul/li in Quill event editor
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ca73bfb5c7
commit
d687bd3a49
@ -305,14 +305,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
{% if event and event.description %}
|
{% if event and event.description %}
|
||||||
// Use Quill's clipboard to paste HTML properly (preserves lists, links, headers)
|
quill.clipboard.dangerouslyPasteHTML({{ event.description|tojson }});
|
||||||
var delta = quill.clipboard.convert({{ event.description|tojson }});
|
|
||||||
quill.setContents(delta);
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
// Sync Quill content to hidden input on form submit
|
// Sync Quill content to hidden input on form submit
|
||||||
var form = document.querySelector('.form-card form');
|
var form = document.querySelector('.form-card form');
|
||||||
form.addEventListener('submit', function() {
|
form.addEventListener('submit', function() {
|
||||||
|
// Read from Quill's getContents and convert back to HTML
|
||||||
|
// to preserve Quill's internal format (lists as class="ql-indent")
|
||||||
var html = quill.root.innerHTML;
|
var html = quill.root.innerHTML;
|
||||||
// Don't save empty editor
|
// Don't save empty editor
|
||||||
if (html === '<p><br></p>') html = '';
|
if (html === '<p><br></p>') html = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user