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
fix: strip html and show text #22656
Conversation
Quill editor adds html which is useless for user so strip html using html2text and render Text only. If no text is found it will render No Text Found in + "Field Label" (ex. Description).
link.textContent = value.toString(); | ||
// "Text Editor" and some other fieldtypes can have html tags in them so strip and show text. | ||
// If no text is found show "No Text Found in {Field Label}" | ||
let textValue = frappe.utils.html2text(value) || "No Text Found in " + subject_field.label; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it empty if no text is found instead of "No Text Found in" since it'll be hard to distinguish among other text.
We can show "[image]" for images in the description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaving it blank will be confusing to users on where to click?
[skip ci]
* fix: strip html and show text Quill editor adds html which is useless for user so strip html using html2text and render Text only. If no text is found it will render No Text Found in + "Field Label" (ex. Description). * fix: remove placeholder text [skip ci] --------- Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 7752136)
* fix: strip html and show text Quill editor adds html which is useless for user so strip html using html2text and render Text only. If no text is found it will render No Text Found in + "Field Label" (ex. Description). * fix: remove placeholder text [skip ci] --------- Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 7752136)
* fix: strip html and show text Quill editor adds html which is useless for user so strip html using html2text and render Text only. If no text is found it will render No Text Found in + "Field Label" (ex. Description). * fix: remove placeholder text [skip ci] --------- Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 7752136) Co-authored-by: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com>
* fix: strip html and show text Quill editor adds html which is useless for user so strip html using html2text and render Text only. If no text is found it will render No Text Found in + "Field Label" (ex. Description). * fix: remove placeholder text [skip ci] --------- Co-authored-by: Ankush Menat <ankush@frappe.io> (cherry picked from commit 7752136) Co-authored-by: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com>
# [14.52.0](v14.51.0...v14.52.0) (2023-10-11) ### Bug Fixes * add rate limiting and type hints for `add_feedback` ([9049a4f](9049a4f)) * allow larger URLs in Integration Request ([844fd76](844fd76)) * Apply address all perm only if owner ([de7f13f](de7f13f)) * avoid double translation ([fda329f](fda329f)) * changed table style to match grid style ([7e77bea](7e77bea)) * conditional webform with list view enabled ([45be3d3](45be3d3)) * Escape filename in sidebar ([8a9728c](8a9728c)) * Fix breakpoints CSS variables using map-get ([2fadf43](2fadf43)) * Give All role permission to read/create own address and contact ([#22642](#22642)) ([e4a7577](e4a7577)) * improved validation for address and contact ([ef5709a](ef5709a)) * keyerror on reports with subtotal ([6562139](6562139)) * no perm if doc doesn't exist ([d283b55](d283b55)) * strip html and show text ([#22656](#22656)) ([#22677](#22677)) ([55c0602](55c0602)) * **UX:** Bring responsive multi-column design to module and role editors ([3bcf15d](3bcf15d)) * **UX:** Responsive, column-major design for multicheck elements. ([5fc944a](5fc944a)) ### Features * bulk update fields select sorted by translated labels ([#22318](#22318)) ([65122b4](65122b4))
## [13.58.13](v13.58.12...v13.58.13) (2023-10-17) ### Bug Fixes * Apply address all perm only if owner ([f6105df](f6105df)) * avoid double translation (backport [#22578](#22578)) ([2c267ea](2c267ea)) * improved validation for address and contact (backport [#22574](#22574)) ([45c5756](45c5756)) * strip html and show text ([#22656](#22656)) ([#22676](#22676)) ([d371d59](d371d59)) * validation permission on `tag` creation ([#22753](#22753)) ([#22754](#22754)) ([6247aa0](6247aa0))
Quill editor adds html which is useless for user so strip html using html2text and render Text only. If no text is found it will render No Text Found in + "Field Label" (ex. Description).
Before
Before.Fix.quill.mov
After
After.fix.quill.mov