本文整理匯總了TypeScript中tinymce/core/EditorManager.remove函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript remove函數的具體用法?TypeScript remove怎麽用?TypeScript remove使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了remove函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
suite.asyncTest('Externally destroyed editor', function (_, done) {
EditorManager.remove();
EditorManager.init({
selector: 'textarea',
skin_url: '/project/js/tinymce/skins/lightgray',
init_instance_callback (editor1) {
Delay.setTimeout(function () {
// Destroy the editor by setting innerHTML common ajax pattern
viewBlock.update('<textarea id="' + editor1.id + '"></textarea>');
// Re-init the editor will have the same id
EditorManager.init({
selector: 'textarea',
skin_url: '/project/js/tinymce/skins/lightgray',
init_instance_callback (editor2) {
LegacyUnit.equal(EditorManager.get().length, 1);
LegacyUnit.equal(editor1.id, editor2.id);
LegacyUnit.equal(editor1.destroyed, 1, 'First editor instance should be destroyed');
teardown(done);
}
});
}, 0);
}
});
});
示例2:
const sRemoveEditors = Step.sync(function () {
EditorManager.remove();
});
示例3: done
window.setTimeout(function () {
EditorManager.remove();
done();
}, 0);