Medium Editor Textarea HTML Value Issue

Wappler Version : 1.9.7
Operating System : Windows 10

Expected behavior

Binding value to a medium editor text area should result in HTML exactly as it was saved from it.

Actual behavior

The value bound is loosing a space, which leads to failure of a validation between textarea’a value and original value from DB.
When focus is moved to the editor, the space gets added automatically, okay-ing the validation.

How to reproduce

Value from medium editor is stored in he DB as: <p >Hello World</p>
Notice the space in opening p tag. This is default behaviour.
Setup a medium text editor and save value to DB to check this.

Add a medium editor textarea on the page.
Set dmx-bind:value of the editor to value from DB.
Set a validation comparing values of editor & DB on another element
for eg: set a p with dmx-bind:value="db.value == mediumedit.value ? 'OK' : 'NO'"
On page load, you will see the p says ‘NO’, but as soon as you click/focus the editor, it will turn to ‘OK’.

Community Page
Last updated: