Skip to content
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

Highlighted user input focused #12

Open
edemattos opened this issue Sep 18, 2020 · 0 comments
Open

Highlighted user input focused #12

edemattos opened this issue Sep 18, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@edemattos
Copy link
Collaborator

edemattos commented Sep 18, 2020

When a user receives feedback, the contenteditable may contain a span element with highlighted text. If the user wishes to modify their answer, the highlighting should behave in one of two ways:

  1. Only remove the span tags (containing a CSS style class to add background color) if the inner text has been modified. This can potentially be achieved with an event listener listening for a state change within the span content. (preferable)
  2. Remove the span immediately once the answer is changed at all, regardless of what has been changed.

The highlighted user input (span element) can be retrieved using `${contentID}_${fieldID}_input_highlight` and checking to make sure element !== null. Removing the highlight span could probably be accomplished by replacing the highlightPattern regex with an empty string.

@edemattos edemattos added the enhancement New feature or request label Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant