本文整理汇总了TypeScript中tinymce/core/api/Editor.nodeChanged函数的典型用法代码示例。如果您正苦于以下问题:TypeScript nodeChanged函数的具体用法?TypeScript nodeChanged怎么用?TypeScript nodeChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了nodeChanged函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
const handleInsert = function (editor: Editor, html) {
const beforeObjects = editor.dom.select('img[data-mce-object]');
editor.insertContent(html);
selectPlaceholder(editor, beforeObjects);
editor.nodeChanged();
};
示例2: imageLoadedHandler
function imageLoadedHandler() {
editor.$(selectedImage).off('load', imageLoadedHandler);
editor.nodeChanged();
if (uploadImmediately) {
editor.editorUpload.uploadImagesAuto();
} else {
cancelTimedUpload(imageUploadTimerState);
startTimedUpload(editor, imageUploadTimerState);
}
}
示例3:
const deleteImage = (editor: Editor, image: HTMLElement) => {
if (image) {
const elm = editor.dom.is(image.parentNode, 'figure.image') ? image.parentNode : image;
editor.dom.remove(elm);
editor.focus();
editor.nodeChanged();
if (editor.dom.isEmpty(editor.getBody())) {
editor.setContent('');
editor.selection.setCursorLocation();
}
}
};
示例4:
tableOpt.filter(Fun.not(isRoot)).each((table) => {
const cursor = Element.fromText('');
Insert.after(table, cursor);
Remove.remove(table);
if (editor.dom.isEmpty(editor.getBody())) {
editor.setContent('');
editor.selection.setCursorLocation();
} else {
const rng = editor.dom.createRng();
rng.setStart(cursor.dom(), 0);
rng.setEnd(cursor.dom(), 0);
editor.selection.setRng(rng);
editor.nodeChanged();
}
});
示例5: listsIndentation
const selectionIndentation = (editor: Editor, indentation: Indentation): boolean => {
const lists = Arr.map(Selection.getSelectedListRoots(editor), Element.fromDom);
const dlItems = Arr.map(Selection.getSelectedDlItems(editor), Element.fromDom);
let isHandled = false;
if (lists.length || dlItems.length) {
const bookmark = editor.selection.getBookmark();
listsIndentation(editor, lists, indentation);
dlIndentation(editor, indentation, dlItems);
editor.selection.moveToBookmark(bookmark);
editor.selection.setRng(Range.normalizeRange(editor.selection.getRng()));
editor.nodeChanged();
isHandled = true;
}
return isHandled;
};
示例6: show
const render = () => {
if (floatContainer) {
show();
return;
}
floatContainer = uiComponents.outerContainer;
const uiContainer = getUiContainer(editor);
Attachment.attachSystem(uiContainer, uiComponents.mothership);
Attachment.attachSystem(uiContainer, uiComponents.uiMothership);
OuterContainer.setToolbar(
uiComponents.outerContainer,
identifyButtons(editor, rawUiConfig, {backstage}, Option.none())
);
OuterContainer.setMenubar(
uiComponents.outerContainer,
identifyMenus(editor, rawUiConfig)
);
if (!useFixedToolbarContainer) {
// Do not set position if using fixed_toolbar_container
Css.set(floatContainer.element(), 'position', 'absolute');
}
// Initialise the toolbar - set initial positioning then show
updateChromeUi();
show();
editor.on('NodeChange ResizeWindow', updateChromeUi);
editor.on('activate', show);
editor.on('deactivate', hide);
editor.nodeChanged();
};
示例7:
editor.undoManager.transact(function () {
editor.focus();
editor.formatter.remove(format, { value: null }, null, true);
editor.nodeChanged();
});
示例8:
action: (btn) => {
editor.focus();
editor.selection.select(part.element);
editor.nodeChanged();
}