1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00

npm update

This commit is contained in:
Daniel Neto 2023-08-12 10:32:47 -03:00
parent 0cdd3e9fee
commit 4696ba952f
1437 changed files with 32727 additions and 1248226 deletions

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 6.4.2 (2023-04-26)
* TinyMCE version 6.6.2 (2023-08-09)
*/
(function () {
@ -164,18 +164,36 @@
});
};
const onSetupEditable = editor => api => {
const nodeChanged = () => {
api.setEnabled(editor.selection.isEditable());
};
editor.on('NodeChange', nodeChanged);
nodeChanged();
return () => {
editor.off('NodeChange', nodeChanged);
};
};
const register = editor => {
const onAction = () => editor.execCommand('mceAnchor');
editor.ui.registry.addToggleButton('anchor', {
icon: 'bookmark',
tooltip: 'Anchor',
onAction,
onSetup: buttonApi => editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind
onSetup: buttonApi => {
const unbindSelectorChanged = editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind;
const unbindEditableChanged = onSetupEditable(editor)(buttonApi);
return () => {
unbindSelectorChanged();
unbindEditableChanged();
};
}
});
editor.ui.registry.addMenuItem('anchor', {
icon: 'bookmark',
text: 'Anchor...',
onAction
onAction,
onSetup: onSetupEditable(editor)
});
};