X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/0f406b246f9261651b5982be71a49189349c8e3e..e573418502325e80c42523264424fa547a435de5:/modules/documentCanvas/tests/canvas.test.js diff --git a/modules/documentCanvas/tests/canvas.test.js b/modules/documentCanvas/tests/canvas.test.js index 386e375..a948787 100644 --- a/modules/documentCanvas/tests/canvas.test.js +++ b/modules/documentCanvas/tests/canvas.test.js @@ -81,6 +81,18 @@ define([ ); }); + test('split node with subnodes', function() { + var c = new canvas.Canvas('
Fancy and nice header 1
'); + var header = c.getNode({tag: 'header'})[0]; + c.splitNode({node: header, textNodeIdx: 0, offset: 5}); + assert.xmlEqual(c.toXML(), '\ +
\ +
Fancy
\ +
and nice header 1
\ +
' + ); + }); + test('list', function() { var c = new canvas.Canvas('
Alice
has
a cat
'); var div1 = c.getNode({tag:'div'})[0];