[VIVO-1756] - Make data property richtext editor option selectable from UI #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA Issue: [VIVO-1756]
Follows up on comments in [VIVO-1528] Select an editor for input fields based on annotation #76
What does this pull request do?
Makes the rich text editor for data properties selectable via the UI
What's new?
Adds a drop down menu to the data property settings form. Selecting 'rich text' from this menu results in a triple being added for the data property in the form http://vitro.mannlib.cornell.edu/ns/vitro/0.7#editing "HTML" .
How should this be tested?
Add a new data property or edit an existing one.
Add the bottom of the form, there should be a new option for enabling the rich text editor.
Select rich text and confirm that the value 'HTML' is populated
Add or edit an instance of the property, confirm it uses the rich text editor.
Edit the property settings again to switch the editor back to the default. Confirm the rich text editor is no longer used.
Additional Notes:
'HTML' is currently the only value that has any effect, and it is hard coded into both the default form (https://github.com/vivo-project/Vitro/blob/master/webapp/src/main/webapp/templates/freemarker/edit/forms/defaultDataPropertyForm.ftl#L34) and the proposed DatapropRetryController.java here. Perhaps there's a more eloquent way to handle this but given the current situation it seemed sufficient.
Interested parties
@VIVO-project/vivo-committers