- Affected version
- 2.1.4
Copy & pasting from Word, and things like Google Docs introduces unexpected formatting changes. This depends on if local storage has been initialized with older version of the XF editor.
The problem is
Nothing clears
For example copying & pasting what is;
Gets converted into this;
The issue is
In Chrome (v76 and v77);
Word input;
Word output;
The problem is
fr-copied-text
contains stale data that was never removed;
Code:
try
{
copiedText = (ed.win.localStorage.getItem('fr-copied-text') || '').replace(/\s/g, '');
}
catch (e) {}
fr-copied-text
, so if this was leftover from an old version of XF, this will result in unexpected behaviour.For example copying & pasting what is;
Code:
This
Is
A
Test
Gets converted into this;
Code:
This
Is
A
Test
The issue is
normalizePaste
in js/xf/editor.js
as it is doing cleanup which isn't consistent.In Chrome (v76 and v77);
Word input;
<p>This</p><p>Is</p><p>A</p><p>Test</p>
Word output;
<p>This</p><p></p><p>Is</p><p></p><p>A</p><p></p><p>Test</p>
Last edited: