/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * A lightweight representation of an HTML DOM structure. * @constructor * @example */ CKEDITOR.htmlParser.fragment = function() { /** * The nodes contained in the root of this fragment. * @type Array * @example * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( 'Sample Text' ); * alert( fragment.children.length ); "2" */ this.children = []; /** * Get the fragment parent. Should always be null. * @type Object * @default null * @example */ this.parent = null; /** @private */ this._ = { isBlockLike : true, hasInlineStarted : false }; }; (function() { // Block-level elements whose internal structure should be respected during // parser fixing. var nonBreakingBlocks = CKEDITOR.tools.extend( { table:1,ul:1,ol:1,dl:1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl ); // IE < 8 don't output the close tag on definition list items. (#6975) var optionalCloseTags = CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? { dd : 1, dt :1 } : {}; var listBlocks = { ol:1, ul:1 }; // Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan