PHP Classes

File: public/js/tinymce/src/plugins/lists/src/main/js/core/NodeType.js

Recommend this page to a friend!
  Classes of Abed Nego Ragil Putra   GoLavaCMS   public/js/tinymce/src/plugins/lists/src/main/js/core/NodeType.js   Download  
File: public/js/tinymce/src/plugins/lists/src/main/js/core/NodeType.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: GoLavaCMS
Publish content on Web pages with SEO support
Author: By
Last change:
Date: 6 years ago
Size: 2,192 bytes
 

Contents

Class file image Download
/** * NodeType.js * * Released under LGPL License. * Copyright (c) 1999-2017 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define( 'tinymce.plugins.lists.core.NodeType', [ ], function () { var isTextNode = function (node) { return node && node.nodeType === 3; }; var isListNode = function (node) { return node && (/^(OL|UL|DL)$/).test(node.nodeName); }; var isListItemNode = function (node) { return node && /^(LI|DT|DD)$/.test(node.nodeName); }; var isTableCellNode = function (node) { return node && /^(TH|TD)$/.test(node.nodeName); }; var isBr = function (node) { return node && node.nodeName === 'BR'; }; var isFirstChild = function (node) { return node.parentNode.firstChild === node; }; var isLastChild = function (node) { return node.parentNode.lastChild === node; }; var isTextBlock = function (editor, node) { return node && !!editor.schema.getTextBlockElements()[node.nodeName]; }; var isBlock = function (node, blockElements) { return node && node.nodeName in blockElements; }; var isBogusBr = function (dom, node) { if (!isBr(node)) { return false; } if (dom.isBlock(node.nextSibling) && !isBr(node.previousSibling)) { return true; } return false; }; var isEmpty = function (dom, elm, keepBookmarks) { var empty = dom.isEmpty(elm); if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) { return false; } return empty; }; var isChildOfBody = function (dom, elm) { return dom.isChildOf(elm, dom.getRoot()); }; return { isTextNode: isTextNode, isListNode: isListNode, isListItemNode: isListItemNode, isTableCellNode: isTableCellNode, isBr: isBr, isFirstChild: isFirstChild, isLastChild: isLastChild, isTextBlock: isTextBlock, isBlock: isBlock, isBogusBr: isBogusBr, isEmpty: isEmpty, isChildOfBody: isChildOfBody }; } );