diff --git a/test/shareddoc.test.js b/test/shareddoc.test.js index 2e21cd0..8411806 100644 --- a/test/shareddoc.test.js +++ b/test/shareddoc.test.js @@ -3302,4 +3302,22 @@ describe('Collab Test Suite', () => { persistence.update = savedUpdate; } }); + + it('Test link-img image round-trips through doc2aem/aem2doc', async () => { + const html = ` + +
+
http://www.foo.com/myimg.jpg
+ + +`; + + const ydoc = new Y.Doc(); + aem2doc(html, ydoc); + + const result = doc2aem(ydoc); + assert.equal(result, html); + assert(!result.includes(''), 'link-img must serialize as a plain , not '); + assert(result.includes('data-edit-as="image"')); + }); });