We are implementing a feature in our custom visualisation that would allow users to input blocks of text alongside NLG.
To accomplish this, we are using an editor that utilises the 'contenteditable' property on a 'div' element to capture and format user input.
We have run into an issue whereby user input on certain elements are blocked by Tibco Spotfire. We have learned via support chat that only certain elements are permitted for user input - notably 'input' element and 'textarea' element.
Unfortunately, neither of these elements are sufficient to provide a viable method of rich text authoring to our users. Please can you consider expanding the permitted elements to include any element with 'contenteditable' applied, or alternatively with a specific id or class attribute applied.
Thank you and warm regards.
You should be able to workaround the current limitation by stopping propagation of keydown events:
<div contenteditable="">editable</div>
<script>
document.body.addEventListener("keydown", (e) => {
if ((e.target = document.querySelector("[contenteditable]"))) {
e.stopPropagation();
}
});
</script>