This commit is contained in:
2026-05-13 17:11:09 +02:00
commit ea63897455
2785 changed files with 359868 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
jQuery(document).ready(function($) {
tinymce.PluginManager.add('cpHeadlineCount', function(editor, url) {
editor.addButton('cpHeadlineCount', {
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADuSURBVDiNrdKxSkNBEAXQQ3xRUIMIUVIHbaxsA7baiiBWFlb+hI12/kUqwUKxE1OlCiIIfoCC1mJrk4ha7IYs4fHiUy8su3vZuTtzZ/gjpkq8reAQfbz+5rMWvnCTktkPg3ewFs8z42kVYRXnuEQt4Rs4wVwm+FBHNWY0wBb2sCnfp13c4R2u0MWLUONp3MfXkO+mShnWY3AZVLGPt0keTESGByyWjBugTTDoAtf4xH2832IaTaNO9bAhlDuPJTymqs/4wELCreAsiqcmNnCM2VTgSWhNHrZxJKcLKZYVezEc5U7Bm0JUcGA00v+Db96IMBKttlI2AAAAAElFTkSuQmCC',
tooltip: 'Create H2 with counting',
onclick: onAction
});
function onAction() {
editor.windowManager.open({
title: 'Create H2 with counting',
width: 410,
height: 155,
body: [
{type: 'textbox', name: 'title', label: 'Title', value: 'Related'},
{type: 'textbox', name: 'link', label: 'Link'},
{type: 'textbox', name: 'linkTitle', label: 'Link text'}
],
onsubmit: function(e) {
let html = '<p><span class="related-single">' + e.data.title + ': <a href="' + e.data.link + '">' + e.data.linkTitle + '</a></span></p>';
editor.insertContent(html);
}
});
}
});
});
/*
tinymce.PluginManager.add('example', function(editor, url) {
// Add a button that opens a window
editor.addButton('example', {
text: 'My button',
icon: false,
onclick: function() {
// Open window
}
});
// Adds a menu item to the tools menu
editor.addMenuItem('example', {
text: 'Example plugin',
context: 'tools',
onclick: function() {
// Open window with a specific url
editor.windowManager.open({
title: 'TinyMCE site',
url: 'https://www.tiny.cloud/',
width: 800,
height: 600,
buttons: [{
text: 'Close',
onclick: 'close'
}]
});
}
});
return {
getMetadata: function () {
return {
name: "Example plugin",
url: "http://exampleplugindocsurl.com"
};
}
};
});
*/