| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670 |
- /**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
- import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
- import TableEditing from '../src/tableediting';
- import TableProperties from '../src/tableproperties';
- import { assertTableStyle, assertTRBLAttribute } from './_utils/utils';
- import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
- import { assertEqualMarkup } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
- describe( 'TableProperties', () => {
- let editor, model;
- beforeEach( () => {
- return VirtualTestEditor
- .create( {
- plugins: [ TableProperties, Paragraph, TableEditing ]
- } )
- .then( newEditor => {
- editor = newEditor;
- model = editor.model;
- } );
- } );
- afterEach( () => {
- editor.destroy();
- } );
- it( 'should have pluginName', () => {
- expect( TableProperties.pluginName ).to.equal( 'TableProperties' );
- } );
- describe( 'border', () => {
- it( 'should set proper schema rules', () => {
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'borderColor' ) ).to.be.true;
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'borderStyle' ) ).to.be.true;
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'borderWidth' ) ).to.be.true;
- } );
- describe( 'upcast conversion', () => {
- it( 'should upcast border shorthand', () => {
- editor.setData( '<table style="border:1px solid #f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', '#f00' );
- assertTRBLAttribute( table, 'borderStyle', 'solid' );
- assertTRBLAttribute( table, 'borderWidth', '1px' );
- } );
- it( 'should upcast border-color shorthand', () => {
- editor.setData( '<table style="border-color:#f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', '#f00' );
- } );
- it( 'should upcast border-style shorthand', () => {
- editor.setData( '<table style="border-style:ridge"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderStyle', 'ridge' );
- } );
- it( 'should upcast border-width shorthand', () => {
- editor.setData( '<table style="border-width:1px"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderWidth', '1px' );
- } );
- it( 'should upcast border-top shorthand', () => {
- editor.setData( '<table style="border-top:1px solid #f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', '#f00', null, null, null );
- assertTRBLAttribute( table, 'borderStyle', 'solid', null, null, null );
- assertTRBLAttribute( table, 'borderWidth', '1px', null, null, null );
- } );
- it( 'should upcast border-right shorthand', () => {
- editor.setData( '<table style="border-right:1px solid #f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', null, '#f00', null, null );
- assertTRBLAttribute( table, 'borderStyle', null, 'solid', null, null );
- assertTRBLAttribute( table, 'borderWidth', null, '1px', null, null );
- } );
- it( 'should upcast border-bottom shorthand', () => {
- editor.setData( '<table style="border-bottom:1px solid #f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', null, null, '#f00', null );
- assertTRBLAttribute( table, 'borderStyle', null, null, 'solid', null );
- assertTRBLAttribute( table, 'borderWidth', null, null, '1px', null );
- } );
- it( 'should upcast border-left shorthand', () => {
- editor.setData( '<table style="border-left:1px solid #f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', null, null, null, '#f00' );
- assertTRBLAttribute( table, 'borderStyle', null, null, null, 'solid' );
- assertTRBLAttribute( table, 'borderWidth', null, null, null, '1px' );
- } );
- it( 'should upcast border-top-* styles', () => {
- editor.setData(
- '<table style="border-top-width:1px;border-top-style:solid;border-top-color:#f00"><tr><td>foo</td></tr></table>'
- );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', '#f00', null, null, null );
- assertTRBLAttribute( table, 'borderStyle', 'solid', null, null, null );
- assertTRBLAttribute( table, 'borderWidth', '1px', null, null, null );
- } );
- it( 'should upcast border-right-* styles', () => {
- editor.setData(
- '<table style="border-right-width:1px;border-right-style:solid;border-right-color:#f00"><tr><td>foo</td></tr></table>'
- );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', null, '#f00', null, null );
- assertTRBLAttribute( table, 'borderStyle', null, 'solid', null, null );
- assertTRBLAttribute( table, 'borderWidth', null, '1px', null, null );
- } );
- it( 'should upcast border-bottom-* styles', () => {
- editor.setData(
- '<table style="border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#f00">' +
- '<tr>' +
- '<td>foo</td>' +
- '</tr>' +
- '</table>'
- );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', null, null, '#f00', null );
- assertTRBLAttribute( table, 'borderStyle', null, null, 'solid', null );
- assertTRBLAttribute( table, 'borderWidth', null, null, '1px', null );
- } );
- it( 'should upcast border-left-* styles', () => {
- editor.setData(
- '<table style="border-left-width:1px;border-left-style:solid;border-left-color:#f00"><tr><td>foo</td></tr></table>'
- );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- assertTRBLAttribute( table, 'borderColor', null, null, null, '#f00' );
- assertTRBLAttribute( table, 'borderStyle', null, null, null, 'solid' );
- assertTRBLAttribute( table, 'borderWidth', null, null, null, '1px' );
- } );
- } );
- describe( 'downcast conversion', () => {
- let table;
- beforeEach( () => {
- table = createEmptyTable();
- } );
- it( 'should downcast borderColor attribute (same top, right, bottom, left)', () => {
- model.change( writer => writer.setAttribute( 'borderColor', {
- top: '#f00',
- right: '#f00',
- bottom: '#f00',
- left: '#f00'
- }, table ) );
- assertTableStyle( editor, 'border-bottom:#f00;border-left:#f00;border-right:#f00;border-top:#f00;' );
- } );
- it( 'should downcast borderColor attribute (different top, right, bottom, left)', () => {
- model.change( writer => writer.setAttribute( 'borderColor', {
- top: '#f00',
- right: 'hsla(0, 100%, 50%, 0.5)',
- bottom: 'deeppink',
- left: 'rgb(255, 0, 0)'
- }, table ) );
- assertTableStyle( editor,
- 'border-bottom:deeppink;' +
- 'border-left:rgb(255, 0, 0);' +
- 'border-right:hsla(0, 100%, 50%, 0.5);' +
- 'border-top:#f00;'
- );
- } );
- it( 'should downcast borderStyle attribute (same top, right, bottom, left)', () => {
- model.change( writer => writer.setAttribute( 'borderStyle', {
- top: 'solid',
- right: 'solid',
- bottom: 'solid',
- left: 'solid'
- }, table ) );
- assertTableStyle( editor, 'border-bottom:solid;border-left:solid;border-right:solid;border-top:solid;' );
- } );
- it( 'should downcast borderStyle attribute (different top, right, bottom, left)', () => {
- model.change( writer => writer.setAttribute( 'borderStyle', {
- top: 'solid',
- right: 'ridge',
- bottom: 'dotted',
- left: 'dashed'
- }, table ) );
- assertTableStyle( editor, 'border-bottom:dotted;border-left:dashed;border-right:ridge;border-top:solid;' );
- } );
- it( 'should downcast borderWidth attribute (same top, right, bottom, left)', () => {
- model.change( writer => writer.setAttribute( 'borderWidth', {
- top: '42px',
- right: '.1em',
- bottom: '1337rem',
- left: 'thick'
- }, table ) );
- assertTableStyle( editor, 'border-bottom:1337rem;border-left:thick;border-right:.1em;border-top:42px;' );
- } );
- it( 'should downcast borderWidth attribute (different top, right, bottom, left)', () => {
- model.change( writer => writer.setAttribute( 'borderWidth', {
- top: '42px',
- right: '42px',
- bottom: '42px',
- left: '42px'
- }, table ) );
- assertTableStyle( editor, 'border-bottom:42px;border-left:42px;border-right:42px;border-top:42px;' );
- } );
- it( 'should downcast borderColor, borderStyle and borderWidth attributes together (same top, right, bottom, left)', () => {
- model.change( writer => {
- writer.setAttribute( 'borderColor', {
- top: '#f00',
- right: '#f00',
- bottom: '#f00',
- left: '#f00'
- }, table );
- writer.setAttribute( 'borderStyle', {
- top: 'solid',
- right: 'solid',
- bottom: 'solid',
- left: 'solid'
- }, table );
- writer.setAttribute( 'borderWidth', {
- top: '42px',
- right: '42px',
- bottom: '42px',
- left: '42px'
- }, table );
- } );
- assertTableStyle( editor,
- 'border-bottom:42px solid #f00;' +
- 'border-left:42px solid #f00;' +
- 'border-right:42px solid #f00;' +
- 'border-top:42px solid #f00;'
- );
- } );
- it( 'should downcast borderColor, borderStyle and borderWidth attributes together (different top, right, bottom, left)', () => {
- model.change( writer => {
- writer.setAttribute( 'borderColor', {
- top: '#f00',
- right: 'hsla(0, 100%, 50%, 0.5)',
- bottom: 'deeppink',
- left: 'rgb(255, 0, 0)'
- }, table );
- writer.setAttribute( 'borderStyle', {
- top: 'solid',
- right: 'ridge',
- bottom: 'dotted',
- left: 'dashed'
- }, table );
- writer.setAttribute( 'borderWidth', {
- top: '42px',
- right: '.1em',
- bottom: '1337rem',
- left: 'thick'
- }, table );
- } );
- assertTableStyle( editor,
- 'border-bottom:1337rem dotted deeppink;' +
- 'border-left:thick dashed rgb(255, 0, 0);' +
- 'border-right:.1em ridge hsla(0, 100%, 50%, 0.5);' +
- 'border-top:42px solid #f00;'
- );
- } );
- describe( 'change attribute', () => {
- beforeEach( () => {
- model.change( writer => {
- writer.setAttribute( 'borderColor', {
- top: '#f00',
- right: '#f00',
- bottom: '#f00',
- left: '#f00'
- }, table );
- writer.setAttribute( 'borderStyle', {
- top: 'solid',
- right: 'solid',
- bottom: 'solid',
- left: 'solid'
- }, table );
- writer.setAttribute( 'borderWidth', {
- top: '42px',
- right: '42px',
- bottom: '42px',
- left: '42px'
- }, table );
- } );
- } );
- it( 'should downcast borderColor attribute change', () => {
- model.change( writer => writer.setAttribute( 'borderColor', {
- top: 'deeppink',
- right: 'deeppink',
- bottom: 'deeppink',
- left: 'deeppink'
- }, table ) );
- assertTableStyle( editor,
- 'border-bottom:42px solid deeppink;' +
- 'border-left:42px solid deeppink;' +
- 'border-right:42px solid deeppink;' +
- 'border-top:42px solid deeppink;'
- );
- } );
- it( 'should downcast borderStyle attribute change', () => {
- model.change( writer => writer.setAttribute( 'borderStyle', {
- top: 'ridge',
- right: 'ridge',
- bottom: 'ridge',
- left: 'ridge'
- }, table ) );
- assertTableStyle( editor,
- 'border-bottom:42px ridge #f00;' +
- 'border-left:42px ridge #f00;' +
- 'border-right:42px ridge #f00;' +
- 'border-top:42px ridge #f00;'
- );
- } );
- it( 'should downcast borderWidth attribute change', () => {
- model.change( writer => writer.setAttribute( 'borderWidth', {
- top: 'thick',
- right: 'thick',
- bottom: 'thick',
- left: 'thick'
- }, table ) );
- assertTableStyle( editor,
- 'border-bottom:thick solid #f00;' +
- 'border-left:thick solid #f00;' +
- 'border-right:thick solid #f00;' +
- 'border-top:thick solid #f00;'
- );
- } );
- it( 'should downcast borderColor attribute removal', () => {
- model.change( writer => writer.removeAttribute( 'borderColor', table ) );
- assertTableStyle( editor,
- 'border-bottom:42px solid;' +
- 'border-left:42px solid;' +
- 'border-right:42px solid;' +
- 'border-top:42px solid;'
- );
- } );
- it( 'should downcast borderStyle attribute removal', () => {
- model.change( writer => writer.removeAttribute( 'borderStyle', table ) );
- assertTableStyle( editor,
- 'border-bottom:42px #f00;' +
- 'border-left:42px #f00;' +
- 'border-right:42px #f00;' +
- 'border-top:42px #f00;'
- );
- } );
- it( 'should downcast borderWidth attribute removal', () => {
- model.change( writer => writer.removeAttribute( 'borderWidth', table ) );
- assertTableStyle( editor,
- 'border-bottom:solid #f00;' +
- 'border-left:solid #f00;' +
- 'border-right:solid #f00;' +
- 'border-top:solid #f00;'
- );
- } );
- it( 'should downcast borderColor, borderStyle and borderWidth attributes removal', () => {
- model.change( writer => {
- writer.removeAttribute( 'borderColor', table );
- writer.removeAttribute( 'borderStyle', table );
- writer.removeAttribute( 'borderWidth', table );
- } );
- assertEqualMarkup(
- editor.getData(),
- '<figure class="table"><table><tbody><tr><td>foo</td></tr></tbody></table></figure>'
- );
- } );
- } );
- } );
- } );
- describe( 'background color', () => {
- it( 'should set proper schema rules', () => {
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'backgroundColor' ) ).to.be.true;
- } );
- describe( 'upcast conversion', () => {
- it( 'should upcast background-color', () => {
- editor.setData( '<table style="background-color:#f00"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'backgroundColor' ) ).to.equal( '#f00' );
- } );
- it( 'should upcast from background shorthand', () => {
- editor.setData( '<table style="background:#f00 center center"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'backgroundColor' ) ).to.equal( '#f00' );
- } );
- } );
- describe( 'downcast conversion', () => {
- let table;
- beforeEach( () => {
- table = createEmptyTable();
- } );
- it( 'should downcast backgroundColor', () => {
- model.change( writer => writer.setAttribute( 'backgroundColor', '#f00', table ) );
- assertTableStyle( editor, 'background-color:#f00;' );
- } );
- } );
- } );
- describe( 'width', () => {
- it( 'should set proper schema rules', () => {
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'width' ) ).to.be.true;
- } );
- describe( 'upcast conversion', () => {
- it( 'should upcast width', () => {
- editor.setData( '<table style="width:1337px"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'width' ) ).to.equal( '1337px' );
- } );
- } );
- describe( 'downcast conversion', () => {
- let table;
- beforeEach( () => {
- table = createEmptyTable();
- } );
- it( 'should downcast width', () => {
- model.change( writer => writer.setAttribute( 'width', '1337px', table ) );
- assertTableStyle( editor, 'width:1337px;' );
- } );
- } );
- } );
- describe( 'height', () => {
- it( 'should set proper schema rules', () => {
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'height' ) ).to.be.true;
- } );
- describe( 'upcast conversion', () => {
- it( 'should upcast height', () => {
- editor.setData( '<table style="height:1337px"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'height' ) ).to.equal( '1337px' );
- } );
- } );
- describe( 'downcast conversion', () => {
- let table;
- beforeEach( () => {
- table = createEmptyTable();
- } );
- it( 'should downcast height', () => {
- model.change( writer => writer.setAttribute( 'height', '1337px', table ) );
- assertTableStyle( editor, 'height:1337px;' );
- } );
- } );
- } );
- describe( 'alignment', () => {
- it( 'should set proper schema rules', () => {
- expect( model.schema.checkAttribute( [ '$root', 'table' ], 'alignment' ) ).to.be.true;
- } );
- describe( 'upcast conversion', () => {
- it( 'should upcast style="margin-left:auto;margin-right:0" to right value', () => {
- editor.setData( '<table style="margin-left:auto;margin-right:0"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'right' );
- } );
- it( 'should upcast style="margin-left:0;margin-right:auto" to left value', () => {
- editor.setData( '<table style="margin-left:0;margin-right:auto"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'left' );
- } );
- it( 'should upcast style="margin-left:auto;margin-right:auto" to center value', () => {
- editor.setData( '<table style="margin-left:auto;margin-right:auto"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'center' );
- } );
- it( 'should upcast style="margin-left:auto;margin-right:0pt" to right value', () => {
- editor.setData( '<table style="margin-left:auto;margin-right:0pt"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'right' );
- } );
- it( 'should upcast style="margin-left:auto;margin-right:0%" to right value', () => {
- editor.setData( '<table style="margin-left:auto;margin-right:0%"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'right' );
- } );
- it( 'should not upcast style="margin-left:auto;margin-right:0.23pt" to right value', () => {
- editor.setData( '<table style="margin-left:auto;margin-right:0.23pt"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.hasAttribute( 'alignment' ) ).to.be.false;
- } );
- it( 'should upcast align=right attribute', () => {
- editor.setData( '<table align="right"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'right' );
- } );
- it( 'should upcast align=left attribute', () => {
- editor.setData( '<table align="left"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'left' );
- } );
- it( 'should upcast align=center attribute', () => {
- editor.setData( '<table align="center"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.getAttribute( 'alignment' ) ).to.equal( 'center' );
- } );
- it( 'should discard align=justify attribute', () => {
- editor.setData( '<table align="justify"><tr><td>foo</td></tr></table>' );
- const table = model.document.getRoot().getNodeByPath( [ 0 ] );
- expect( table.hasAttribute( 'alignment' ) ).to.be.false;
- } );
- } );
- describe( 'downcast conversion', () => {
- let table;
- beforeEach( () => {
- table = createEmptyTable();
- } );
- it( 'should downcast right alignment', () => {
- model.change( writer => writer.setAttribute( 'alignment', 'right', table ) );
- assertTableStyle( editor, 'margin-left:auto;margin-right:0;' );
- } );
- it( 'should downcast left alignment', () => {
- model.change( writer => writer.setAttribute( 'alignment', 'left', table ) );
- assertTableStyle( editor, 'margin-left:0;margin-right:auto;' );
- } );
- it( 'should downcast centered alignment', () => {
- model.change( writer => writer.setAttribute( 'alignment', 'center', table ) );
- assertTableStyle( editor, 'margin-left:auto;margin-right:auto;' );
- } );
- it( 'should downcast changed alignment', () => {
- model.change( writer => writer.setAttribute( 'alignment', 'center', table ) );
- assertTableStyle( editor, 'margin-left:auto;margin-right:auto;' );
- model.change( writer => writer.setAttribute( 'alignment', 'right', table ) );
- assertTableStyle( editor, 'margin-left:auto;margin-right:0;' );
- } );
- it( 'should downcast removed alignment', () => {
- model.change( writer => writer.setAttribute( 'alignment', 'center', table ) );
- assertTableStyle( editor, 'margin-left:auto;margin-right:auto;' );
- model.change( writer => writer.removeAttribute( 'alignment', table ) );
- assertTableStyle( editor );
- } );
- } );
- } );
- function createEmptyTable() {
- setModelData(
- model,
- '<table headingRows="0" headingColumns="0">' +
- '<tableRow>' +
- '<tableCell>' +
- '<paragraph>foo</paragraph>' +
- '</tableCell>' +
- '</tableRow>' +
- '</table>'
- );
- return model.document.getRoot().getNodeByPath( [ 0 ] );
- }
- } );
|