-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add rich text format for custom fields #18481
base: main
Are you sure you want to change the base?
Conversation
d8ce7b9
to
40c693c
Compare
@cconard96 Please rebase to solve conflicts. |
7cfbeeb
to
272bbf9
Compare
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.
-
When reopening the field configuration form, the default value is not rendered correctly in the modal :
-
Images are not converted correctly into document. This is usally done with a call to the
CommonDBTM::addFile()
in thepost*
methods. -
We disabled the ability to put images in the task/followups/solutions/... templates because it was complicated to handle the copy of the corresponding document when an item was created using these templates. I think we should avoid usage of images in the default value here for the same reasons.
Pending topic: if someone changes a field from rich-text to text-only, what do we do with the content?
@cconard96 your opinion? |
79f5158
to
52529c8
Compare
My opinion is not to bother modifying any of the values in the database if the field is switched between plain/rich text. If the field is plain text, we should force the displayed value to go through "getTextFromHtml". This way, simply switching to plain text and then back to rich text won't ruin existing values but if an asset is saved the plain version will be saved. Second option would be just blocking changing this option once a field is created but it could limit usability. Admins would need to create a new field if they change their mind later and we don't offer any way to migrate data from one field to another. |
Seems a good way to handle it. |
let's go with that |
52529c8
to
f35ba39
Compare
Checklist before requesting a review
Description
Add option for custom text fields to support rich-text and images.