本文整理匯總了TypeScript中tinymce/core/caret/CaretContainer.isCaretContainerInline函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript isCaretContainerInline函數的具體用法?TypeScript isCaretContainerInline怎麽用?TypeScript isCaretContainerInline使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了isCaretContainerInline函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
suite.test('isCaretContainerInline', function () {
LegacyUnit.equal(CaretContainer.isCaretContainerInline(document.createTextNode('text')), false);
LegacyUnit.equal(CaretContainer.isCaretContainerInline(DomQuery('<span></span>')[0]), false);
LegacyUnit.equal(CaretContainer.isCaretContainerInline(DomQuery('<span data-mce-caret="1"></span>')[0]), false);
LegacyUnit.equal(CaretContainer.isCaretContainerInline(DomQuery('<span data-mce-caret="1">a</span>')[0].firstChild), false);
LegacyUnit.equal(CaretContainer.isCaretContainerInline(document.createTextNode(Zwsp.ZWSP)), true);
});
示例2: setupHtml
Step.sync(function () {
setupHtml('<span contentEditable="false">1</span>');
CaretContainer.insertInline(getRoot().firstChild, true);
Assertions.assertEq('Should be inline container', true, CaretContainer.isCaretContainerInline(getRoot().firstChild));
CaretContainerRemove.remove(getRoot().firstChild);
Assertions.assertEq('Should not be inline container', false, CaretContainer.isCaretContainerInline(getRoot().firstChild));
})
示例3: function
suite.test('down from P to inline cE=false', function (editor) {
editor.setContent('<p>abc</p><p>a<span contentEditable="false">1</span></p>');
LegacyUnit.setSelection(editor, 'p:first', 3);
downArrow(editor);
LegacyUnit.equal(CaretContainer.isCaretContainerInline(editor.$('p:last')[0].lastChild), true);
});