I have an input form that I converted Medium editors to Summernote. They work perfectly except that on success I have it set up to reset the form. The whole form resets except the Summernote textareas.
Still waiting for the Summernote Word cleaning tools as well
It seems like if the summernote text area has some existing text in it and then the next dmx-bind:value to be loaded has a value of "" then this isnât loaded into the textarea and the previous text is left behindâŚ
⌠so on my form the old value gets written into the newly viewed table row if my user clicks on save.
There is no way I can use Summernote in my design until this is fixedâŚ
Executing the input_textarea.reset() hasnât fixed it.
When input_textarea.reset() is executed, the textarea clears visually, but not internally. By this I mean that what the user sees is an empty textarea, but when the form is submitted, the textarea actually still contains the old value.
When input_textarea.reset() is executed, there is this message in the console:
Hi @Antony, have you wondered why 3 Summernote objects have loaded correctly and the 4th is showing an error? In case that I am miss-interpreting the console message, could you supply more info?
Hi Ben⌠Thanks for that thought⌠it has prompted some more investigation.
I only have one summernote textarea in my design.
The âinit summernoteâ message happens each time I reset the form and do a server connect which causes a text value which is more than an empty string to be loaded into the summernote textarea.
The Error message happens each time I reset the form and do a server connect which causes a text value of "" (empty string, rather than null) to be loaded into the summernote textarea when the previous value stored in the textarea was a non empty string. So in this case, the summernote text area clears visually but still internally contains the text from the previous record I was viewing.
@patrick, Iâm thinking I will need your support in this!
I would have expected .reset() to do a .empty() too⌠but clearly it doesnât right now and there is some bug going on for me to be getting the console error!
So when I re-load the location server connect, I would expect the textarea to correctly contain the new value of location.data.location.location_description_html without needing to do a .reset() or .empty() on the textarea first. Is that correct @Teodor?