Hello,
What is the best approach to implement an autosave feature for a Rich Text field between WeWeb and Xano?
Thanks in advance,
Hello,
What is the best approach to implement an autosave feature for a Rich Text field between WeWeb and Xano?
Thanks in advance,
@Farouk ,
hey, not sure if it suits your goal, but Iād set debounce on rich text element and create a āonChangeā workflow that makes post/patch/put api-call to xano for data saving.
Hi @Farouk,
Iām not sure if this is what you mean with an āautosaveā feature, but this method doesnāt require the user to press a save button:
In my experience, the āon changeā workflow with debounce interrupts the typing - resulting in a bad user experience. Fast users/typers want a short debounce time, but then there are the 2 finger typers that take ages to type and the debounce will have placed the cursor somewhere else so it messes up their flow. After endless trial and error, I found the best to do is this:
First, to keep things bundled: make the rich text element into a component and add two variables in that component:
Then add three workflows:
Another benefit of this method is that you can log changes in the backend that actually make some sense (otherwise you will have many records with just a couple of words changed each time when relying on the debounce).
And if you want to get fancy, then add another variable: ValueSaved (boolean) and add to the last workflow that this is true after successful recording and then set it back to false after a 1 second delay or so. This you can use to give a green glow or whatever as a nice user experience.