Hi All,
I managed to get a working rich text editor via the Quill Js: https://quilljs.com/
Via javascript I copy the content of the quill editor in a large textarea of a hubspot form. (load the form via javascript, not the hubl).
// Function to handle the input in the quill-editor:
function saveContent() {
var editorContent = document.getElementById(‘editor’);
editorContentRaw = editorContent.querySelector(“.ql-editor”).innerHTML;
let formField = document.querySelector(“textarea[name=‘profile_discription_rich’]”)
// Create a temporary div element and set its innerHTML
const tempDiv = document.createElement(‘div’);
tempDiv.innerHTML = editorContentRaw;
// Get the innerHTML of the temporary div and set it as the textarea’s value
formField.value = tempDiv.innerHTML;
}
Good luck creating something for yourself!
Marieke