-
Notifications
You must be signed in to change notification settings - Fork 11
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
Rich text editor templates #3176
base: main
Are you sure you want to change the base?
Commits on Jun 23, 2020
-
#3081:Add template with readonly blocks to reportText
This makes sure that when creating a report, the reportText field contains a template text. Some of the heading blocks in the template are readonly and can't be removed. Note: it only works now on add, after save, on edit, the headings are no longer readonly (still to be implemented).
Configuration menu - View commit details
-
Copy full SHA for 06a38fc - Browse repository at this point
Copy the full SHA 06a38fcView commit details
Commits on Jun 25, 2020
-
#3081: Update richTextEditor mandatory h1
This makes sure that if the richTextEditor contains h1 tags marked with the mandatory class, they can be edited but the tags itself can not be deleted. Also, when the content is saved, the resulting html also still has the mandatory class for the h1 tag (this was not the case before).
Configuration menu - View commit details
-
Copy full SHA for b036bb8 - Browse repository at this point
Copy the full SHA b036bb8View commit details -
#3081: Update HtmlPolicyBuilder, allow class for h1 and p
In order to be able to save richText content containing also a class, we need to allow this in the HtmlPolicyBuilder, which is being used to sanitize the HTML before saving. We updated this one to allow the class attribute for h1 and p elements.
Configuration menu - View commit details
-
Copy full SHA for c167807 - Browse repository at this point
Copy the full SHA c167807View commit details -
#3081: WIP: Replace mandatory elems with placeholder
In the RichTextEditor, replace mandatory elements with a placeholder when all their text is being deleted.
Configuration menu - View commit details
-
Copy full SHA for bea58fa - Browse repository at this point
Copy the full SHA bea58faView commit details
Commits on Jun 30, 2020
-
#3081: Replace mandatory elements with placeholder
In the RichTextEditor, replace mandatory elements with a placeholder when trying to delete their last content character.
Configuration menu - View commit details
-
Copy full SHA for c429143 - Browse repository at this point
Copy the full SHA c429143View commit details -
#3081: Update styling of mandatory elements in RichTextEditor
Changed the style of the h1 mandatory element. Made sure the mandatory elements are only having a specific style when in the RichTextEditor.
Configuration menu - View commit details
-
Copy full SHA for a116a82 - Browse repository at this point
Copy the full SHA a116a82View commit details -
#3081: Make htmlTemplate for rickTextEditor configurable
It is now possible to configure within the anet.yml, through report.reportText.placeholder the html template to be used per default for the report text.
Configuration menu - View commit details
-
Copy full SHA for a4ec1ac - Browse repository at this point
Copy the full SHA a4ec1acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7807258 - Browse repository at this point
Copy the full SHA 7807258View commit details -
#3081: Save mandatory unstyled blocks as mandatory
This makes sure that if an unstyled block has the mandatory class, it is also being saved as a html element with the mandatory class.
Configuration menu - View commit details
-
Copy full SHA for ca227c1 - Browse repository at this point
Copy the full SHA ca227c1View commit details -
#3081: Make placeholder configurable for mandatory elements
This makes sure that when specifying a default template for a richTextEditor type of field, we can also define a placeholder for the html elements having the class mandatory. This placeholder is being used to prefill the element if this one becomes empty. Both the class attribute and the placeholder attribute of an HTML tag of type h1, h2, h3 or p are being persisted in the database. This in order to be able to still know the mandatory elements and their eventual placeholders when editing an object with rich text content.
Configuration menu - View commit details
-
Copy full SHA for ef440b6 - Browse repository at this point
Copy the full SHA ef440b6View commit details
Commits on Jul 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 435302b - Browse repository at this point
Copy the full SHA 435302bView commit details -
Merge branch 'GH-3081-richt-text-editor-templates' of github.com:NCI-…
…Agency/anet into GH-3081-richt-text-editor-templates
Configuration menu - View commit details
-
Copy full SHA for e417c1b - Browse repository at this point
Copy the full SHA e417c1bView commit details
Commits on Jul 31, 2020
-
#3081: Make sure mandatory blocks remain mandatory
Prevent return when: - at the beginning of a mandatory block => it would result in an empty mandatory block and a new non-mandatory block containing the text of the block which used to be mandatory. - the selection contains at least one mandatory block => it would result in deleting the selection including the mandatory block - exactly one whole mandatory block is selected, it would result in the contents of the mandatory block being deleted and the addition of a new empty block afterwards. Prevent delete or backspace when: - the selection contains several blocks and at least one of them is mandatory => we don't want to lose mandatory blocks Prevent delete when: - at the end of a block when the next block is => we don't want to merge a mandatory block into a previous one Prevent backspace when: - at the beginning of a mandatory block => we don't want to merge a mandatory block into a previous one The reason we don't want to merge a mandatory block B into a previous block A as: - if block A is not mandatory, block B would lose it's style and data (thus also the mandatory property) - if block A is also mandatory, we would end up with only one mandatory block instead of two. Prevent pasting on a selection when: - at least one of the selection blocks is mandatory. It would result in the removal of mandatory blocks.
Configuration menu - View commit details
-
Copy full SHA for 54c7544 - Browse repository at this point
Copy the full SHA 54c7544View commit details
Commits on Aug 6, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5fe494d - Browse repository at this point
Copy the full SHA 5fe494dView commit details