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,15 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset grid="16"></iconset>
</metadata>
<defs>
<font id="sh4tinymce" horiz-adv-x="512" >
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
<glyph unicode="&#xf121;" d="M 176.286,80.286l-14.286-14.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-133.143,133.143q-2.857,2.857 -2.857,6.571t 2.857,6.571l 133.143,133.143q 2.857,2.857 6.571,2.857t 6.571-2.857l 14.286-14.286q 2.857-2.857 2.857-6.571t-2.857-6.571l-112.286-112.286l 112.286-112.286q 2.857-2.857 2.857-6.571t-2.857-6.571zM 345.143,385.143l-106.571-368.857q-1.143-3.714 -4.429-5.571t-6.714-0.714l-17.714,4.857q-3.714,1.143 -5.571,4.429t-0.714,7 l 106.571,368.857q 1.143,3.714 4.429,5.571t 6.714,0.714l 17.714-4.857q 3.714-1.143 5.571-4.429t 0.714-7zM 532.857,199.143l-133.143-133.143q-2.857-2.857 -6.571-2.857t-6.571,2.857l-14.286,14.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 112.286,112.286l-112.286,112.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 14.286,14.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 133.143-133.143q 2.857-2.857 2.857-6.571t-2.857-6.571z" horiz-adv-x="548.571" data-tags="code, embed" />
<glyph unicode="&#x20;" horiz-adv-x="256" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>
This is a custom SVG font generated by IcoMoon.
<iconset grid="16"></iconset>
</metadata>
<defs>
<font id="sh4tinymce" horiz-adv-x="512" >
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
<glyph unicode="&#xf121;" d="M 176.286,80.286l-14.286-14.286q-2.857-2.857 -6.571-2.857t-6.571,2.857l-133.143,133.143q-2.857,2.857 -2.857,6.571t 2.857,6.571l 133.143,133.143q 2.857,2.857 6.571,2.857t 6.571-2.857l 14.286-14.286q 2.857-2.857 2.857-6.571t-2.857-6.571l-112.286-112.286l 112.286-112.286q 2.857-2.857 2.857-6.571t-2.857-6.571zM 345.143,385.143l-106.571-368.857q-1.143-3.714 -4.429-5.571t-6.714-0.714l-17.714,4.857q-3.714,1.143 -5.571,4.429t-0.714,7 l 106.571,368.857q 1.143,3.714 4.429,5.571t 6.714,0.714l 17.714-4.857q 3.714-1.143 5.571-4.429t 0.714-7zM 532.857,199.143l-133.143-133.143q-2.857-2.857 -6.571-2.857t-6.571,2.857l-14.286,14.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 112.286,112.286l-112.286,112.286q-2.857,2.857 -2.857,6.571t 2.857,6.571l 14.286,14.286q 2.857,2.857 6.571,2.857t 6.571-2.857l 133.143-133.143q 2.857-2.857 2.857-6.571t-2.857-6.571z" horiz-adv-x="548.571" />
<glyph unicode="&#x20;" horiz-adv-x="256" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,12 @@
tinymce.addI18n('en',{
'SH4TinyMCE - Code Editor' : 'SH4TinyMCE - Code Editor',
'Insert/Edit Code' : 'Insert/Edit Code',
'Language' : 'Language',
'Auto links' : 'Auto links',
'Gutter' : 'Gutter',
'Html script' : 'HTML script',
'Toolbar' : 'Toolbar',
'Highlight' : 'Highlight',
'Tab size' : 'Tab size',
'First Line' : 'First Line',
});

View File

@@ -0,0 +1,12 @@
tinymce.addI18n('fr_FR',{
'SH4TinyMCE - Code Editor' : 'SH4TinyMCE - Editeur de code',
'Insert/Edit Code' : 'Ins\u00e9rer/Editer Code',
'Language' : 'Langage',
'Auto links' : 'Liens cliquables',
'Gutter' : 'Num\u00e9ros de lignes',
'Html script' : 'Script HTML',
'Toolbar' : 'Menu',
'Highlight' : 'Highlight',
'Tab size' : 'Tabulation',
'First Line' : '1\u00e8re ligne',
});

View File

@@ -0,0 +1,197 @@
tinymce.addI18n('sl_SI',{
"Cut": "Izre\u017ei",
"Heading 5": "Podnaslov 5",
"Header 2": "Naslov 2",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Varnostne nastavitve brskalnika ne dopu\u0161\u010dajo direktnega dostopa do odlo\u017ei\u0161\u010da. Uporabite kombinacijo tipk Ctrl+X\/C\/V na tipkovnici.",
"Heading 4": "Podnaslov 4",
"Div": "Div",
"Heading 2": "Podnaslov 2",
"Paste": "Prilepi",
"Close": "Zapri",
"Font Family": "Dru\u017eina pisav",
"Pre": "Predformat",
"Align right": "Desna poravnava",
"New document": "Nov dokument",
"Blockquote": "Zamik besedila",
"Numbered list": "O\u0161tevil\u010den seznam",
"Heading 1": "Podnaslov 1",
"Headings": "Podnaslovi",
"Increase indent": "Pove\u010daj zamik",
"Formats": "Oblika",
"Headers": "Naslovi",
"Select all": "Izberi vse",
"Header 3": "Naslov 3",
"Blocks": "Grupe",
"Undo": "Razveljavi",
"Strikethrough": "Pre\u010drtano",
"Bullet list": "Ozna\u010den seznam",
"Header 1": "Naslov 1",
"Superscript": "Nadpisano",
"Clear formatting": "Odstrani oblikovanje",
"Font Sizes": "Velikosti pisave",
"Subscript": "Podpisano",
"Header 6": "Naslov 6",
"Redo": "Ponovi",
"Paragraph": "Odstavek",
"Ok": "V redu",
"Bold": "Krepko",
"Code": "Koda",
"Italic": "Le\u017ee\u010de",
"Align center": "Sredinska poravnava",
"Header 5": "Naslov 5",
"Heading 6": "Podnaslov 6",
"Heading 3": "Podnaslov 3",
"Decrease indent": "Zmanj\u0161aj zamik",
"Header 4": "Naslov 4",
"Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.": "Odlagali\u0161\u010de je zdaj v tekstovnem na\u010dinu. Vsebina bo preslikana kot golo besedilo brez oblike, dokler te mo\u017enosti ne izklju\u010dite.",
"Underline": "Pod\u010drtano",
"Cancel": "Prekli\u010di",
"Justify": "Obojestranska poravnava",
"Inline": "Med besedilom",
"Copy": "Kopiraj",
"Align left": "Leva poravnava",
"Visual aids": "Vizualni pripomo\u010dki",
"Lower Greek": "Male gr\u0161ke \u010drke",
"Square": "Kvadratek",
"Default": "Privzeto",
"Lower Alpha": "Male tiskane \u010drke",
"Circle": "Pikica",
"Disc": "Kroglica",
"Upper Alpha": "Velike tiskane \u010drke",
"Upper Roman": "Velike rimske \u0161tevilke",
"Lower Roman": "Male rimske \u0161tevilke",
"Name": "Naziv zaznamka",
"Anchor": "Zaznamek",
"You have unsaved changes are you sure you want to navigate away?": "Imate neshranjene spremembe. Ste prepri\u010dati, da \u017eelite zapustiti stran?",
"Restore last draft": "Obnovi zadnji osnutek",
"Special character": "Posebni znaki",
"Source code": "Izvorna koda",
"Color": "Barva",
"Right to left": "Od desne proti levi",
"Left to right": "Od leve proti desni",
"Emoticons": "Sme\u0161ki",
"Robots": "Robotki",
"Document properties": "Lastnosti dokumenta",
"Title": "Naslov",
"Keywords": "Klju\u010dne besede",
"Encoding": "Kodiranje",
"Description": "Opis",
"Author": "Avtor",
"Fullscreen": "\u010cez cel zaslon",
"Horizontal line": "Vodoravna \u010drta",
"Horizontal space": "Vodoravni prostor",
"Insert\/edit image": "Vstavi\/uredi sliko",
"General": "Splo\u0161no",
"Advanced": "Napredno",
"Source": "Pot",
"Border": "Obroba",
"Constrain proportions": "Obdr\u017ei razmerje",
"Vertical space": "Navpi\u010dni prostor",
"Image description": "Opis slike",
"Style": "Slog",
"Dimensions": "Dimenzije",
"Insert image": "Vnesi sliko",
"Insert date\/time": "Vstavi datum\/\u010das",
"Remove link": "Odstrani povezavo",
"Url": "Povezava",
"Text to display": "Prikazno besedilo",
"Anchors": "Sidra",
"Insert link": "Vstavi povezavo",
"New window": "Novo okno",
"None": "Brez",
"The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?": "Vne\u0161eni URL predstavlja zunanjo povezavo. Ali \u017eelite dodati \"http:\/\/\" predpono?",
"Target": "Cilj",
"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?": "Vne\u0161eni URL predstavlja e-po\u0161tni naslov. Ali \u017eelite dodati potrebno \"mailto:\" predpono?",
"Insert\/edit link": "Vstavi\/uredi povezavo",
"Insert\/edit video": "Vstavi\/uredi video",
"Poster": "Poster",
"Alternative source": "Nadomestni vir",
"Paste your embed code below:": "Prilepite kodo za vdelavo:",
"Insert video": "Vstavi video",
"Embed": "Vdelaj",
"Nonbreaking space": "Nedeljivi presledek",
"Page break": "Prelom strani",
"Paste as text": "Vnesi kot besedilo",
"Preview": "Predogled",
"Print": "Natisni",
"Save": "Shrani",
"Could not find the specified string.": "Iskanje ni vrnilo rezultatov.",
"Replace": "Zamenjaj",
"Next": "Naprej",
"Whole words": "Cele besede",
"Find and replace": "Poi\u0161\u010di in zamenjaj",
"Replace with": "Zamenjaj z",
"Find": "I\u0161\u010di",
"Replace all": "Zamenjaj vse",
"Match case": "Ujemanje malih in velikih \u010drk",
"Prev": "Nazaj",
"Spellcheck": "Preverjanje \u010drkovanja",
"Finish": "Zaklju\u010di",
"Ignore all": "Prezri vse",
"Ignore": "Prezri",
"Add to Dictionary": "Dodaj v slovar",
"Insert row before": "Vstavi vrstico pred",
"Rows": "Vrstice",
"Height": "Vi\u0161ina",
"Paste row after": "Prilepi vrstico za",
"Alignment": "Poravnava",
"Border color": "Barva obrobe",
"Column group": "Grupiranje stolpcev",
"Row": "Vrstica",
"Insert column before": "Vstavi stolpec pred",
"Split cell": "Razdeli celico",
"Cell padding": "Polnilo med celicami",
"Cell spacing": "Razmik med celicami",
"Row type": "Tip vrstice",
"Insert table": "Vstavi tabelo",
"Body": "Vsebina",
"Caption": "Naslov",
"Footer": "Noga",
"Delete row": "Izbri\u0161i vrstico",
"Paste row before": "Prilepi vrstico pred",
"Scope": "Obseg",
"Delete table": "Izbri\u0161i tabelo",
"H Align": "Horizontalna poravnava",
"Top": "Vrh",
"Header cell": "Celica glave",
"Column": "Stolpec",
"Row group": "Grupiranje vrstic",
"Cell": "Celica",
"Middle": "Sredina",
"Cell type": "Tip celice",
"Copy row": "Kopiraj vrstico",
"Row properties": "Lastnosti vrstice",
"Table properties": "Lastnosti tabele",
"Bottom": "Dno",
"V Align": "Vertikalna poravnava",
"Header": "Glava",
"Right": "Desno",
"Insert column after": "Vstavi stolpec za",
"Cols": "Stolpci",
"Insert row after": "Vstavi vrstico za",
"Width": "\u0160irina",
"Cell properties": "Lastnosti celice",
"Left": "Levo",
"Cut row": "Izre\u017ei vrstico",
"Delete column": "Izbri\u0161i stolpec",
"Center": "Sredinsko",
"Merge cells": "Zdru\u017ei celice",
"Insert template": "Vstavi predlogo",
"Templates": "Predloge",
"Background color": "Barva ozadja",
"Custom...": "Po meri ...",
"Custom color": "Barva po meri",
"No color": "Brezbarvno",
"Text color": "Barva besedila",
"Show blocks": "Prika\u017ei bloke",
"Show invisible characters": "Prika\u017ei skrite znake",
"Words: {0}": "Besed: {0}",
"Insert": "Vstavi",
"File": "Datoteka",
"Edit": "Uredi",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Bogato besedilo. Pritisnite ALT-F9 za meni. Pritisnite ALT-F10 za orodno vrstico. Pritisnite ALT-0 za pomo\u010d",
"Tools": "Orodja",
"View": "Pogled",
"Table": "Tabela",
"Format": "Oblika"
});

View File

@@ -0,0 +1,199 @@
/*
* syntaxhighlighter TinyMCE plugin
* Released under LGPL License.
*
* by Robin Calmejane
* http://nomadonweb.com
*
* Plugin page :
* http://lab.nomadonweb/sh4tinymce
*
*/
tinymce.PluginManager.requireLangPack('sh4tinymce');
tinymce.PluginManager.add('sh4tinymce', function(editor,url) {
function showDialog() {
/* Var declaration */
var win, dom = editor.dom, selection = editor.selection, data = {}, Elmt;
var shDefault = {}, defaultLanguage = 'html', selected = false, selectedCode, selectionNode = selection.getNode(), settings;
/* Set default settings for SH and plugin */
/***** DON'T CHANGE DEFAULTS *****/
/* shDefault : Default SyntaxHighlighter settings */
shDefault.autolinks = true;
shDefault.collapse = false;
shDefault.firstline = '1';
shDefault.gutter = true;
shDefault.highlight = '';
shDefault.htmlscript = false;
shDefault.tabsize = '4';
shDefault.toolbar = true;
/* data : plugin settings */
data.language = '';
data.autolinks = shDefault.autolinks;
data.collapse = shDefault.collapse;
data.firstline = shDefault.firstline;
data.gutter = shDefault.gutter;
data.highlight = shDefault.highlight;
data.htmlscript = shDefault.htmlscript;
data.tabsize = shDefault.tabsize;
data.toolbar = shDefault.toolbar;
/* End default settings */
// List languages
var languageItems = [
{text: 'Language', value: ''},
{text: 'ActionScript3', value: 'as3'},
{text: 'Bash/shell', value: 'bash'},
{text: 'ColdFusion', value: 'cf'},
{text: 'C#', value: 'csharp'},
{text: 'C++', value: 'cpp'},
{text: 'CSS', value: 'css'},
{text: 'Delphi', value: 'delphi'},
{text: 'Diff', value: 'diff'},
{text: 'Erlang', value: 'erl'},
{text: 'Groovy', value: 'groovy'},
{text: 'HTML', value: 'html'},
{text: 'Java', value: 'java'},
{text: 'JavaFX', value: 'jfx'},
{text: 'JavaScript', value: 'js'},
{text: 'Perl', value: 'perl'},
{text: 'PHP', value: 'php'},
{text: 'PowerShell', value: 'ps'},
{text: 'Python', value: 'py'},
{text: 'Ruby', value: 'ruby'},
{text: 'Scala', value: 'scala'},
{text: 'SQL', value: 'sql'},
{text: 'Text', value: 'plain'},
{text: 'Visual Basic', value: 'vb'},
{text: 'XML', value: 'xml'}
];
// Get settings of SH existing code
function getSHSettings(settings) {
var s = settings.split(';');
var settingsObj= {};
for(var i=0; i<s.length; i++)
{
var o = s[i].split(':');
settingsObj[o[0].replace(/\-/g,'')] = o[1];
}
tinymce.each(settingsObj, function(value, setting) {
if (setting == 'brush') {
if (data.language != value)
data.language = value;
} else {
value = value == 'true' ? true : (value == 'false' ? false : value);
if(setting=='highlight')value=value.replace(/\[/g,"").replace(/\]/g,"");
data[setting] = value;
}
});
}
// Check code/text selection in tinyMCE editor
if(selectionNode.nodeName.toLowerCase() == 'pre'
&& selectionNode.className.indexOf('brush:') != -1) {
// This is an SH code
selected = true;
selectedCode = $(selectionNode).html();
selectedCode = selectedCode.replace(/\&lt\;/gi,"<").replace(/\&gt\;/gi,">");
/* We have to get SH settings from classname */
settings = selectionNode.className;
settings = settings.replace(/ /g,'');
getSHSettings(settings);
}else{
// This is a simple selection
selectedCode = selection.getContent({format : 'text'});
data.autolinks = false;
data.toolbar = false;
}
// Select language item list
for(var i=0; i<languageItems.length; i++){
if(languageItems[i].value == data.language){
languageItems[i].selected = true;
}
}
data.code = selectedCode;
if (data.code == '&nbsp;')
data.code = '';
function onSubmitFunction(e) {
var code = e.data.code;
code = code.replace(/\</g,"&lt;").replace(/\>/g,"&gt;");
/* Convert settings into strings for classname */
var language = e.data.language ? e.data.language : defaultLanguage;
var collapse = e.data.collapse != shDefault.collapse ? ';collapse:' + e.data.collapse : '';
var autolinks = e.data.autolinks != shDefault.autolinks ? ';auto-links:' + e.data.autolinks : '';
var gutter = e.data.gutter != shDefault.gutter ? ';gutter:' + e.data.gutter : '';
var htmlscript = e.data.htmlscript != shDefault.htmlscript ? ';html-script:' + e.data.htmlscript : '';
var toolbar = e.data.toolbar != shDefault.toolbar ? ';toolbar:' + e.data.toolbar : '';
var firstline = e.data.firstline != shDefault.firstline ? ';first-line:' + e.data.firstline : '';
var hlstart=e.data.highlight.indexOf(",")!=-1?"[":"",
hlend=e.data.highlight.indexOf(",")!=-1?"]":"";
var highlight = e.data.highlight.replace(/ /g,"").replace(/\[/g,"").replace(/\]/g,"") != shDefault.highlight ? ';highlight:' + hlstart + e.data.highlight.replace(/ /g,"").replace(/\[/g,"").replace(/\]/g,"").replace(/,$/g,"") + hlend : '';
var tabsize = e.data.tabsize != shDefault.tabsize ? ';tab-size:' + e.data.tabsize : '';
// Create SH element with string settings
Elmt = editor.dom.create('pre',
{class: 'brush:' + language + collapse + autolinks + gutter + htmlscript + toolbar + firstline + highlight + tabsize,
contenteditable: 'false'},
code);
if(selected)
editor.dom.replace(Elmt, selectionNode);
else
editor.insertContent(editor.dom.getOuterHTML(Elmt)+'<br>');
}
win = editor.windowManager.open({
title: 'SH4TinyMCE - Code Editor',
data: data,
minWidth: 450,
body: [
{name: 'language', type: 'listbox', values: languageItems},
{name: 'code', type: 'textbox', minHeight: 200, multiline: true},
{
type: 'container',
layout: 'flex',
direction: 'row',
align: 'center',
spacing: 7,
items: [
{name: 'collapse', type: 'checkbox', text: 'Collapse', checked: data.collapse},
{name: 'autolinks', type: 'checkbox', text: 'Autolinks', checked: data.autolinks},
{name: 'gutter', type: 'checkbox', text: 'Gutter', checked: data.gutter},
{name: 'htmlscript', type: 'checkbox', text: 'Html script', checked: data.htmlscript},
{name: 'toolbar', type: 'checkbox', text: 'Toolbar', checked: data.toolbar}
]
},
{
type: 'form',
padding: 0,
labelGap: 5,
spacing: 5,
direction: 'row',
items: [
{name: 'firstline', type: 'textbox', label: 'First Line', size: 3, value: data.firstline},
{name: 'highlight', type: 'textbox', label: 'Highlight', size: 10, value: data.highlight},
{name: 'tabsize', type: 'textbox', label: 'Tab size', size: 3, value: data.tabsize},
]
}
],
onsubmit: onSubmitFunction
});
}
tinymce.DOM.loadCSS(url+'/style/style.css');
editor.addButton('sh4tinymce', {
icon: 'sh4tinymce',
tooltip: 'Insert/Edit Code',
onclick: showDialog
});
editor.addMenuItem('sh4tinymce', {
text: 'SH4TinyMCE',
icon: 'sh4tinymce',
context: 'insert',
onclick: showDialog
});
});

View File

@@ -0,0 +1 @@
tinymce.PluginManager.requireLangPack("sh4tinymce");tinymce.PluginManager.add("sh4tinymce",function(e,url){function t(){function p(e){var t=e.split(";");var n={};for(var r=0;r<t.length;r++){var s=t[r].split(":");n[s[0].replace(/\-/g,"")]=s[1]}tinymce.each(n,function(e,t){if(t=="brush"){if(i.language!=e)i.language=e}else{e=e=="true"?true:e=="false"?false:e;if(t=='highlight')e=e.replace(/\[/g,"").replace(/\]/g,"");i[t]=e}})}function v(t){var n=t.data.code;n=n.replace(/\</g,"&lt;").replace(/\>/g,"&gt;");var r=t.data.language?t.data.language:u;var i=t.data.collapse!=o.collapse?";collapse:"+t.data.collapse:"";var f=t.data.autolinks!=o.autolinks?";auto-links:"+t.data.autolinks:"";var c=t.data.gutter!=o.gutter?";gutter:"+t.data.gutter:"";var h=t.data.htmlscript!=o.htmlscript?";html-script:"+t.data.htmlscript:"";var p=t.data.toolbar!=o.toolbar?";toolbar:"+t.data.toolbar:"";var d=t.data.firstline!=o.firstline?";first-line:"+t.data.firstline:"";var hls=t.data.highlight.indexOf(",")!=-1?"[":"",hle=t.data.highlight.indexOf(",")!=-1?"]":"";var v=t.data.highlight.replace(/ /g,"").replace(/\[/g,"").replace(/\]/g,"")!=o.highlight?";highlight:"+hls+t.data.highlight.replace(/ /g,"").replace(/\[/g,"").replace(/\]/g,"").replace(/,$/g,"")+hle:"";var m=t.data.tabsize!=o.tabsize?";tab-size:"+t.data.tabsize:"";s=e.dom.create("pre",{"class":"brush:"+r+i+f+c+h+p+d+v+m,contenteditable:"false"},n);if(a)e.dom.replace(s,l);else e.insertContent(e.dom.getOuterHTML(s)+"<br>")}var t,n=e.dom,r=e.selection,i={},s;var o={},u="html",a=false,f,l=r.getNode(),c;o.autolinks=true;o.collapse=false;o.firstline="1";o.gutter=true;o.highlight="";o.htmlscript=false;o.tabsize="4";o.toolbar=true;i.language="";i.autolinks=o.autolinks;i.collapse=o.collapse;i.firstline=o.firstline;i.gutter=o.gutter;i.highlight=o.highlight;i.htmlscript=o.htmlscript;i.tabsize=o.tabsize;i.toolbar=o.toolbar;var h=[{text:"Language",value:""},{text:"ActionScript3",value:"as3"},{text:"Bash/shell",value:"bash"},{text:"ColdFusion",value:"cf"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"},{text:"CSS",value:"css"},{text:"Delphi",value:"delphi"},{text:"Diff",value:"diff"},{text:"Erlang",value:"erl"},{text:"Groovy",value:"groovy"},{text:"HTML",value:"html"},{text:"Java",value:"java"},{text:"JavaFX",value:"jfx"},{text:"JavaScript",value:"js"},{text:"Perl",value:"perl"},{text:"PHP",value:"php"},{text:"PowerShell",value:"ps"},{text:"Python",value:"py"},{text:"Ruby",value:"ruby"},{text:"Scala",value:"scala"},{text:"SQL",value:"sql"},{text:"Text",value:"plain"},{text:"Visual Basic",value:"vb"},{text:"XML",value:"xml"}];if(l.nodeName.toLowerCase()=="pre"&&l.className.indexOf("brush:")!=-1){a=true;f=$(l).html();f=f.replace(/\&lt\;/gi,"<").replace(/\&gt\;/gi,">");c=l.className;c=c.replace(/ /g,"");p(c)}else{f=r.getContent({format:"text"});i.autolinks=false;i.toolbar=false}for(var d=0;d<h.length;d++){if(h[d].value==i.language){h[d].selected=true}}i.code=f;if(i.code=="&nbsp;")i.code="";t=e.windowManager.open({title:"SH4TinyMCE - Code Editor",data:i,minWidth:450,body:[{name:"language",type:"listbox",values:h},{name:"code",type:"textbox",minHeight:200,multiline:true},{type:"container",layout:"flex",direction:"row",align:"center",spacing:7,items:[{name:"collapse",type:"checkbox",text:"Collapse",checked:i.collapse},{name:"autolinks",type:"checkbox",text:"Autolinks",checked:i.autolinks},{name:"gutter",type:"checkbox",text:"Gutter",checked:i.gutter},{name:"htmlscript",type:"checkbox",text:"Html script",checked:i.htmlscript},{name:"toolbar",type:"checkbox",text:"Toolbar",checked:i.toolbar}]},{type:"form",padding:0,labelGap:5,spacing:5,direction:"row",items:[{name:"firstline",type:"textbox",label:"First Line",size:3,value:i.firstline},{name:"highlight",type:"textbox",label:"Highlight",size:10,value:i.highlight},{name:"tabsize",type:"textbox",label:"Tab size",size:3,value:i.tabsize}]}],onsubmit:v})}tinymce.DOM.loadCSS(url+'/style/style.css');e.addButton("sh4tinymce",{icon:"sh4tinymce",tooltip:"Insert/Edit Code",onclick:t});e.addMenuItem("sh4tinymce",{text:"SH4TinyMCE",icon:"sh4tinymce",context:"insert",onclick:t})})

View File

@@ -0,0 +1,14 @@
@font-face {
font-family: 'sh4tinymce';
src:url('../fonts/sh4tinymce.eot');
src:url('../fonts/sh4tinymce.eot?#iefix') format('embedded-opentype'),
url('../fonts/sh4tinymce.woff') format('woff'),
url('../fonts/sh4tinymce.ttf') format('truetype'),
url('../fonts/sh4tinymce.svg#sh4tinymce') format('svg');
font-weight: normal;
font-style: normal;
}
.mce-i-sh4tinymce:before {
font-family: 'sh4tinymce';
content: "\f121";
}