本文整理汇总了TypeScript中tinymce/plugins/paste/core/InternalHtml.mark函数的典型用法代码示例。如果您正苦于以下问题:TypeScript mark函数的具体用法?TypeScript mark怎么用?TypeScript mark使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mark函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
const sTestPaste = function (editor, tinyApis) {
return Log.stepsAsStep('TBA', 'Paste: Paste external content', [
sPaste(editor, tinyApis, '<p>abc</p>', { 'text/plain': 'X', 'text/html': '<p>X</p>' }, [0, 0], 0, [0, 0], 3),
sWaitForProcessEvents,
sAssertLastPreProcessEvent({ internal: false, content: 'X' }),
sAssertLastPostProcessEvent({ internal: false, content: 'X' })
]),
Log.stepsAsStep('TBA', 'Paste: Paste external content treated as plain text', [
sPaste(editor, tinyApis, '<p>abc</p>', { 'text/html': '<p>X</p>' }, [0, 0], 0, [0, 0], 3),
sWaitForProcessEvents,
sAssertLastPreProcessEvent({ internal: false, content: 'X' }),
sAssertLastPostProcessEvent({ internal: false, content: 'X' })
]),
Log.stepsAsStep('TBA', 'Paste: Paste internal content with mark', [
sPaste(editor, tinyApis, '<p>abc</p>', { 'text/plain': 'X', 'text/html': InternalHtml.mark('<p>X</p>') }, [0, 0], 0, [0, 0], 3),
sWaitForProcessEvents,
sAssertLastPreProcessEvent({ internal: true, content: '<p>X</p>' }),
sAssertLastPostProcessEvent({ internal: true, content: '<p>X</p>' })
]),
Log.stepsAsStep('TBA', 'Paste: Paste internal content with mime', [
sPaste(editor, tinyApis, '<p>abc</p>',
{ 'text/plain': 'X', 'text/html': '<p>X</p>', 'x-tinymce/html': '<p>X</p>' },
[0, 0], 0, [0, 0], 3
),
sWaitForProcessEvents,
sAssertLastPreProcessEvent({ internal: true, content: '<p>X</p>' }),
sAssertLastPostProcessEvent({ internal: true, content: '<p>X</p>' })
]);
};
示例2: function
const testMark = function () {
assert.eq('<!-- x-tinymce/html -->abc', InternalHtml.mark('abc'));
};