In Artidoc, when the content of a section contains trailing whitespaces, the DOMParser of ProseMirror will remove them.
For instance, let's say that the section contains the following markup:
<p>This is <a href="#">a link</a> </p>
The editor's DOMParser will ignore the whitespace between the </a>
and the </p>
tag and produce the following markup:
<p>This is <a href="#">a link</a></p>
The artidoc section will then notice the difference and consider that its content has been updated, showing itself as "edited".
ProseMirror's DOMParser accepts an option preserveWhitespace which can be false
(default), true
or "full"
.
When true
, the DOMParser will not remove the trailing whitespaces, and the section will not detect any change.