File manager - Edit - /home/opticamezl/www/newok/anchor.zip
Back
PK ���\�h՝� � plugin.jsnu �[��� /** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.10.9 (2023-11-15) */ (function () { 'use strict'; var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager'); var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils'); var global = tinymce.util.Tools.resolve('tinymce.util.Tools'); var allowHtmlInNamedAnchor = function (editor) { return editor.getParam('allow_html_in_named_anchor', false, 'boolean'); }; var namedAnchorSelector = 'a:not([href])'; var isEmptyString = function (str) { return !str; }; var getIdFromAnchor = function (elm) { var id = elm.getAttribute('id') || elm.getAttribute('name'); return id || ''; }; var isAnchor = function (elm) { return elm && elm.nodeName.toLowerCase() === 'a'; }; var isNamedAnchor = function (elm) { return isAnchor(elm) && !elm.getAttribute('href') && getIdFromAnchor(elm) !== ''; }; var isEmptyNamedAnchor = function (elm) { return isNamedAnchor(elm) && !elm.firstChild; }; var removeEmptyNamedAnchorsInSelection = function (editor) { var dom = editor.dom; global$1(dom).walk(editor.selection.getRng(), function (nodes) { global.each(nodes, function (node) { if (isEmptyNamedAnchor(node)) { dom.remove(node, false); } }); }); }; var isValidId = function (id) { return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id); }; var getNamedAnchor = function (editor) { return editor.dom.getParent(editor.selection.getStart(), namedAnchorSelector); }; var getId = function (editor) { var anchor = getNamedAnchor(editor); if (anchor) { return getIdFromAnchor(anchor); } else { return ''; } }; var createAnchor = function (editor, id) { editor.undoManager.transact(function () { if (!allowHtmlInNamedAnchor(editor)) { editor.selection.collapse(true); } if (editor.selection.isCollapsed()) { editor.insertContent(editor.dom.createHTML('a', { id: id })); } else { removeEmptyNamedAnchorsInSelection(editor); editor.formatter.remove('namedAnchor', null, null, true); editor.formatter.apply('namedAnchor', { value: id }); editor.addVisual(); } }); }; var updateAnchor = function (editor, id, anchorElement) { anchorElement.removeAttribute('name'); anchorElement.id = id; editor.addVisual(); editor.undoManager.add(); }; var insert = function (editor, id) { var anchor = getNamedAnchor(editor); if (anchor) { updateAnchor(editor, id, anchor); } else { createAnchor(editor, id); } editor.focus(); }; var insertAnchor = function (editor, newId) { if (!isValidId(newId)) { editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'); return false; } else { insert(editor, newId); return true; } }; var open = function (editor) { var currentId = getId(editor); editor.windowManager.open({ title: 'Anchor', size: 'normal', body: { type: 'panel', items: [{ name: 'id', type: 'input', label: 'ID', placeholder: 'example' }] }, buttons: [ { type: 'cancel', name: 'cancel', text: 'Cancel' }, { type: 'submit', name: 'save', text: 'Save', primary: true } ], initialData: { id: currentId }, onSubmit: function (api) { if (insertAnchor(editor, api.getData().id)) { api.close(); } } }); }; var register$1 = function (editor) { editor.addCommand('mceAnchor', function () { open(editor); }); }; var isNamedAnchorNode = function (node) { return node && isEmptyString(node.attr('href')) && !isEmptyString(node.attr('id') || node.attr('name')); }; var isEmptyNamedAnchorNode = function (node) { return isNamedAnchorNode(node) && !node.firstChild; }; var setContentEditable = function (state) { return function (nodes) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; if (isEmptyNamedAnchorNode(node)) { node.attr('contenteditable', state); } } }; }; var setup = function (editor) { editor.on('PreInit', function () { editor.parser.addNodeFilter('a', setContentEditable('false')); editor.serializer.addNodeFilter('a', setContentEditable(null)); }); }; var registerFormats = function (editor) { editor.formatter.register('namedAnchor', { inline: 'a', selector: namedAnchorSelector, remove: 'all', split: true, deep: true, attributes: { id: '%value' }, onmatch: function (node, _fmt, _itemName) { return isNamedAnchor(node); } }); }; var register = function (editor) { editor.ui.registry.addToggleButton('anchor', { icon: 'bookmark', tooltip: 'Anchor', onAction: function () { return editor.execCommand('mceAnchor'); }, onSetup: function (buttonApi) { return editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind; } }); editor.ui.registry.addMenuItem('anchor', { icon: 'bookmark', text: 'Anchor...', onAction: function () { return editor.execCommand('mceAnchor'); } }); }; function Plugin () { global$2.add('anchor', function (editor) { setup(editor); register$1(editor); register(editor); editor.on('PreInit', function () { registerFormats(editor); }); }); } Plugin(); }()); PK ���\���� � index.jsnu �[��� // Exports the "anchor" plugin for usage with module loaders // Usage: // CommonJS: // require('tinymce/plugins/anchor') // ES2015: // import 'tinymce/plugins/anchor' require('./plugin.js');PK ���\��ܘ � plugin.min.jsnu �[��� /** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.10.9 (2023-11-15) */ !function(){"use strict";function a(e){return e.getAttribute("id")||e.getAttribute("name")||""}function c(e){return e&&"a"===e.nodeName.toLowerCase()&&!e.getAttribute("href")&&""!==a(e)}function d(e){return e.dom.getParent(e.selection.getStart(),l)}function r(e,t){var o,a,n,r,i,l=d(e);l?(n=e,r=t,(i=l).removeAttribute("name"),i.id=r,n.addVisual(),n.undoManager.add()):(a=t,(o=e).undoManager.transact(function(){var e,n;o.getParam("allow_html_in_named_anchor",!1,"boolean")||o.selection.collapse(!0),o.selection.isCollapsed()?o.insertContent(o.dom.createHTML("a",{id:a})):(n=(e=o).dom,u(n).walk(e.selection.getRng(),function(e){s.each(e,function(e){var t;c(t=e)&&!t.firstChild&&n.remove(e,!1)})}),o.formatter.remove("namedAnchor",null,null,!0),o.formatter.apply("namedAnchor",{value:a}),o.addVisual())})),e.focus()}function i(r){return function(e){for(var t,n=0;n<e.length;n++){var o=e[n],a=void 0;!(a=t=o)||a.attr("href")||!a.attr("id")&&!a.attr("name")||t.firstChild||o.attr("contenteditable",r)}}}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),s=tinymce.util.Tools.resolve("tinymce.util.Tools"),l="a:not([href])";e.add("anchor",function(e){var t,n,o;(t=e).on("PreInit",function(){t.parser.addNodeFilter("a",i("false")),t.serializer.addNodeFilter("a",i(null))}),(n=e).addCommand("mceAnchor",function(){var o,e,t;t=(e=d(o=n))?a(e):"",o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:function(e){var t=o,n=e.getData().id;(/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(n)?(r(t,n),0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))||e.close()}})}),(o=e).ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return o.execCommand("mceAnchor")},onSetup:function(e){return o.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),o.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return o.execCommand("mceAnchor")}}),e.on("PreInit",function(){e.formatter.register("namedAnchor",{inline:"a",selector:l,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:c})})})}();PK ���\��o&I I plugin.min.js.gznu �[��� � �Vmo�6����&��2�Ӣ*WX�R� �-ݴn/����-5#��x���{A�N�l{(�-q^�y��3<;9y%N�%u��W Uiq�q#n�j��<$#����"1z%!A�����k_&�E�5D� ���^���b�]a�7�@q� ,d�qL�E�/T,"�%�C���:����>�F�6�]*����e�[��Wb,�7���{>�� ��쫯O��OϿѯ��٫ɲ�*H�����W,�u��m�# �+���=��������*���c��8�t*�,�,R ?�,�5�!^�JO���9�K��S)'e���~������E@V`���;v��6�(<*0���. 2Π�ƛP���Za &�l�/��Z���j5�������|�]Pڠ�7� b�(��r2*A?�rt�\���<���VI��nÝǻ����a�P�frn�(��?�^Q�K�&3m� >]�M�ү�zL���3|4�YEp?ݼ�V�I��u�\ � J���� �]���%��Ji�X�m��F���\,�+�%��g��1�e�C=��xfr�=�"v=���0�=؇������.l^xo�]�!�e�������O�5^�G������R��9~6 ����_�IV�{�5��'_��|�Q�~xp�1��&���f���롿�1�ǽ�V���ڳ[�&�aF.�Y � l�>���l�D!�w�� ��㞗R��oEe���p��Ij��VؓMjJ� $V�3�Z�a�y �g|1hh>R�*�6�z>r�[���i�?S ?��G"{%�.$�Z� �w���̤��Ag�Kj[���m/wx0<��&���~����Ґ]{�i} � Ֆ=(�!]���YP�)��預�C�x�6E�ٙ=v=K�B!�������B ���ѵ] 9�f�3�$���a�S�R�>r!/wo���~�f�w�������Eߺ�)&���x��]�ޱ+���`ߍ��N�$��8�����su�����r��n����o�}Zػۓ�Y�� �k�f��/Pv"+yU��Pj��Dkύp"@�#��UjA6b���ط��v�ɗ��8QQ L�20^RE��ڜ�q>V��\F�ڋ��V>q�d2��j��Y<~�+�"������0Q`�=1��b�8b�^���G����z����$'��Mn�w�ͯ��9��N5Y�9o�~l�g��E�o �+���8h�Wk�[�u��T�M��=�/'������`v��ȃX����dfj�.���� ��_�cEf�[�UST�8��� ��ܘ PK ���\�h՝� � plugin.jsnu �[��� PK ���\���� � / index.jsnu �[��� PK ���\��ܘ � 1 plugin.min.jsnu �[��� PK ���\��o&I I % plugin.min.js.gznu �[��� PK . �*
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings