Initial commit

This commit is contained in:
ayakael 2025-03-31 12:02:18 -04:00
commit 57a2089dd9
No known key found for this signature in database
GPG key ID: 70904985A46AF9AF
1541 changed files with 595392 additions and 0 deletions

View file

@ -0,0 +1,516 @@
/**
* TinyMCE 3.x language strings
*
* Loaded only when external plugins are added to TinyMCE.
*/
( function() {
var main = {}, lang = 'en';
if ( typeof tinyMCEPreInit !== 'undefined' && tinyMCEPreInit.ref.language !== 'en' ) {
lang = tinyMCEPreInit.ref.language;
}
main[lang] = {
common: {
edit_confirm: "Do you want to use the WYSIWYG mode for this textarea?",
apply: "Apply",
insert: "Insert",
update: "Update",
cancel: "Cancel",
close: "Close",
browse: "Browse",
class_name: "Class",
not_set: "-- Not set --",
clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
clipboard_no_support: "Currently not supported by your browser, use keyboard shortcuts instead.",
popup_blocked: "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
invalid_data: "Error: Invalid values entered, these are marked in red.",
invalid_data_number: "{#field} must be a number",
invalid_data_min: "{#field} must be a number greater than {#min}",
invalid_data_size: "{#field} must be a number or percentage",
more_colors: "More colors"
},
colors: {
"000000": "Black",
"993300": "Burnt orange",
"333300": "Dark olive",
"003300": "Dark green",
"003366": "Dark azure",
"000080": "Navy Blue",
"333399": "Indigo",
"333333": "Very dark gray",
"800000": "Maroon",
"FF6600": "Orange",
"808000": "Olive",
"008000": "Green",
"008080": "Teal",
"0000FF": "Blue",
"666699": "Grayish blue",
"808080": "Gray",
"FF0000": "Red",
"FF9900": "Amber",
"99CC00": "Yellow green",
"339966": "Sea green",
"33CCCC": "Turquoise",
"3366FF": "Royal blue",
"800080": "Purple",
"999999": "Medium gray",
"FF00FF": "Magenta",
"FFCC00": "Gold",
"FFFF00": "Yellow",
"00FF00": "Lime",
"00FFFF": "Aqua",
"00CCFF": "Sky blue",
"993366": "Brown",
"C0C0C0": "Silver",
"FF99CC": "Pink",
"FFCC99": "Peach",
"FFFF99": "Light yellow",
"CCFFCC": "Pale green",
"CCFFFF": "Pale cyan",
"99CCFF": "Light sky blue",
"CC99FF": "Plum",
"FFFFFF": "White"
},
contextmenu: {
align: "Alignment",
left: "Left",
center: "Center",
right: "Right",
full: "Full"
},
insertdatetime: {
date_fmt: "%Y-%m-%d",
time_fmt: "%H:%M:%S",
insertdate_desc: "Insert date",
inserttime_desc: "Insert time",
months_long: "January,February,March,April,May,June,July,August,September,October,November,December",
months_short: "Jan_January_abbreviation,Feb_February_abbreviation,Mar_March_abbreviation,Apr_April_abbreviation,May_May_abbreviation,Jun_June_abbreviation,Jul_July_abbreviation,Aug_August_abbreviation,Sep_September_abbreviation,Oct_October_abbreviation,Nov_November_abbreviation,Dec_December_abbreviation",
day_long: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
day_short: "Sun,Mon,Tue,Wed,Thu,Fri,Sat"
},
print: {
print_desc: "Print"
},
preview: {
preview_desc: "Preview"
},
directionality: {
ltr_desc: "Direction left to right",
rtl_desc: "Direction right to left"
},
layer: {
insertlayer_desc: "Insert new layer",
forward_desc: "Move forward",
backward_desc: "Move backward",
absolute_desc: "Toggle absolute positioning",
content: "New layer..."
},
save: {
save_desc: "Save",
cancel_desc: "Cancel all changes"
},
nonbreaking: {
nonbreaking_desc: "Insert non-breaking space character"
},
iespell: {
iespell_desc: "Run spell checking",
download: "ieSpell not detected. Do you want to install it now?"
},
advhr: {
advhr_desc: "Horizontal rule"
},
emotions: {
emotions_desc: "Emotions"
},
searchreplace: {
search_desc: "Find",
replace_desc: "Find/Replace"
},
advimage: {
image_desc: "Insert/edit image"
},
advlink: {
link_desc: "Insert/edit link"
},
xhtmlxtras: {
cite_desc: "Citation",
abbr_desc: "Abbreviation",
acronym_desc: "Acronym",
del_desc: "Deletion",
ins_desc: "Insertion",
attribs_desc: "Insert/Edit Attributes"
},
style: {
desc: "Edit CSS Style"
},
paste: {
paste_text_desc: "Paste as Plain Text",
paste_word_desc: "Paste from Word",
selectall_desc: "Select All",
plaintext_mode_sticky: "Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
plaintext_mode: "Paste is now in plain text mode. Click again to toggle back to regular paste mode."
},
paste_dlg: {
text_title: "Use CTRL + V on your keyboard to paste the text into the window.",
text_linebreaks: "Keep linebreaks",
word_title: "Use CTRL + V on your keyboard to paste the text into the window."
},
table: {
desc: "Inserts a new table",
row_before_desc: "Insert row before",
row_after_desc: "Insert row after",
delete_row_desc: "Delete row",
col_before_desc: "Insert column before",
col_after_desc: "Insert column after",
delete_col_desc: "Remove column",
split_cells_desc: "Split merged table cells",
merge_cells_desc: "Merge table cells",
row_desc: "Table row properties",
cell_desc: "Table cell properties",
props_desc: "Table properties",
paste_row_before_desc: "Paste table row before",
paste_row_after_desc: "Paste table row after",
cut_row_desc: "Cut table row",
copy_row_desc: "Copy table row",
del: "Delete table",
row: "Row",
col: "Column",
cell: "Cell"
},
autosave: {
unload_msg: "The changes you made will be lost if you navigate away from this page."
},
fullscreen: {
desc: "Toggle fullscreen mode (Alt + Shift + G)"
},
media: {
desc: "Insert / edit embedded media",
edit: "Edit embedded media"
},
fullpage: {
desc: "Document properties"
},
template: {
desc: "Insert predefined template content"
},
visualchars: {
desc: "Visual control characters on/off."
},
spellchecker: {
desc: "Toggle spellchecker (Alt + Shift + N)",
menu: "Spellchecker settings",
ignore_word: "Ignore word",
ignore_words: "Ignore all",
langs: "Languages",
wait: "Please wait...",
sug: "Suggestions",
no_sug: "No suggestions",
no_mpell: "No misspellings found.",
learn_word: "Learn word"
},
pagebreak: {
desc: "Insert Page Break"
},
advlist:{
types: "Types",
def: "Default",
lower_alpha: "Lower alpha",
lower_greek: "Lower greek",
lower_roman: "Lower roman",
upper_alpha: "Upper alpha",
upper_roman: "Upper roman",
circle: "Circle",
disc: "Disc",
square: "Square"
},
aria: {
rich_text_area: "Rich Text Area"
},
wordcount:{
words: "Words: "
}
};
tinyMCE.addI18n( main );
tinyMCE.addI18n( lang + ".advanced", {
style_select: "Styles",
font_size: "Font size",
fontdefault: "Font family",
block: "Format",
paragraph: "Paragraph",
div: "Div",
address: "Address",
pre: "Preformatted",
h1: "Heading 1",
h2: "Heading 2",
h3: "Heading 3",
h4: "Heading 4",
h5: "Heading 5",
h6: "Heading 6",
blockquote: "Blockquote",
code: "Code",
samp: "Code sample",
dt: "Definition term ",
dd: "Definition description",
bold_desc: "Bold (Ctrl + B)",
italic_desc: "Italic (Ctrl + I)",
underline_desc: "Underline",
striketrough_desc: "Strikethrough (Alt + Shift + D)",
justifyleft_desc: "Align Left (Alt + Shift + L)",
justifycenter_desc: "Align Center (Alt + Shift + C)",
justifyright_desc: "Align Right (Alt + Shift + R)",
justifyfull_desc: "Align Full (Alt + Shift + J)",
bullist_desc: "Unordered list (Alt + Shift + U)",
numlist_desc: "Ordered list (Alt + Shift + O)",
outdent_desc: "Outdent",
indent_desc: "Indent",
undo_desc: "Undo (Ctrl + Z)",
redo_desc: "Redo (Ctrl + Y)",
link_desc: "Insert/edit link (Alt + Shift + A)",
unlink_desc: "Unlink (Alt + Shift + S)",
image_desc: "Insert/edit image (Alt + Shift + M)",
cleanup_desc: "Cleanup messy code",
code_desc: "Edit HTML Source",
sub_desc: "Subscript",
sup_desc: "Superscript",
hr_desc: "Insert horizontal ruler",
removeformat_desc: "Remove formatting",
forecolor_desc: "Select text color",
backcolor_desc: "Select background color",
charmap_desc: "Insert custom character",
visualaid_desc: "Toggle guidelines/invisible elements",
anchor_desc: "Insert/edit anchor",
cut_desc: "Cut",
copy_desc: "Copy",
paste_desc: "Paste",
image_props_desc: "Image properties",
newdocument_desc: "New document",
help_desc: "Help",
blockquote_desc: "Blockquote (Alt + Shift + Q)",
clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
path: "Path",
newdocument: "Are you sure you want to clear all contents?",
toolbar_focus: "Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
more_colors: "More colors",
shortcuts_desc: "Accessibility Help",
help_shortcut: " Press ALT F10 for toolbar. Press ALT 0 for help.",
rich_text_area: "Rich Text Area",
toolbar: "Toolbar"
});
tinyMCE.addI18n( lang + ".advanced_dlg", {
about_title: "About TinyMCE",
about_general: "About",
about_help: "Help",
about_license: "License",
about_plugins: "Plugins",
about_plugin: "Plugin",
about_author: "Author",
about_version: "Version",
about_loaded: "Loaded plugins",
anchor_title: "Insert/edit anchor",
anchor_name: "Anchor name",
code_title: "HTML Source Editor",
code_wordwrap: "Word wrap",
colorpicker_title: "Select a color",
colorpicker_picker_tab: "Picker",
colorpicker_picker_title: "Color picker",
colorpicker_palette_tab: "Palette",
colorpicker_palette_title: "Palette colors",
colorpicker_named_tab: "Named",
colorpicker_named_title: "Named colors",
colorpicker_color: "Color: ",
colorpicker_name: "Name: ",
charmap_title: "Select custom character",
charmap_usage: "Use left and right arrows to navigate.",
image_title: "Insert/edit image",
image_src: "Image URL",
image_alt: "Image description",
image_list: "Image list",
image_border: "Border",
image_dimensions: "Dimensions",
image_vspace: "Vertical space",
image_hspace: "Horizontal space",
image_align: "Alignment",
image_align_baseline: "Baseline",
image_align_top: "Top",
image_align_middle: "Middle",
image_align_bottom: "Bottom",
image_align_texttop: "Text top",
image_align_textbottom: "Text bottom",
image_align_left: "Left",
image_align_right: "Right",
link_title: "Insert/edit link",
link_url: "Link URL",
link_target: "Target",
link_target_same: "Open link in the same window",
link_target_blank: "Open link in a new window",
link_titlefield: "Title",
link_is_email: "The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
link_is_external: "The URL you entered seems to be an external link, do you want to add the required http:// prefix?",
link_list: "Link list",
accessibility_help: "Accessibility Help",
accessibility_usage_title: "General Usage"
});
tinyMCE.addI18n( lang + ".media_dlg", {
title: "Insert / edit embedded media",
general: "General",
advanced: "Advanced",
file: "File/URL",
list: "List",
size: "Dimensions",
preview: "Preview",
constrain_proportions: "Constrain proportions",
type: "Type",
id: "Id",
name: "Name",
class_name: "Class",
vspace: "V-Space",
hspace: "H-Space",
play: "Auto play",
loop: "Loop",
menu: "Show menu",
quality: "Quality",
scale: "Scale",
align: "Align",
salign: "SAlign",
wmode: "WMode",
bgcolor: "Background",
base: "Base",
flashvars: "Flashvars",
liveconnect: "SWLiveConnect",
autohref: "AutoHREF",
cache: "Cache",
hidden: "Hidden",
controller: "Controller",
kioskmode: "Kiosk mode",
playeveryframe: "Play every frame",
targetcache: "Target cache",
correction: "No correction",
enablejavascript: "Enable JavaScript",
starttime: "Start time",
endtime: "End time",
href: "href",
qtsrcchokespeed: "Choke speed",
target: "Target",
volume: "Volume",
autostart: "Auto start",
enabled: "Enabled",
fullscreen: "Fullscreen",
invokeurls: "Invoke URLs",
mute: "Mute",
stretchtofit: "Stretch to fit",
windowlessvideo: "Windowless video",
balance: "Balance",
baseurl: "Base URL",
captioningid: "Captioning id",
currentmarker: "Current marker",
currentposition: "Current position",
defaultframe: "Default frame",
playcount: "Play count",
rate: "Rate",
uimode: "UI Mode",
flash_options: "Flash options",
qt_options: "QuickTime options",
wmp_options: "Windows media player options",
rmp_options: "Real media player options",
shockwave_options: "Shockwave options",
autogotourl: "Auto goto URL",
center: "Center",
imagestatus: "Image status",
maintainaspect: "Maintain aspect",
nojava: "No java",
prefetch: "Prefetch",
shuffle: "Shuffle",
console: "Console",
numloop: "Num loops",
controls: "Controls",
scriptcallbacks: "Script callbacks",
swstretchstyle: "Stretch style",
swstretchhalign: "Stretch H-Align",
swstretchvalign: "Stretch V-Align",
sound: "Sound",
progress: "Progress",
qtsrc: "QT Src",
qt_stream_warn: "Streamed rtsp resources should be added to the QT Src field under the advanced tab.",
align_top: "Top",
align_right: "Right",
align_bottom: "Bottom",
align_left: "Left",
align_center: "Center",
align_top_left: "Top left",
align_top_right: "Top right",
align_bottom_left: "Bottom left",
align_bottom_right: "Bottom right",
flv_options: "Flash video options",
flv_scalemode: "Scale mode",
flv_buffer: "Buffer",
flv_startimage: "Start image",
flv_starttime: "Start time",
flv_defaultvolume: "Default volume",
flv_hiddengui: "Hidden GUI",
flv_autostart: "Auto start",
flv_loop: "Loop",
flv_showscalemodes: "Show scale modes",
flv_smoothvideo: "Smooth video",
flv_jscallback: "JS Callback",
html5_video_options: "HTML5 Video Options",
altsource1: "Alternative source 1",
altsource2: "Alternative source 2",
preload: "Preload",
poster: "Poster",
source: "Source"
});
tinyMCE.addI18n( lang + ".wordpress", {
wp_adv_desc: "Show/Hide Kitchen Sink (Alt + Shift + Z)",
wp_more_desc: "Insert More Tag (Alt + Shift + T)",
wp_page_desc: "Insert Page break (Alt + Shift + P)",
wp_help_desc: "Help (Alt + Shift + H)",
wp_more_alt: "More...",
wp_page_alt: "Next page...",
add_media: "Add Media",
add_image: "Add an Image",
add_video: "Add Video",
add_audio: "Add Audio",
editgallery: "Edit Gallery",
delgallery: "Delete Gallery",
wp_fullscreen_desc: "Distraction-free writing mode (Alt + Shift + W)"
});
tinyMCE.addI18n( lang + ".wpeditimage", {
edit_img: "Edit Image",
del_img: "Delete Image",
adv_settings: "Advanced Settings",
none: "None",
size: "Size",
thumbnail: "Thumbnail",
medium: "Medium",
full_size: "Full Size",
current_link: "Current Link",
link_to_img: "Link to Image",
link_help: "Enter a link URL or click above for presets.",
adv_img_settings: "Advanced Image Settings",
source: "Source",
width: "Width",
height: "Height",
orig_size: "Original Size",
css: "CSS Class",
adv_link_settings: "Advanced Link Settings",
link_rel: "Link Rel",
s60: "60%",
s70: "70%",
s80: "80%",
s90: "90%",
s100: "100%",
s110: "110%",
s120: "120%",
s130: "130%",
img_title: "Title",
caption: "Caption",
alt: "Alternative Text"
});
}());

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,126 @@
(function () {
var colorpicker = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Color');
var showPreview = function (win, hexColor) {
win.find('#preview')[0].getEl().style.background = hexColor;
};
var setColor = function (win, value) {
var color = global$1(value), rgb = color.toRgb();
win.fromJSON({
r: rgb.r,
g: rgb.g,
b: rgb.b,
hex: color.toHex().substr(1)
});
showPreview(win, color.toHex());
};
var open = function (editor, callback, value) {
var win = editor.windowManager.open({
title: 'Color',
items: {
type: 'container',
layout: 'flex',
direction: 'row',
align: 'stretch',
padding: 5,
spacing: 10,
items: [
{
type: 'colorpicker',
value: value,
onchange: function () {
var rgb = this.rgb();
if (win) {
win.find('#r').value(rgb.r);
win.find('#g').value(rgb.g);
win.find('#b').value(rgb.b);
win.find('#hex').value(this.value().substr(1));
showPreview(win, this.value());
}
}
},
{
type: 'form',
padding: 0,
labelGap: 5,
defaults: {
type: 'textbox',
size: 7,
value: '0',
flex: 1,
spellcheck: false,
onchange: function () {
var colorPickerCtrl = win.find('colorpicker')[0];
var name, value;
name = this.name();
value = this.value();
if (name === 'hex') {
value = '#' + value;
setColor(win, value);
colorPickerCtrl.value(value);
return;
}
value = {
r: win.find('#r').value(),
g: win.find('#g').value(),
b: win.find('#b').value()
};
colorPickerCtrl.value(value);
setColor(win, value);
}
},
items: [
{
name: 'r',
label: 'R',
autofocus: 1
},
{
name: 'g',
label: 'G'
},
{
name: 'b',
label: 'B'
},
{
name: 'hex',
label: '#',
value: '000000'
},
{
name: 'preview',
type: 'container',
border: 1
}
]
}
]
},
onSubmit: function () {
callback('#' + win.toJSON().hex);
}
});
setColor(win, value);
};
var Dialog = { open: open };
global.add('colorpicker', function (editor) {
if (!editor.settings.color_picker_callback) {
editor.settings.color_picker_callback = function (callback, value) {
Dialog.open(editor, callback, value);
};
}
});
function Plugin () {
}
return Plugin;
}());
})();

View file

@ -0,0 +1 @@
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Color"),a=function(e,n){e.find("#preview")[0].getEl().style.background=n},o=function(e,n){var i=l(n),t=i.toRgb();e.fromJSON({r:t.r,g:t.g,b:t.b,hex:i.toHex().substr(1)}),a(e,i.toHex())},t=function(e,n,i){var t=e.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:i,onchange:function(){var e=this.rgb();t&&(t.find("#r").value(e.r),t.find("#g").value(e.g),t.find("#b").value(e.b),t.find("#hex").value(this.value().substr(1)),a(t,this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var e,n,i=t.find("colorpicker")[0];if(e=this.name(),n=this.value(),"hex"===e)return o(t,n="#"+n),void i.value(n);n={r:t.find("#r").value(),g:t.find("#g").value(),b:t.find("#b").value()},i.value(n),o(t,n)}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){n("#"+t.toJSON().hex)}});o(t,i)};e.add("colorpicker",function(i){i.settings.color_picker_callback||(i.settings.color_picker_callback=function(e,n){t(i,e,n)})})}();

View file

@ -0,0 +1,215 @@
/*
* Edited for compatibility with old TinyMCE 3.x plugins in WordPress.
* More info: https://core.trac.wordpress.org/ticket/31596#comment:10
*/
/* Generic */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size:13px;
background:#fcfcfc;
padding:0;
margin:8px 8px 0 8px;
}
textarea {resize:none;outline:none;}
a:link, a:hover {
color: #2B6FB6;
}
a:visited {
color: #3C2BB6;
}
.nowrap {white-space: nowrap}
/* Forms */
form {margin: 0;}
fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
legend {color:#2B6FB6; font-weight:bold;}
label.msg {display:none;}
label.invalid {color:#EE0000; display:inline;}
input.invalid {border:1px solid #EE0000;}
input {background:#FFF; border:1px solid #dfdfdf;}
input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
input, select, textarea {border:1px solid #dfdfdf;}
input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
.input_noborder {border:0;}
/* Buttons */
#insert,
#cancel,
#apply,
.mceActionPanel .button,
input.mceButton,
.updateButton {
display: inline-block;
text-decoration: none;
border: 1px solid #adadad;
margin: 0;
padding: 0 10px 1px;
font-size: 13px;
height: 24px;
line-height: 22px;
color: #333;
cursor: pointer;
-webkit-border-radius: 3px;
-webkit-appearance: none;
border-radius: 3px;
white-space: nowrap;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fafafa;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e9e9e9));
background-image: -webkit-linear-gradient(top, #fafafa, #e9e9e9);
background-image: -moz-linear-gradient(top, #fafafa, #e9e9e9);
background-image: -o-linear-gradient(top, #fafafa, #e9e9e9);
background-image: linear-gradient(to bottom, #fafafa, #e9e9e9);
text-shadow: 0 1px 0 #fff;
-webkit-box-shadow: inset 0 1px 0 #fff;
-moz-box-shadow: inset 0 1px 0 #fff;
box-shadow: inset 0 1px 0 #fff;
}
#insert {
background: #2ea2cc;
background: -webkit-gradient(linear, left top, left bottom, from(#2ea2cc), to(#1e8cbe));
background: -webkit-linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
background: linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ea2cc', endColorstr='#1e8cbe',GradientType=0 );
border-color: #0074a2;
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
color: #fff;
text-decoration: none;
text-shadow: 0 1px 0 rgba(0,86,132,0.7);
}
#cancel:hover,
input.mceButton:hover,
.updateButton:hover,
#cancel:focus,
input.mceButton:focus,
.updateButton:focus {
background: #f3f3f3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
background-image: -o-linear-gradient(top, #fff, #f3f3f3);
background-image: linear-gradient(to bottom, #fff, #f3f3f3);
border-color: #999;
color: #222;
}
#insert:hover,
#insert:focus {
background: #1e8cbe;
background: -webkit-gradient(linear, left top, left bottom, from(#1e8cbe), to(#0074a2));
background: -webkit-linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
background: linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e8cbe', endColorstr='#0074a2',GradientType=0 );
border-color: #0074a2;
-webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
color: #fff;
}
.mceActionPanel #insert {
float: right;
}
/* Browse */
a.pickcolor, a.browse {text-decoration:none}
a.browse span {display:block; width:20px; height:18px; border:1px solid #FFF; margin-left:1px;}
.mceOldBoxModel a.browse span {width:22px; height:20px;}
a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30);}
a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
a.pickcolor span {display:block; width:20px; height:16px; margin-left:2px;}
.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
a.pickcolor:hover span {background-color:#B2BBD0;}
div.iframecontainer {background: #fff;}
/* Charmap */
table.charmap {border:1px solid #AAA; text-align:center}
td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
#charmap a {display:block; color:#000; text-decoration:none; border:0}
#charmap a:hover {background:#CCC;color:#2B6FB6}
#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
#charmap #charmapView {background-color:#fff;}
/* Source */
.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
.mceActionPanel {margin-top:5px;}
/* Tabs classes */
.tabs {width:100%; height:19px; line-height:normal; border-bottom: 1px solid #aaa;}
.tabs ul {margin:0; padding:0; list-style:none;}
.tabs li {float:left; border: 1px solid #aaa; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
.tabs li.current {border-bottom: 1px solid #fff; margin-right:2px;}
.tabs span {float:left; display:block; padding:0px 10px 0 0;}
.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
.wp-core-ui #tabs {
padding-bottom: 5px;
background-color: transparent;
}
.wp-core-ui #tabs a {
padding: 6px 10px;
margin: 0 2px;
}
/* Panels */
.panel_wrapper div.panel {display:none;}
.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
/* Columns */
.column {float:left;}
.properties {width:100%;}
.properties .column1 {}
.properties .column2 {text-align:left;}
/* Titles */
h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
h3 {font-size:14px;}
.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
/* Dialog specific */
#link .panel_wrapper, #link div.current {height:125px;}
#image .panel_wrapper, #image div.current {height:200px;}
#plugintable thead {font-weight:bold; background:#DDD;}
#plugintable, #about #plugintable td {border:1px solid #919B9C;}
#plugintable {width:96%; margin-top:10px;}
#pluginscontainer {height:290px; overflow:auto;}
#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
#colorpicker #preview_wrapper {text-align:center; padding-top:4px; white-space: nowrap; float: right;}
#colorpicker #insert, #colorpicker #cancel {width: 90px}
#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
#colorpicker #light div {overflow:hidden;}
#colorpicker .panel_wrapper div.current {height:175px;}
#colorpicker #namedcolors {width:150px;}
#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
#colorpicker #colornamecontainer {margin-top:5px;}
#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
/* Localization */
body[dir="rtl"],
body[dir="rtl"] fieldset,
body[dir="rtl"] input, body[dir="rtl"] select, body[dir="rtl"] textarea,
body[dir="rtl"] #charmap #codeN,
body[dir="rtl"] .tabs a {
font-family: Tahoma, sans-serif;
}

View file

@ -0,0 +1,322 @@
/**
* plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/*global tinymce:true, console:true */
/*eslint no-console:0, new-cap:0 */
/**
* This plugin adds missing events form the 4.x API back. Not every event is
* properly supported but most things should work.
*
* Unsupported things:
* - No editor.onEvent
* - Can't cancel execCommands with beforeExecCommand
*/
(function (tinymce) {
var reported;
function noop() {
}
function log(apiCall) {
if (!reported && window && window.console) {
reported = true;
console.log("Deprecated TinyMCE API call: " + apiCall);
}
}
function Dispatcher(target, newEventName, argsMap, defaultScope) {
target = target || this;
var cbs = [];
if (!newEventName) {
this.add = this.addToTop = this.remove = this.dispatch = noop;
return;
}
this.add = function (callback, scope, prepend) {
log('<target>.on' + newEventName + ".add(..)");
// Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2)
function patchedEventCallback(e) {
var callbackArgs = [];
if (typeof argsMap == "string") {
argsMap = argsMap.split(" ");
}
if (argsMap && typeof argsMap !== "function") {
for (var i = 0; i < argsMap.length; i++) {
callbackArgs.push(e[argsMap[i]]);
}
}
if (typeof argsMap == "function") {
callbackArgs = argsMap(newEventName, e, target);
if (!callbackArgs) {
return;
}
}
if (!argsMap) {
callbackArgs = [e];
}
callbackArgs.unshift(defaultScope || target);
if (callback.apply(scope || defaultScope || target, callbackArgs) === false) {
e.stopImmediatePropagation();
}
}
target.on(newEventName, patchedEventCallback, prepend);
var handlers = {
original: callback,
patched: patchedEventCallback
};
cbs.push(handlers);
return patchedEventCallback;
};
this.addToTop = function (callback, scope) {
this.add(callback, scope, true);
};
this.remove = function (callback) {
cbs.forEach(function (item, i) {
if (item.original === callback) {
cbs.splice(i, 1);
return target.off(newEventName, item.patched);
}
});
return target.off(newEventName, callback);
};
this.dispatch = function () {
target.fire(newEventName);
return true;
};
}
tinymce.util.Dispatcher = Dispatcher;
tinymce.onBeforeUnload = new Dispatcher(tinymce, "BeforeUnload");
tinymce.onAddEditor = new Dispatcher(tinymce, "AddEditor", "editor");
tinymce.onRemoveEditor = new Dispatcher(tinymce, "RemoveEditor", "editor");
tinymce.util.Cookie = {
get: noop, getHash: noop, remove: noop, set: noop, setHash: noop
};
function patchEditor(editor) {
function translate(str) {
var prefix = editor.settings.language || "en";
var prefixedStr = [prefix, str].join('.');
var translatedStr = tinymce.i18n.translate(prefixedStr);
return prefixedStr !== translatedStr ? translatedStr : tinymce.i18n.translate(str);
}
function patchEditorEvents(oldEventNames, argsMap) {
tinymce.each(oldEventNames.split(" "), function (oldName) {
editor["on" + oldName] = new Dispatcher(editor, oldName, argsMap);
});
}
function convertUndoEventArgs(type, event, target) {
return [
event.level,
target
];
}
function filterSelectionEvents(needsSelection) {
return function (type, e) {
if ((!e.selection && !needsSelection) || e.selection == needsSelection) {
return [e];
}
};
}
if (editor.controlManager) {
return;
}
function cmNoop() {
var obj = {}, methods = 'add addMenu addSeparator collapse createMenu destroy displayColor expand focus ' +
'getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark ' +
'postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex ' +
'setActive setAriaProperty setColor setDisabled setSelected setState showMenu update';
log('editor.controlManager.*');
function _noop() {
return cmNoop();
}
tinymce.each(methods.split(' '), function (method) {
obj[method] = _noop;
});
return obj;
}
editor.controlManager = {
buttons: {},
setDisabled: function (name, state) {
log("controlManager.setDisabled(..)");
if (this.buttons[name]) {
this.buttons[name].disabled(state);
}
},
setActive: function (name, state) {
log("controlManager.setActive(..)");
if (this.buttons[name]) {
this.buttons[name].active(state);
}
},
onAdd: new Dispatcher(),
onPostRender: new Dispatcher(),
add: function (obj) {
return obj;
},
createButton: cmNoop,
createColorSplitButton: cmNoop,
createControl: cmNoop,
createDropMenu: cmNoop,
createListBox: cmNoop,
createMenuButton: cmNoop,
createSeparator: cmNoop,
createSplitButton: cmNoop,
createToolbar: cmNoop,
createToolbarGroup: cmNoop,
destroy: noop,
get: noop,
setControlType: cmNoop
};
patchEditorEvents("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate", "editor");
patchEditorEvents("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset");
patchEditorEvents("BeforeExecCommand ExecCommand", "command ui value args"); // args.terminate not supported
patchEditorEvents("PreProcess PostProcess LoadContent SaveContent Change");
patchEditorEvents("BeforeSetContent BeforeGetContent SetContent GetContent", filterSelectionEvents(false));
patchEditorEvents("SetProgressState", "state time");
patchEditorEvents("VisualAid", "element hasVisual");
patchEditorEvents("Undo Redo", convertUndoEventArgs);
patchEditorEvents("NodeChange", function (type, e) {
return [
editor.controlManager,
e.element,
editor.selection.isCollapsed(),
e
];
});
var originalAddButton = editor.addButton;
editor.addButton = function (name, settings) {
var originalOnPostRender;
function patchedPostRender() {
editor.controlManager.buttons[name] = this;
if (originalOnPostRender) {
return originalOnPostRender.apply(this, arguments);
}
}
for (var key in settings) {
if (key.toLowerCase() === "onpostrender") {
originalOnPostRender = settings[key];
settings.onPostRender = patchedPostRender;
}
}
if (!originalOnPostRender) {
settings.onPostRender = patchedPostRender;
}
if (settings.title) {
settings.title = translate(settings.title);
}
return originalAddButton.call(this, name, settings);
};
editor.on('init', function () {
var undoManager = editor.undoManager, selection = editor.selection;
undoManager.onUndo = new Dispatcher(editor, "Undo", convertUndoEventArgs, null, undoManager);
undoManager.onRedo = new Dispatcher(editor, "Redo", convertUndoEventArgs, null, undoManager);
undoManager.onBeforeAdd = new Dispatcher(editor, "BeforeAddUndo", null, undoManager);
undoManager.onAdd = new Dispatcher(editor, "AddUndo", null, undoManager);
selection.onBeforeGetContent = new Dispatcher(editor, "BeforeGetContent", filterSelectionEvents(true), selection);
selection.onGetContent = new Dispatcher(editor, "GetContent", filterSelectionEvents(true), selection);
selection.onBeforeSetContent = new Dispatcher(editor, "BeforeSetContent", filterSelectionEvents(true), selection);
selection.onSetContent = new Dispatcher(editor, "SetContent", filterSelectionEvents(true), selection);
});
editor.on('BeforeRenderUI', function () {
var windowManager = editor.windowManager;
windowManager.onOpen = new Dispatcher();
windowManager.onClose = new Dispatcher();
windowManager.createInstance = function (className, a, b, c, d, e) {
log("windowManager.createInstance(..)");
var constr = tinymce.resolve(className);
return new constr(a, b, c, d, e);
};
});
}
tinymce.on('SetupEditor', function (e) {
patchEditor(e.editor);
});
tinymce.PluginManager.add("compat3x", patchEditor);
tinymce.addI18n = function (prefix, o) {
var I18n = tinymce.util.I18n, each = tinymce.each;
if (typeof prefix == "string" && prefix.indexOf('.') === -1) {
I18n.add(prefix, o);
return;
}
if (!tinymce.is(prefix, 'string')) {
each(prefix, function (o, lc) {
each(o, function (o, g) {
each(o, function (o, k) {
if (g === 'common') {
I18n.data[lc + '.' + k] = o;
} else {
I18n.data[lc + '.' + g + '.' + k] = o;
}
});
});
});
} else {
each(o, function (o, k) {
I18n.data[prefix + '.' + k] = o;
});
}
};
})(tinymce);

View file

@ -0,0 +1 @@
!function(u){var t;function l(){}function f(e){!t&&window&&window.console&&(t=!0,console.log("Deprecated TinyMCE API call: "+e))}function i(i,a,d,s){i=i||this;var c=[];a?(this.add=function(o,r,e){function t(e){var t=[];if("string"==typeof d&&(d=d.split(" ")),d&&"function"!=typeof d)for(var n=0;n<d.length;n++)t.push(e[d[n]]);("function"!=typeof d||(t=d(a,e,i)))&&(d||(t=[e]),t.unshift(s||i),!1===o.apply(r||s||i,t)&&e.stopImmediatePropagation())}f("<target>.on"+a+".add(..)"),i.on(a,t,e);var n={original:o,patched:t};return c.push(n),t},this.addToTop=function(e,t){this.add(e,t,!0)},this.remove=function(n){return c.forEach(function(e,t){if(e.original===n)return c.splice(t,1),i.off(a,e.patched)}),i.off(a,n)},this.dispatch=function(){return i.fire(a),!0}):this.add=this.addToTop=this.remove=this.dispatch=l}function n(s){function e(e,t){u.each(e.split(" "),function(e){s["on"+e]=new i(s,e,t)})}function n(e,t,n){return[t.level,n]}function o(n){return function(e,t){if(!t.selection&&!n||t.selection==n)return[t]}}if(!s.controlManager){s.controlManager={buttons:{},setDisabled:function(e,t){f("controlManager.setDisabled(..)"),this.buttons[e]&&this.buttons[e].disabled(t)},setActive:function(e,t){f("controlManager.setActive(..)"),this.buttons[e]&&this.buttons[e].active(t)},onAdd:new i,onPostRender:new i,add:function(e){return e},createButton:r,createColorSplitButton:r,createControl:r,createDropMenu:r,createListBox:r,createMenuButton:r,createSeparator:r,createSplitButton:r,createToolbar:r,createToolbarGroup:r,destroy:l,get:l,setControlType:r},e("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),e("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),e("BeforeExecCommand ExecCommand","command ui value args"),e("PreProcess PostProcess LoadContent SaveContent Change"),e("BeforeSetContent BeforeGetContent SetContent GetContent",o(!1)),e("SetProgressState","state time"),e("VisualAid","element hasVisual"),e("Undo Redo",n),e("NodeChange",function(e,t){return[s.controlManager,t.element,s.selection.isCollapsed(),t]});var c=s.addButton;s.addButton=function(e,t){var n,o,r,i;function a(){if(s.controlManager.buttons[e]=this,n)return n.apply(this,arguments)}for(var d in t)"onpostrender"===d.toLowerCase()&&(n=t[d],t.onPostRender=a);return n||(t.onPostRender=a),t.title&&(t.title=(o=t.title,r=[s.settings.language||"en",o].join("."),i=u.i18n.translate(r),r!==i?i:u.i18n.translate(o))),c.call(this,e,t)},s.on("init",function(){var e=s.undoManager,t=s.selection;e.onUndo=new i(s,"Undo",n,null,e),e.onRedo=new i(s,"Redo",n,null,e),e.onBeforeAdd=new i(s,"BeforeAddUndo",null,e),e.onAdd=new i(s,"AddUndo",null,e),t.onBeforeGetContent=new i(s,"BeforeGetContent",o(!0),t),t.onGetContent=new i(s,"GetContent",o(!0),t),t.onBeforeSetContent=new i(s,"BeforeSetContent",o(!0),t),t.onSetContent=new i(s,"SetContent",o(!0),t)}),s.on("BeforeRenderUI",function(){var e=s.windowManager;e.onOpen=new i,e.onClose=new i,e.createInstance=function(e,t,n,o,r,i){return f("windowManager.createInstance(..)"),new(u.resolve(e))(t,n,o,r,i)}})}function r(){var t={};function n(){return r()}return f("editor.controlManager.*"),u.each("add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update".split(" "),function(e){t[e]=n}),t}}u.util.Dispatcher=i,u.onBeforeUnload=new i(u,"BeforeUnload"),u.onAddEditor=new i(u,"AddEditor","editor"),u.onRemoveEditor=new i(u,"RemoveEditor","editor"),u.util.Cookie={get:l,getHash:l,remove:l,set:l,setHash:l},u.on("SetupEditor",function(e){n(e.editor)}),u.PluginManager.add("compat3x",n),u.addI18n=function(n,e){var r=u.util.I18n,t=u.each;"string"!=typeof n||-1!==n.indexOf(".")?u.is(n,"string")?t(e,function(e,t){r.data[n+"."+t]=e}):t(n,function(e,o){t(e,function(e,n){t(e,function(e,t){"common"===n?r.data[o+"."+t]=e:r.data[o+"."+n+"."+t]=e})})}):r.add(n,e)}}(tinymce);

View file

@ -0,0 +1,66 @@
(function () {
var directionality = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var setDir = function (editor, dir) {
var dom = editor.dom;
var curDir;
var blocks = editor.selection.getSelectedBlocks();
if (blocks.length) {
curDir = dom.getAttrib(blocks[0], 'dir');
global$1.each(blocks, function (block) {
if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) {
dom.setAttrib(block, 'dir', curDir !== dir ? dir : null);
}
});
editor.nodeChanged();
}
};
var Direction = { setDir: setDir };
var register = function (editor) {
editor.addCommand('mceDirectionLTR', function () {
Direction.setDir(editor, 'ltr');
});
editor.addCommand('mceDirectionRTL', function () {
Direction.setDir(editor, 'rtl');
});
};
var Commands = { register: register };
var generateSelector = function (dir) {
var selector = [];
global$1.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) {
selector.push(name + '[dir=' + dir + ']');
});
return selector.join(',');
};
var register$1 = function (editor) {
editor.addButton('ltr', {
title: 'Left to right',
cmd: 'mceDirectionLTR',
stateSelector: generateSelector('ltr')
});
editor.addButton('rtl', {
title: 'Right to left',
cmd: 'mceDirectionRTL',
stateSelector: generateSelector('rtl')
});
};
var Buttons = { register: register$1 };
global.add('directionality', function (editor) {
Commands.register(editor);
Buttons.register(editor);
});
function Plugin () {
}
return Plugin;
}());
})();

View file

@ -0,0 +1 @@
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(t,e){var i,n=t.dom,o=t.selection.getSelectedBlocks();o.length&&(i=n.getAttrib(o[0],"dir"),c.each(o,function(t){n.getParent(t.parentNode,'*[dir="'+e+'"]',n.getRoot())||n.setAttrib(t,"dir",i!==e?e:null)}),t.nodeChanged())},i=function(t){t.addCommand("mceDirectionLTR",function(){e(t,"ltr")}),t.addCommand("mceDirectionRTL",function(){e(t,"rtl")})},n=function(e){var i=[];return c.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(t){i.push(t+"[dir="+e+"]")}),i.join(",")},o=function(t){t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})};t.add("directionality",function(t){i(t),o(t)})}();

View file

@ -0,0 +1,177 @@
(function () {
var fullscreen = (function (domGlobals) {
'use strict';
var Cell = function (initial) {
var value = initial;
var get = function () {
return value;
};
var set = function (v) {
value = v;
};
var clone = function () {
return Cell(get());
};
return {
get: get,
set: set,
clone: clone
};
};
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var get = function (fullscreenState) {
return {
isFullscreen: function () {
return fullscreenState.get() !== null;
}
};
};
var Api = { get: get };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var fireFullscreenStateChanged = function (editor, state) {
editor.fire('FullscreenStateChanged', { state: state });
};
var Events = { fireFullscreenStateChanged: fireFullscreenStateChanged };
var DOM = global$1.DOM;
var getWindowSize = function () {
var w;
var h;
var win = domGlobals.window;
var doc = domGlobals.document;
var body = doc.body;
if (body.offsetWidth) {
w = body.offsetWidth;
h = body.offsetHeight;
}
if (win.innerWidth && win.innerHeight) {
w = win.innerWidth;
h = win.innerHeight;
}
return {
w: w,
h: h
};
};
var getScrollPos = function () {
var vp = DOM.getViewPort();
return {
x: vp.x,
y: vp.y
};
};
var setScrollPos = function (pos) {
domGlobals.window.scrollTo(pos.x, pos.y);
};
var toggleFullscreen = function (editor, fullscreenState) {
var body = domGlobals.document.body;
var documentElement = domGlobals.document.documentElement;
var editorContainerStyle;
var editorContainer, iframe, iframeStyle;
var fullscreenInfo = fullscreenState.get();
var resize = function () {
DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
};
var removeResize = function () {
DOM.unbind(domGlobals.window, 'resize', resize);
};
editorContainer = editor.getContainer();
editorContainerStyle = editorContainer.style;
iframe = editor.getContentAreaContainer().firstChild;
iframeStyle = iframe.style;
if (!fullscreenInfo) {
var newFullScreenInfo = {
scrollPos: getScrollPos(),
containerWidth: editorContainerStyle.width,
containerHeight: editorContainerStyle.height,
iframeWidth: iframeStyle.width,
iframeHeight: iframeStyle.height,
resizeHandler: resize,
removeHandler: removeResize
};
iframeStyle.width = iframeStyle.height = '100%';
editorContainerStyle.width = editorContainerStyle.height = '';
DOM.addClass(body, 'mce-fullscreen');
DOM.addClass(documentElement, 'mce-fullscreen');
DOM.addClass(editorContainer, 'mce-fullscreen');
DOM.bind(domGlobals.window, 'resize', resize);
editor.on('remove', removeResize);
resize();
fullscreenState.set(newFullScreenInfo);
Events.fireFullscreenStateChanged(editor, true);
} else {
iframeStyle.width = fullscreenInfo.iframeWidth;
iframeStyle.height = fullscreenInfo.iframeHeight;
if (fullscreenInfo.containerWidth) {
editorContainerStyle.width = fullscreenInfo.containerWidth;
}
if (fullscreenInfo.containerHeight) {
editorContainerStyle.height = fullscreenInfo.containerHeight;
}
DOM.removeClass(body, 'mce-fullscreen');
DOM.removeClass(documentElement, 'mce-fullscreen');
DOM.removeClass(editorContainer, 'mce-fullscreen');
setScrollPos(fullscreenInfo.scrollPos);
DOM.unbind(domGlobals.window, 'resize', fullscreenInfo.resizeHandler);
editor.off('remove', fullscreenInfo.removeHandler);
fullscreenState.set(null);
Events.fireFullscreenStateChanged(editor, false);
}
};
var Actions = { toggleFullscreen: toggleFullscreen };
var register = function (editor, fullscreenState) {
editor.addCommand('mceFullScreen', function () {
Actions.toggleFullscreen(editor, fullscreenState);
});
};
var Commands = { register: register };
var postRender = function (editor) {
return function (e) {
var ctrl = e.control;
editor.on('FullscreenStateChanged', function (e) {
ctrl.active(e.state);
});
};
};
var register$1 = function (editor) {
editor.addMenuItem('fullscreen', {
text: 'Fullscreen',
shortcut: 'Ctrl+Shift+F',
selectable: true,
cmd: 'mceFullScreen',
onPostRender: postRender(editor),
context: 'view'
});
editor.addButton('fullscreen', {
active: false,
tooltip: 'Fullscreen',
cmd: 'mceFullScreen',
onPostRender: postRender(editor)
});
};
var Buttons = { register: register$1 };
global.add('fullscreen', function (editor) {
var fullscreenState = Cell(null);
if (editor.settings.inline) {
return Api.get(fullscreenState);
}
Commands.register(editor, fullscreenState);
Buttons.register(editor);
editor.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen');
return Api.get(fullscreenState);
});
function Plugin () {
}
return Plugin;
}(window));
})();

View file

@ -0,0 +1 @@
!function(m){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e,n){e.fire("FullscreenStateChanged",{state:n})},w=n.DOM,r=function(e,n){var t,r,l,i,o,c,s=m.document.body,u=m.document.documentElement,d=n.get(),a=function(){var e,n,t,i;w.setStyle(l,"height",(t=m.window,i=m.document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-l.clientHeight))},h=function(){w.unbind(m.window,"resize",a)};if(t=(r=e.getContainer()).style,i=(l=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),w.removeClass(s,"mce-fullscreen"),w.removeClass(u,"mce-fullscreen"),w.removeClass(r,"mce-fullscreen"),o=d.scrollPos,m.window.scrollTo(o.x,o.y),w.unbind(m.window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),g(e,!1);else{var f={scrollPos:(c=w.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:h};i.width=i.height="100%",t.width=t.height="",w.addClass(s,"mce-fullscreen"),w.addClass(u,"mce-fullscreen"),w.addClass(r,"mce-fullscreen"),w.bind(m.window,"resize",a),e.on("remove",h),a(),n.set(f),g(e,!0)}},l=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},o=function(t){return function(e){var n=e.control;t.on("FullscreenStateChanged",function(e){n.active(e.state)})}},c=function(e){e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Shift+F",selectable:!0,cmd:"mceFullScreen",onPostRender:o(e),context:"view"}),e.addButton("fullscreen",{active:!1,tooltip:"Fullscreen",cmd:"mceFullScreen",onPostRender:o(e)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(l(e,n),c(e),e.addShortcut("Ctrl+Shift+F","","mceFullScreen")),t(n)})}(window);

View file

@ -0,0 +1,39 @@
(function () {
var hr = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var register = function (editor) {
editor.addCommand('InsertHorizontalRule', function () {
editor.execCommand('mceInsertContent', false, '<hr />');
});
};
var Commands = { register: register };
var register$1 = function (editor) {
editor.addButton('hr', {
icon: 'hr',
tooltip: 'Horizontal line',
cmd: 'InsertHorizontalRule'
});
editor.addMenuItem('hr', {
icon: 'hr',
text: 'Horizontal line',
cmd: 'InsertHorizontalRule',
context: 'insert'
});
};
var Buttons = { register: register$1 };
global.add('hr', function (editor) {
Commands.register(editor);
Buttons.register(editor);
});
function Plugin () {
}
return Plugin;
}());
})();

View file

@ -0,0 +1 @@
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},o=function(n){n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})};n.add("hr",function(n){t(n),o(n)})}();

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,713 @@
(function () {
var link = (function (domGlobals) {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
var assumeExternalTargets = function (editorSettings) {
return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
};
var hasContextToolbar = function (editorSettings) {
return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
};
var getLinkList = function (editorSettings) {
return editorSettings.link_list;
};
var hasDefaultLinkTarget = function (editorSettings) {
return typeof editorSettings.default_link_target === 'string';
};
var getDefaultLinkTarget = function (editorSettings) {
return editorSettings.default_link_target;
};
var getTargetList = function (editorSettings) {
return editorSettings.target_list;
};
var setTargetList = function (editor, list) {
editor.settings.target_list = list;
};
var shouldShowTargetList = function (editorSettings) {
return getTargetList(editorSettings) !== false;
};
var getRelList = function (editorSettings) {
return editorSettings.rel_list;
};
var hasRelList = function (editorSettings) {
return getRelList(editorSettings) !== undefined;
};
var getLinkClassList = function (editorSettings) {
return editorSettings.link_class_list;
};
var hasLinkClassList = function (editorSettings) {
return getLinkClassList(editorSettings) !== undefined;
};
var shouldShowLinkTitle = function (editorSettings) {
return editorSettings.link_title !== false;
};
var allowUnsafeLinkTarget = function (editorSettings) {
return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
};
var Settings = {
assumeExternalTargets: assumeExternalTargets,
hasContextToolbar: hasContextToolbar,
getLinkList: getLinkList,
hasDefaultLinkTarget: hasDefaultLinkTarget,
getDefaultLinkTarget: getDefaultLinkTarget,
getTargetList: getTargetList,
setTargetList: setTargetList,
shouldShowTargetList: shouldShowTargetList,
getRelList: getRelList,
hasRelList: hasRelList,
getLinkClassList: getLinkClassList,
hasLinkClassList: hasLinkClassList,
shouldShowLinkTitle: shouldShowLinkTitle,
allowUnsafeLinkTarget: allowUnsafeLinkTarget
};
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
var appendClickRemove = function (link, evt) {
domGlobals.document.body.appendChild(link);
link.dispatchEvent(evt);
domGlobals.document.body.removeChild(link);
};
var open = function (url) {
if (!global$3.ie || global$3.ie > 10) {
var link = domGlobals.document.createElement('a');
link.target = '_blank';
link.href = url;
link.rel = 'noreferrer noopener';
var evt = domGlobals.document.createEvent('MouseEvents');
evt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
appendClickRemove(link, evt);
} else {
var win = domGlobals.window.open('', '_blank');
if (win) {
win.opener = null;
var doc = win.document;
doc.open();
doc.write('<meta http-equiv="refresh" content="0; url=' + global$2.DOM.encode(url) + '">');
doc.close();
}
}
};
var OpenUrl = { open: open };
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var toggleTargetRules = function (rel, isUnsafe) {
var rules = ['noopener'];
var newRel = rel ? rel.split(/\s+/) : [];
var toString = function (rel) {
return global$4.trim(rel.sort().join(' '));
};
var addTargetRules = function (rel) {
rel = removeTargetRules(rel);
return rel.length ? rel.concat(rules) : rules;
};
var removeTargetRules = function (rel) {
return rel.filter(function (val) {
return global$4.inArray(rules, val) === -1;
});
};
newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
return newRel.length ? toString(newRel) : null;
};
var trimCaretContainers = function (text) {
return text.replace(/\uFEFF/g, '');
};
var getAnchorElement = function (editor, selectedElm) {
selectedElm = selectedElm || editor.selection.getNode();
if (isImageFigure(selectedElm)) {
return editor.dom.select('a[href]', selectedElm)[0];
} else {
return editor.dom.getParent(selectedElm, 'a[href]');
}
};
var getAnchorText = function (selection, anchorElm) {
var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
return trimCaretContainers(text);
};
var isLink = function (elm) {
return elm && elm.nodeName === 'A' && elm.href;
};
var hasLinks = function (elements) {
return global$4.grep(elements, isLink).length > 0;
};
var isOnlyTextSelected = function (html) {
if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
return false;
}
return true;
};
var isImageFigure = function (node) {
return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
};
var link = function (editor, attachState) {
return function (data) {
editor.undoManager.transact(function () {
var selectedElm = editor.selection.getNode();
var anchorElm = getAnchorElement(editor, selectedElm);
var linkAttrs = {
href: data.href,
target: data.target ? data.target : null,
rel: data.rel ? data.rel : null,
class: data.class ? data.class : null,
title: data.title ? data.title : null
};
if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
}
if (data.href === attachState.href) {
attachState.attach();
attachState = {};
}
if (anchorElm) {
editor.focus();
if (data.hasOwnProperty('text')) {
if ('innerText' in anchorElm) {
anchorElm.innerText = data.text;
} else {
anchorElm.textContent = data.text;
}
}
editor.dom.setAttribs(anchorElm, linkAttrs);
editor.selection.select(anchorElm);
editor.undoManager.add();
} else {
if (isImageFigure(selectedElm)) {
linkImageFigure(editor, selectedElm, linkAttrs);
} else if (data.hasOwnProperty('text')) {
editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
} else {
editor.execCommand('mceInsertLink', false, linkAttrs);
}
}
});
};
};
var unlink = function (editor) {
return function () {
editor.undoManager.transact(function () {
var node = editor.selection.getNode();
if (isImageFigure(node)) {
unlinkImageFigure(editor, node);
} else {
editor.execCommand('unlink');
}
});
};
};
var unlinkImageFigure = function (editor, fig) {
var a, img;
img = editor.dom.select('img', fig)[0];
if (img) {
a = editor.dom.getParents(img, 'a[href]', fig)[0];
if (a) {
a.parentNode.insertBefore(img, a);
editor.dom.remove(a);
}
}
};
var linkImageFigure = function (editor, fig, attrs) {
var a, img;
img = editor.dom.select('img', fig)[0];
if (img) {
a = editor.dom.create('a', attrs);
img.parentNode.insertBefore(a, img);
a.appendChild(img);
}
};
var Utils = {
link: link,
unlink: unlink,
isLink: isLink,
hasLinks: hasLinks,
isOnlyTextSelected: isOnlyTextSelected,
getAnchorElement: getAnchorElement,
getAnchorText: getAnchorText,
toggleTargetRules: toggleTargetRules
};
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');
var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');
var attachState = {};
var createLinkList = function (editor, callback) {
var linkList = Settings.getLinkList(editor.settings);
if (typeof linkList === 'string') {
global$6.send({
url: linkList,
success: function (text) {
callback(editor, JSON.parse(text));
}
});
} else if (typeof linkList === 'function') {
linkList(function (list) {
callback(editor, list);
});
} else {
callback(editor, linkList);
}
};
var buildListItems = function (inputList, itemCallback, startItems) {
var appendItems = function (values, output) {
output = output || [];
global$4.each(values, function (item) {
var menuItem = { text: item.text || item.title };
if (item.menu) {
menuItem.menu = appendItems(item.menu);
} else {
menuItem.value = item.value;
if (itemCallback) {
itemCallback(menuItem);
}
}
output.push(menuItem);
});
return output;
};
return appendItems(inputList, startItems || []);
};
var delayedConfirm = function (editor, message, callback) {
var rng = editor.selection.getRng();
global$5.setEditorTimeout(editor, function () {
editor.windowManager.confirm(message, function (state) {
editor.selection.setRng(rng);
callback(state);
});
});
};
var showDialog = function (editor, linkList) {
var data = {};
var selection = editor.selection;
var dom = editor.dom;
var anchorElm, initialText;
var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
var linkListChangeHandler = function (e) {
var textCtrl = win.find('#text');
if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
textCtrl.value(e.control.text());
}
win.find('#href').value(e.control.value());
};
var buildAnchorListControl = function (url) {
var anchorList = [];
global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
var id = anchor.name || anchor.id;
if (id) {
anchorList.push({
text: id,
value: '#' + id,
selected: url.indexOf('#' + id) !== -1
});
}
});
if (anchorList.length) {
anchorList.unshift({
text: 'None',
value: ''
});
return {
name: 'anchor',
type: 'listbox',
label: 'Anchors',
values: anchorList,
onselect: linkListChangeHandler
};
}
};
var updateText = function () {
if (!initialText && onlyText && !data.text) {
this.parent().parent().find('#text')[0].value(this.value());
}
};
var urlChange = function (e) {
var meta = e.meta || {};
if (linkListCtrl) {
linkListCtrl.value(editor.convertURL(this.value(), 'href'));
}
global$4.each(e.meta, function (value, key) {
var inp = win.find('#' + key);
if (key === 'text') {
if (initialText.length === 0) {
inp.value(value);
data.text = value;
}
} else {
inp.value(value);
}
});
if (meta.attach) {
attachState = {
href: this.value(),
attach: meta.attach
};
}
if (!meta.text) {
updateText.call(this);
}
};
var onBeforeCall = function (e) {
e.meta = win.toJSON();
};
onlyText = Utils.isOnlyTextSelected(selection.getContent());
anchorElm = Utils.getAnchorElement(editor);
data.text = initialText = Utils.getAnchorText(editor.selection, anchorElm);
data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
if (anchorElm) {
data.target = dom.getAttrib(anchorElm, 'target');
} else if (Settings.hasDefaultLinkTarget(editor.settings)) {
data.target = Settings.getDefaultLinkTarget(editor.settings);
}
if (value = dom.getAttrib(anchorElm, 'rel')) {
data.rel = value;
}
if (value = dom.getAttrib(anchorElm, 'class')) {
data.class = value;
}
if (value = dom.getAttrib(anchorElm, 'title')) {
data.title = value;
}
if (onlyText) {
textListCtrl = {
name: 'text',
type: 'textbox',
size: 40,
label: 'Text to display',
onchange: function () {
data.text = this.value();
}
};
}
if (linkList) {
linkListCtrl = {
type: 'listbox',
label: 'Link list',
values: buildListItems(linkList, function (item) {
item.value = editor.convertURL(item.value || item.url, 'href');
}, [{
text: 'None',
value: ''
}]),
onselect: linkListChangeHandler,
value: editor.convertURL(data.href, 'href'),
onPostRender: function () {
linkListCtrl = this;
}
};
}
if (Settings.shouldShowTargetList(editor.settings)) {
if (Settings.getTargetList(editor.settings) === undefined) {
Settings.setTargetList(editor, [
{
text: 'None',
value: ''
},
{
text: 'New window',
value: '_blank'
}
]);
}
targetListCtrl = {
name: 'target',
type: 'listbox',
label: 'Target',
values: buildListItems(Settings.getTargetList(editor.settings))
};
}
if (Settings.hasRelList(editor.settings)) {
relListCtrl = {
name: 'rel',
type: 'listbox',
label: 'Rel',
values: buildListItems(Settings.getRelList(editor.settings), function (item) {
if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
}
})
};
}
if (Settings.hasLinkClassList(editor.settings)) {
classListCtrl = {
name: 'class',
type: 'listbox',
label: 'Class',
values: buildListItems(Settings.getLinkClassList(editor.settings), function (item) {
if (item.value) {
item.textStyle = function () {
return editor.formatter.getCssText({
inline: 'a',
classes: [item.value]
});
};
}
})
};
}
if (Settings.shouldShowLinkTitle(editor.settings)) {
linkTitleCtrl = {
name: 'title',
type: 'textbox',
label: 'Title',
value: data.title
};
}
win = editor.windowManager.open({
title: 'Insert link',
data: data,
body: [
{
name: 'href',
type: 'filepicker',
filetype: 'file',
size: 40,
autofocus: true,
label: 'Url',
onchange: urlChange,
onkeyup: updateText,
onpaste: updateText,
onbeforecall: onBeforeCall
},
textListCtrl,
linkTitleCtrl,
buildAnchorListControl(data.href),
linkListCtrl,
relListCtrl,
targetListCtrl,
classListCtrl
],
onSubmit: function (e) {
var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
var insertLink = Utils.link(editor, attachState);
var removeLink = Utils.unlink(editor);
var resultData = global$4.extend({}, data, e.data);
var href = resultData.href;
if (!href) {
removeLink();
return;
}
if (!onlyText || resultData.text === initialText) {
delete resultData.text;
}
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
delayedConfirm(editor, 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', function (state) {
if (state) {
resultData.href = 'mailto:' + href;
}
insertLink(resultData);
});
return;
}
if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) {
delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) {
if (state) {
resultData.href = 'http://' + href;
}
insertLink(resultData);
});
return;
}
insertLink(resultData);
}
});
};
var open$1 = function (editor) {
createLinkList(editor, showDialog);
};
var Dialog = { open: open$1 };
var getLink = function (editor, elm) {
return editor.dom.getParent(elm, 'a[href]');
};
var getSelectedLink = function (editor) {
return getLink(editor, editor.selection.getStart());
};
var getHref = function (elm) {
var href = elm.getAttribute('data-mce-href');
return href ? href : elm.getAttribute('href');
};
var isContextMenuVisible = function (editor) {
var contextmenu = editor.plugins.contextmenu;
return contextmenu ? contextmenu.isContextMenuVisible() : false;
};
var hasOnlyAltModifier = function (e) {
return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
};
var gotoLink = function (editor, a) {
if (a) {
var href = getHref(a);
if (/^#/.test(href)) {
var targetEl = editor.$(href);
if (targetEl.length) {
editor.selection.scrollIntoView(targetEl[0], true);
}
} else {
OpenUrl.open(a.href);
}
}
};
var openDialog = function (editor) {
return function () {
Dialog.open(editor);
};
};
var gotoSelectedLink = function (editor) {
return function () {
gotoLink(editor, getSelectedLink(editor));
};
};
var leftClickedOnAHref = function (editor) {
return function (elm) {
var sel, rng, node;
if (Settings.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && Utils.isLink(elm)) {
sel = editor.selection;
rng = sel.getRng();
node = rng.startContainer;
if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
return true;
}
}
return false;
};
};
var setupGotoLinks = function (editor) {
editor.on('click', function (e) {
var link = getLink(editor, e.target);
if (link && global$1.metaKeyPressed(e)) {
e.preventDefault();
gotoLink(editor, link);
}
});
editor.on('keydown', function (e) {
var link = getSelectedLink(editor);
if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
e.preventDefault();
gotoLink(editor, link);
}
});
};
var toggleActiveState = function (editor) {
return function () {
var self = this;
editor.on('nodechange', function (e) {
self.active(!editor.readonly && !!Utils.getAnchorElement(editor, e.element));
});
};
};
var toggleViewLinkState = function (editor) {
return function () {
var self = this;
var toggleVisibility = function (e) {
if (Utils.hasLinks(e.parents)) {
self.show();
} else {
self.hide();
}
};
if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
self.hide();
}
editor.on('nodechange', toggleVisibility);
self.on('remove', function () {
editor.off('nodechange', toggleVisibility);
});
};
};
var Actions = {
openDialog: openDialog,
gotoSelectedLink: gotoSelectedLink,
leftClickedOnAHref: leftClickedOnAHref,
setupGotoLinks: setupGotoLinks,
toggleActiveState: toggleActiveState,
toggleViewLinkState: toggleViewLinkState
};
var register = function (editor) {
editor.addCommand('mceLink', Actions.openDialog(editor));
};
var Commands = { register: register };
var setup = function (editor) {
editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
};
var Keyboard = { setup: setup };
var setupButtons = function (editor) {
editor.addButton('link', {
active: false,
icon: 'link',
tooltip: 'Insert/edit link',
onclick: Actions.openDialog(editor),
onpostrender: Actions.toggleActiveState(editor)
});
editor.addButton('unlink', {
active: false,
icon: 'unlink',
tooltip: 'Remove link',
onclick: Utils.unlink(editor),
onpostrender: Actions.toggleActiveState(editor)
});
if (editor.addContextToolbar) {
editor.addButton('openlink', {
icon: 'newtab',
tooltip: 'Open link',
onclick: Actions.gotoSelectedLink(editor)
});
}
};
var setupMenuItems = function (editor) {
editor.addMenuItem('openlink', {
text: 'Open link',
icon: 'newtab',
onclick: Actions.gotoSelectedLink(editor),
onPostRender: Actions.toggleViewLinkState(editor),
prependToContext: true
});
editor.addMenuItem('link', {
icon: 'link',
text: 'Link',
shortcut: 'Meta+K',
onclick: Actions.openDialog(editor),
stateSelector: 'a[href]',
context: 'insert',
prependToContext: true
});
editor.addMenuItem('unlink', {
icon: 'unlink',
text: 'Remove link',
onclick: Utils.unlink(editor),
stateSelector: 'a[href]'
});
};
var setupContextToolbars = function (editor) {
if (editor.addContextToolbar) {
editor.addContextToolbar(Actions.leftClickedOnAHref(editor), 'openlink | link unlink');
}
};
var Controls = {
setupButtons: setupButtons,
setupMenuItems: setupMenuItems,
setupContextToolbars: setupContextToolbars
};
global.add('link', function (editor) {
Controls.setupButtons(editor);
Controls.setupMenuItems(editor);
Controls.setupContextToolbars(editor);
Actions.setupGotoLinks(editor);
Commands.register(editor);
Keyboard.setup(editor);
});
function Plugin () {
}
return Plugin;
}(window));
})();

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,124 @@
(function () {
var tabfocus = (function (domGlobals) {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Delay');
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var global$6 = tinymce.util.Tools.resolve('tinymce.util.VK');
var getTabFocusElements = function (editor) {
return editor.getParam('tabfocus_elements', ':prev,:next');
};
var getTabFocus = function (editor) {
return editor.getParam('tab_focus', getTabFocusElements(editor));
};
var Settings = { getTabFocus: getTabFocus };
var DOM = global$1.DOM;
var tabCancel = function (e) {
if (e.keyCode === global$6.TAB && !e.ctrlKey && !e.altKey && !e.metaKey) {
e.preventDefault();
}
};
var setup = function (editor) {
function tabHandler(e) {
var x, el, v, i;
if (e.keyCode !== global$6.TAB || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) {
return;
}
function find(direction) {
el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
function canSelectRecursive(e) {
return e.nodeName === 'BODY' || e.type !== 'hidden' && e.style.display !== 'none' && e.style.visibility !== 'hidden' && canSelectRecursive(e.parentNode);
}
function canSelect(el) {
return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && global$2.get(e.id) && el.tabIndex !== -1 && canSelectRecursive(el);
}
global$5.each(el, function (e, i) {
if (e.id === editor.id) {
x = i;
return false;
}
});
if (direction > 0) {
for (i = x + 1; i < el.length; i++) {
if (canSelect(el[i])) {
return el[i];
}
}
} else {
for (i = x - 1; i >= 0; i--) {
if (canSelect(el[i])) {
return el[i];
}
}
}
return null;
}
v = global$5.explode(Settings.getTabFocus(editor));
if (v.length === 1) {
v[1] = v[0];
v[0] = ':prev';
}
if (e.shiftKey) {
if (v[0] === ':prev') {
el = find(-1);
} else {
el = DOM.get(v[0]);
}
} else {
if (v[1] === ':next') {
el = find(1);
} else {
el = DOM.get(v[1]);
}
}
if (el) {
var focusEditor = global$2.get(el.id || el.name);
if (el.id && focusEditor) {
focusEditor.focus();
} else {
global$4.setTimeout(function () {
if (!global$3.webkit) {
domGlobals.window.focus();
}
el.focus();
}, 10);
}
e.preventDefault();
}
}
editor.on('init', function () {
if (editor.inline) {
DOM.setAttrib(editor.getBody(), 'tabIndex', null);
}
editor.on('keyup', tabCancel);
if (global$3.gecko) {
editor.on('keypress keydown', tabHandler);
} else {
editor.on('keydown', tabHandler);
}
});
};
var Keyboard = { setup: setup };
global.add('tabfocus', function (editor) {
Keyboard.setup(editor);
});
function Plugin () {
}
return Plugin;
}(window));
})();

View file

@ -0,0 +1 @@
!function(c){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.VK"),m=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},v=t.DOM,n=function(e){e.keyCode!==d.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==d.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=f.explode(m(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):v.get(e[0]):":next"===e[1]?u(1):v.get(e[1]))){var t=s.get(o.id||o.name);o.id&&t?t.focus():y.setTimeout(function(){a.webkit||c.window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(t){return/INPUT|TEXTAREA|BUTTON/.test(t.tagName)&&s.get(n.id)&&-1!==t.tabIndex&&function e(t){return"BODY"===t.nodeName||"hidden"!==t.type&&"none"!==t.style.display&&"hidden"!==t.style.visibility&&e(t.parentNode)}(t)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),f.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&v.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),a.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};e.add("tabfocus",function(e){i(e)})}(window);

View file

@ -0,0 +1,346 @@
(function () {
var textcolor = (function () {
'use strict';
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
var getCurrentColor = function (editor, format) {
var color;
editor.dom.getParents(editor.selection.getStart(), function (elm) {
var value;
if (value = elm.style[format === 'forecolor' ? 'color' : 'background-color']) {
color = color ? color : value;
}
});
return color;
};
var mapColors = function (colorMap) {
var i;
var colors = [];
for (i = 0; i < colorMap.length; i += 2) {
colors.push({
text: colorMap[i + 1],
color: '#' + colorMap[i]
});
}
return colors;
};
var applyFormat = function (editor, format, value) {
editor.undoManager.transact(function () {
editor.focus();
editor.formatter.apply(format, { value: value });
editor.nodeChanged();
});
};
var removeFormat = function (editor, format) {
editor.undoManager.transact(function () {
editor.focus();
editor.formatter.remove(format, { value: null }, null, true);
editor.nodeChanged();
});
};
var TextColor = {
getCurrentColor: getCurrentColor,
mapColors: mapColors,
applyFormat: applyFormat,
removeFormat: removeFormat
};
var register = function (editor) {
editor.addCommand('mceApplyTextcolor', function (format, value) {
TextColor.applyFormat(editor, format, value);
});
editor.addCommand('mceRemoveTextcolor', function (format) {
TextColor.removeFormat(editor, format);
});
};
var Commands = { register: register };
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
var defaultColorMap = [
'000000',
'Black',
'993300',
'Burnt orange',
'333300',
'Dark olive',
'003300',
'Dark green',
'003366',
'Dark azure',
'000080',
'Navy Blue',
'333399',
'Indigo',
'333333',
'Very dark gray',
'800000',
'Maroon',
'FF6600',
'Orange',
'808000',
'Olive',
'008000',
'Green',
'008080',
'Teal',
'0000FF',
'Blue',
'666699',
'Grayish blue',
'808080',
'Gray',
'FF0000',
'Red',
'FF9900',
'Amber',
'99CC00',
'Yellow green',
'339966',
'Sea green',
'33CCCC',
'Turquoise',
'3366FF',
'Royal blue',
'800080',
'Purple',
'999999',
'Medium gray',
'FF00FF',
'Magenta',
'FFCC00',
'Gold',
'FFFF00',
'Yellow',
'00FF00',
'Lime',
'00FFFF',
'Aqua',
'00CCFF',
'Sky blue',
'993366',
'Red violet',
'FFFFFF',
'White',
'FF99CC',
'Pink',
'FFCC99',
'Peach',
'FFFF99',
'Light yellow',
'CCFFCC',
'Pale green',
'CCFFFF',
'Pale cyan',
'99CCFF',
'Light sky blue',
'CC99FF',
'Plum'
];
var getTextColorMap = function (editor) {
return editor.getParam('textcolor_map', defaultColorMap);
};
var getForeColorMap = function (editor) {
return editor.getParam('forecolor_map', getTextColorMap(editor));
};
var getBackColorMap = function (editor) {
return editor.getParam('backcolor_map', getTextColorMap(editor));
};
var getTextColorRows = function (editor) {
return editor.getParam('textcolor_rows', 5);
};
var getTextColorCols = function (editor) {
return editor.getParam('textcolor_cols', 8);
};
var getForeColorRows = function (editor) {
return editor.getParam('forecolor_rows', getTextColorRows(editor));
};
var getBackColorRows = function (editor) {
return editor.getParam('backcolor_rows', getTextColorRows(editor));
};
var getForeColorCols = function (editor) {
return editor.getParam('forecolor_cols', getTextColorCols(editor));
};
var getBackColorCols = function (editor) {
return editor.getParam('backcolor_cols', getTextColorCols(editor));
};
var getColorPickerCallback = function (editor) {
return editor.getParam('color_picker_callback', null);
};
var hasColorPicker = function (editor) {
return typeof getColorPickerCallback(editor) === 'function';
};
var Settings = {
getForeColorMap: getForeColorMap,
getBackColorMap: getBackColorMap,
getForeColorRows: getForeColorRows,
getBackColorRows: getBackColorRows,
getForeColorCols: getForeColorCols,
getBackColorCols: getBackColorCols,
getColorPickerCallback: getColorPickerCallback,
hasColorPicker: hasColorPicker
};
var global$3 = tinymce.util.Tools.resolve('tinymce.util.I18n');
var getHtml = function (cols, rows, colorMap, hasColorPicker) {
var colors, color, html, last, x, y, i, count = 0;
var id = global$1.DOM.uniqueId('mcearia');
var getColorCellHtml = function (color, title) {
var isNoColor = color === 'transparent';
return '<td class="mce-grid-cell' + (isNoColor ? ' mce-colorbtn-trans' : '') + '">' + '<div id="' + id + '-' + count++ + '"' + ' data-mce-color="' + (color ? color : '') + '"' + ' role="option"' + ' tabIndex="-1"' + ' style="' + (color ? 'background-color: ' + color : '') + '"' + ' title="' + global$3.translate(title) + '">' + (isNoColor ? '&#215;' : '') + '</div>' + '</td>';
};
colors = TextColor.mapColors(colorMap);
colors.push({
text: global$3.translate('No color'),
color: 'transparent'
});
html = '<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>';
last = colors.length - 1;
for (y = 0; y < rows; y++) {
html += '<tr>';
for (x = 0; x < cols; x++) {
i = y * cols + x;
if (i > last) {
html += '<td></td>';
} else {
color = colors[i];
html += getColorCellHtml(color.color, color.text);
}
}
html += '</tr>';
}
if (hasColorPicker) {
html += '<tr>' + '<td colspan="' + cols + '" class="mce-custom-color-btn">' + '<div id="' + id + '-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" ' + 'role="button" tabindex="-1" aria-labelledby="' + id + '-c" style="width: 100%">' + '<button type="button" role="presentation" tabindex="-1">' + global$3.translate('Custom...') + '</button>' + '</div>' + '</td>' + '</tr>';
html += '<tr>';
for (x = 0; x < cols; x++) {
html += getColorCellHtml('', 'Custom color');
}
html += '</tr>';
}
html += '</tbody></table>';
return html;
};
var ColorPickerHtml = { getHtml: getHtml };
var setDivColor = function setDivColor(div, value) {
div.style.background = value;
div.setAttribute('data-mce-color', value);
};
var onButtonClick = function (editor) {
return function (e) {
var ctrl = e.control;
if (ctrl._color) {
editor.execCommand('mceApplyTextcolor', ctrl.settings.format, ctrl._color);
} else {
editor.execCommand('mceRemoveTextcolor', ctrl.settings.format);
}
};
};
var onPanelClick = function (editor, cols) {
return function (e) {
var buttonCtrl = this.parent();
var value;
var currentColor = TextColor.getCurrentColor(editor, buttonCtrl.settings.format);
var selectColor = function (value) {
editor.execCommand('mceApplyTextcolor', buttonCtrl.settings.format, value);
buttonCtrl.hidePanel();
buttonCtrl.color(value);
};
var resetColor = function () {
editor.execCommand('mceRemoveTextcolor', buttonCtrl.settings.format);
buttonCtrl.hidePanel();
buttonCtrl.resetColor();
};
if (global$1.DOM.getParent(e.target, '.mce-custom-color-btn')) {
buttonCtrl.hidePanel();
var colorPickerCallback = Settings.getColorPickerCallback(editor);
colorPickerCallback.call(editor, function (value) {
var tableElm = buttonCtrl.panel.getEl().getElementsByTagName('table')[0];
var customColorCells, div, i;
customColorCells = global$2.map(tableElm.rows[tableElm.rows.length - 1].childNodes, function (elm) {
return elm.firstChild;
});
for (i = 0; i < customColorCells.length; i++) {
div = customColorCells[i];
if (!div.getAttribute('data-mce-color')) {
break;
}
}
if (i === cols) {
for (i = 0; i < cols - 1; i++) {
setDivColor(customColorCells[i], customColorCells[i + 1].getAttribute('data-mce-color'));
}
}
setDivColor(div, value);
selectColor(value);
}, currentColor);
}
value = e.target.getAttribute('data-mce-color');
if (value) {
if (this.lastId) {
global$1.DOM.get(this.lastId).setAttribute('aria-selected', 'false');
}
e.target.setAttribute('aria-selected', true);
this.lastId = e.target.id;
if (value === 'transparent') {
resetColor();
} else {
selectColor(value);
}
} else if (value !== null) {
buttonCtrl.hidePanel();
}
};
};
var renderColorPicker = function (editor, foreColor) {
return function () {
var cols = foreColor ? Settings.getForeColorCols(editor) : Settings.getBackColorCols(editor);
var rows = foreColor ? Settings.getForeColorRows(editor) : Settings.getBackColorRows(editor);
var colorMap = foreColor ? Settings.getForeColorMap(editor) : Settings.getBackColorMap(editor);
var hasColorPicker = Settings.hasColorPicker(editor);
return ColorPickerHtml.getHtml(cols, rows, colorMap, hasColorPicker);
};
};
var register$1 = function (editor) {
editor.addButton('forecolor', {
type: 'colorbutton',
tooltip: 'Text color',
format: 'forecolor',
panel: {
role: 'application',
ariaRemember: true,
html: renderColorPicker(editor, true),
onclick: onPanelClick(editor, Settings.getForeColorCols(editor))
},
onclick: onButtonClick(editor)
});
editor.addButton('backcolor', {
type: 'colorbutton',
tooltip: 'Background color',
format: 'hilitecolor',
panel: {
role: 'application',
ariaRemember: true,
html: renderColorPicker(editor, false),
onclick: onPanelClick(editor, Settings.getBackColorCols(editor))
},
onclick: onButtonClick(editor)
});
};
var Buttons = { register: register$1 };
global.add('textcolor', function (editor) {
Commands.register(editor);
Buttons.register(editor);
});
function Plugin () {
}
return Plugin;
}());
})();

View file

@ -0,0 +1 @@
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(t,o){var r;return t.dom.getParents(t.selection.getStart(),function(t){var e;(e=t.style["forecolor"===o?"color":"background-color"])&&(r=r||e)}),r},g=function(t){var e,o=[];for(e=0;e<t.length;e+=2)o.push({text:t[e+1],color:"#"+t[e]});return o},r=function(t,e,o){t.undoManager.transact(function(){t.focus(),t.formatter.apply(e,{value:o}),t.nodeChanged()})},e=function(t,e){t.undoManager.transact(function(){t.focus(),t.formatter.remove(e,{value:null},null,!0),t.nodeChanged()})},o=function(o){o.addCommand("mceApplyTextcolor",function(t,e){r(o,t,e)}),o.addCommand("mceRemoveTextcolor",function(t){e(o,t)})},F=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],l=function(t){return t.getParam("textcolor_map",a)},c=function(t){return t.getParam("textcolor_rows",5)},u=function(t){return t.getParam("textcolor_cols",8)},m=function(t){return t.getParam("color_picker_callback",null)},s=function(t){return t.getParam("forecolor_map",l(t))},d=function(t){return t.getParam("backcolor_map",l(t))},f=function(t){return t.getParam("forecolor_rows",c(t))},b=function(t){return t.getParam("backcolor_rows",c(t))},p=function(t){return t.getParam("forecolor_cols",u(t))},C=function(t){return t.getParam("backcolor_cols",u(t))},y=m,v=function(t){return"function"==typeof m(t)},h=tinymce.util.Tools.resolve("tinymce.util.I18n"),P=function(t,e,o,r){var n,a,l,c,i,u,m,s=0,d=F.DOM.uniqueId("mcearia"),f=function(t,e){var o="transparent"===t;return'<td class="mce-grid-cell'+(o?" mce-colorbtn-trans":"")+'"><div id="'+d+"-"+s+++'" data-mce-color="'+(t||"")+'" role="option" tabIndex="-1" style="'+(t?"background-color: "+t:"")+'" title="'+h.translate(e)+'">'+(o?"&#215;":"")+"</div></td>"};for((n=g(o)).push({text:h.translate("No color"),color:"transparent"}),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="list" cellspacing="0"><tbody>',c=n.length-1,u=0;u<e;u++){for(l+="<tr>",i=0;i<t;i++)l+=c<(m=u*t+i)?"<td></td>":f((a=n[m]).color,a.text);l+="</tr>"}if(r){for(l+='<tr><td colspan="'+t+'" class="mce-custom-color-btn"><div id="'+d+'-c" class="mce-widget mce-btn mce-btn-small mce-btn-flat" role="button" tabindex="-1" aria-labelledby="'+d+'-c" style="width: 100%"><button type="button" role="presentation" tabindex="-1">'+h.translate("Custom...")+"</button></div></td></tr>",l+="<tr>",i=0;i<t;i++)l+=f("","Custom color");l+="</tr>"}return l+="</tbody></table>"},k=function(t,e){t.style.background=e,t.setAttribute("data-mce-color",e)},x=function(o){return function(t){var e=t.control;e._color?o.execCommand("mceApplyTextcolor",e.settings.format,e._color):o.execCommand("mceRemoveTextcolor",e.settings.format)}},T=function(r,c){return function(t){var e,a=this.parent(),o=n(r,a.settings.format),l=function(t){r.execCommand("mceApplyTextcolor",a.settings.format,t),a.hidePanel(),a.color(t)};F.DOM.getParent(t.target,".mce-custom-color-btn")&&(a.hidePanel(),y(r).call(r,function(t){var e,o,r,n=a.panel.getEl().getElementsByTagName("table")[0];for(e=i.map(n.rows[n.rows.length-1].childNodes,function(t){return t.firstChild}),r=0;r<e.length&&(o=e[r]).getAttribute("data-mce-color");r++);if(r===c)for(r=0;r<c-1;r++)k(e[r],e[r+1].getAttribute("data-mce-color"));k(o,t),l(t)},o)),(e=t.target.getAttribute("data-mce-color"))?(this.lastId&&F.DOM.get(this.lastId).setAttribute("aria-selected","false"),t.target.setAttribute("aria-selected",!0),this.lastId=t.target.id,"transparent"===e?(r.execCommand("mceRemoveTextcolor",a.settings.format),a.hidePanel(),a.resetColor()):l(e)):null!==e&&a.hidePanel()}},_=function(n,a){return function(){var t=a?p(n):C(n),e=a?f(n):b(n),o=a?s(n):d(n),r=v(n);return P(t,e,o,r)}},A=function(t){t.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!0),onclick:T(t,p(t))},onclick:x(t)}),t.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:_(t,!1),onclick:T(t,C(t))},onclick:x(t)})};t.add("textcolor",function(t){o(t),A(t)})}();

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,207 @@
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
// Forked for WordPress so it can be turned on/off after loading.
/*global tinymce:true */
/*eslint no-nested-ternary:0 */
/**
* Auto Resize
*
* This plugin automatically resizes the content area to fit its content height.
* It will retain a minimum height, which is the height of the content area when
* it's initialized.
*/
tinymce.PluginManager.add( 'wpautoresize', function( editor ) {
var settings = editor.settings,
oldSize = 300,
isActive = false;
if ( editor.settings.inline || tinymce.Env.iOS ) {
return;
}
function isFullscreen() {
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
}
function getInt( n ) {
return parseInt( n, 10 ) || 0;
}
/**
* This method gets executed each time the editor needs to resize.
*/
function resize( e ) {
var deltaSize, doc, body, docElm, DOM = tinymce.DOM, resizeHeight, myHeight,
marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
if ( ! isActive ) {
return;
}
doc = editor.getDoc();
if ( ! doc ) {
return;
}
e = e || {};
body = doc.body;
docElm = doc.documentElement;
resizeHeight = settings.autoresize_min_height;
if ( ! body || ( e && e.type === 'setcontent' && e.initial ) || isFullscreen() ) {
if ( body && docElm ) {
body.style.overflowY = 'auto';
docElm.style.overflowY = 'auto'; // Old IE.
}
return;
}
// Calculate outer height of the body element using CSS styles.
marginTop = editor.dom.getStyle( body, 'margin-top', true );
marginBottom = editor.dom.getStyle( body, 'margin-bottom', true );
paddingTop = editor.dom.getStyle( body, 'padding-top', true );
paddingBottom = editor.dom.getStyle( body, 'padding-bottom', true );
borderTop = editor.dom.getStyle( body, 'border-top-width', true );
borderBottom = editor.dom.getStyle( body, 'border-bottom-width', true );
myHeight = body.offsetHeight + getInt( marginTop ) + getInt( marginBottom ) +
getInt( paddingTop ) + getInt( paddingBottom ) +
getInt( borderTop ) + getInt( borderBottom );
// IE < 11, other?
if ( myHeight && myHeight < docElm.offsetHeight ) {
myHeight = docElm.offsetHeight;
}
// Make sure we have a valid height.
if ( isNaN( myHeight ) || myHeight <= 0 ) {
// Get height differently depending on the browser used.
myHeight = tinymce.Env.ie ? body.scrollHeight : ( tinymce.Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight );
}
// Don't make it smaller than the minimum height.
if ( myHeight > settings.autoresize_min_height ) {
resizeHeight = myHeight;
}
// If a maximum height has been defined don't exceed this height.
if ( settings.autoresize_max_height && myHeight > settings.autoresize_max_height ) {
resizeHeight = settings.autoresize_max_height;
body.style.overflowY = 'auto';
docElm.style.overflowY = 'auto'; // Old IE.
} else {
body.style.overflowY = 'hidden';
docElm.style.overflowY = 'hidden'; // Old IE.
body.scrollTop = 0;
}
// Resize content element.
if (resizeHeight !== oldSize) {
deltaSize = resizeHeight - oldSize;
DOM.setStyle( editor.iframeElement, 'height', resizeHeight + 'px' );
oldSize = resizeHeight;
// WebKit doesn't decrease the size of the body element until the iframe gets resized.
// So we need to continue to resize the iframe down until the size gets fixed.
if ( tinymce.isWebKit && deltaSize < 0 ) {
resize( e );
}
editor.fire( 'wp-autoresize', { height: resizeHeight, deltaHeight: e.type === 'nodechange' ? deltaSize : null } );
}
}
/**
* Calls the resize x times in 100ms intervals. We can't wait for load events since
* the CSS files might load async.
*/
function wait( times, interval, callback ) {
setTimeout( function() {
resize();
if ( times-- ) {
wait( times, interval, callback );
} else if ( callback ) {
callback();
}
}, interval );
}
// Define minimum height.
settings.autoresize_min_height = parseInt(editor.getParam( 'autoresize_min_height', editor.getElement().offsetHeight), 10 );
// Define maximum height.
settings.autoresize_max_height = parseInt(editor.getParam( 'autoresize_max_height', 0), 10 );
function on() {
if ( ! editor.dom.hasClass( editor.getBody(), 'wp-autoresize' ) ) {
isActive = true;
editor.dom.addClass( editor.getBody(), 'wp-autoresize' );
// Add appropriate listeners for resizing the content area.
editor.on( 'nodechange setcontent keyup FullscreenStateChanged', resize );
resize();
}
}
function off() {
var doc;
// Don't turn off if the setting is 'on'.
if ( ! settings.wp_autoresize_on ) {
isActive = false;
doc = editor.getDoc();
editor.dom.removeClass( editor.getBody(), 'wp-autoresize' );
editor.off( 'nodechange setcontent keyup FullscreenStateChanged', resize );
doc.body.style.overflowY = 'auto';
doc.documentElement.style.overflowY = 'auto'; // Old IE.
oldSize = 0;
}
}
if ( settings.wp_autoresize_on ) {
// Turn resizing on when the editor loads.
isActive = true;
editor.on( 'init', function() {
editor.dom.addClass( editor.getBody(), 'wp-autoresize' );
});
editor.on( 'nodechange keyup FullscreenStateChanged', resize );
editor.on( 'setcontent', function() {
wait( 3, 100 );
});
if ( editor.getParam( 'autoresize_on_init', true ) ) {
editor.on( 'init', function() {
// Hit it 10 times in 200 ms intervals.
wait( 10, 200, function() {
// Hit it 5 times in 1 sec intervals.
wait( 5, 1000 );
});
});
}
}
// Reset the stored size.
editor.on( 'show', function() {
oldSize = 0;
});
// Register the command.
editor.addCommand( 'wpAutoResize', resize );
// On/off.
editor.addCommand( 'wpAutoResizeOn', on );
editor.addCommand( 'wpAutoResizeOff', off );
});

View file

@ -0,0 +1 @@
tinymce.PluginManager.add("wpautoresize",function(g){var m=g.settings,h=300,c=!1;function f(e){return parseInt(e,10)||0}function y(e){var t,o,n,i,a,s,l,u,r,d=tinymce.DOM;c&&(r=g.getDoc())&&(e=e||{},t=r.body,o=r.documentElement,n=m.autoresize_min_height,!t||e&&"setcontent"===e.type&&e.initial||g.plugins.fullscreen&&g.plugins.fullscreen.isFullscreen()?t&&o&&(t.style.overflowY="auto",o.style.overflowY="auto"):(i=g.dom.getStyle(t,"margin-top",!0),a=g.dom.getStyle(t,"margin-bottom",!0),s=g.dom.getStyle(t,"padding-top",!0),l=g.dom.getStyle(t,"padding-bottom",!0),u=g.dom.getStyle(t,"border-top-width",!0),r=g.dom.getStyle(t,"border-bottom-width",!0),(r=t.offsetHeight+f(i)+f(a)+f(s)+f(l)+f(u)+f(r))&&r<o.offsetHeight&&(r=o.offsetHeight),(r=isNaN(r)||r<=0?tinymce.Env.ie?t.scrollHeight:tinymce.Env.webkit&&0===t.clientHeight?0:t.offsetHeight:r)>m.autoresize_min_height&&(n=r),m.autoresize_max_height&&r>m.autoresize_max_height?(n=m.autoresize_max_height,t.style.overflowY="auto",o.style.overflowY="auto"):(t.style.overflowY="hidden",o.style.overflowY="hidden",t.scrollTop=0),n!==h&&(t=n-h,d.setStyle(g.iframeElement,"height",n+"px"),h=n,tinymce.isWebKit&&t<0&&y(e),g.fire("wp-autoresize",{height:n,deltaHeight:"nodechange"===e.type?t:null}))))}function n(e,t,o){setTimeout(function(){y(),e--?n(e,t,o):o&&o()},t)}g.settings.inline||tinymce.Env.iOS||(m.autoresize_min_height=parseInt(g.getParam("autoresize_min_height",g.getElement().offsetHeight),10),m.autoresize_max_height=parseInt(g.getParam("autoresize_max_height",0),10),m.wp_autoresize_on&&(c=!0,g.on("init",function(){g.dom.addClass(g.getBody(),"wp-autoresize")}),g.on("nodechange keyup FullscreenStateChanged",y),g.on("setcontent",function(){n(3,100)}),g.getParam("autoresize_on_init",!0)&&g.on("init",function(){n(10,200,function(){n(5,1e3)})})),g.on("show",function(){h=0}),g.addCommand("wpAutoResize",y),g.addCommand("wpAutoResizeOn",function(){g.dom.hasClass(g.getBody(),"wp-autoresize")||(c=!0,g.dom.addClass(g.getBody(),"wp-autoresize"),g.on("nodechange setcontent keyup FullscreenStateChanged",y),y())}),g.addCommand("wpAutoResizeOff",function(){var e;m.wp_autoresize_on||(c=!1,e=g.getDoc(),g.dom.removeClass(g.getBody(),"wp-autoresize"),g.off("nodechange setcontent keyup FullscreenStateChanged",y),e.body.style.overflowY="auto",e.documentElement.style.overflowY="auto",h=0)}))});

View file

@ -0,0 +1,92 @@
/* global tinymce */
/**
* Included for back-compat.
* The default WindowManager in TinyMCE 4.0 supports three types of dialogs:
* - With HTML created from JS.
* - With inline HTML (like WPWindowManager).
* - Old type iframe based dialogs.
* For examples see the default plugins: https://github.com/tinymce/tinymce/tree/master/js/tinymce/plugins
*/
tinymce.WPWindowManager = tinymce.InlineWindowManager = function( editor ) {
if ( this.wp ) {
return this;
}
this.wp = {};
this.parent = editor.windowManager;
this.editor = editor;
tinymce.extend( this, this.parent );
this.open = function( args, params ) {
var $element,
self = this,
wp = this.wp;
if ( ! args.wpDialog ) {
return this.parent.open.apply( this, arguments );
} else if ( ! args.id ) {
return;
}
if ( typeof jQuery === 'undefined' || ! jQuery.wp || ! jQuery.wp.wpdialog ) {
// wpdialog.js is not loaded.
if ( window.console && window.console.error ) {
window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.');
}
return;
}
wp.$element = $element = jQuery( '#' + args.id );
if ( ! $element.length ) {
return;
}
if ( window.console && window.console.log ) {
window.console.log('tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML.');
}
wp.features = args;
wp.params = params;
// Store selection. Takes a snapshot in the FocusManager of the selection before focus is moved to the dialog.
editor.nodeChanged();
// Create the dialog if necessary.
if ( ! $element.data('wpdialog') ) {
$element.wpdialog({
title: args.title,
width: args.width,
height: args.height,
modal: true,
dialogClass: 'wp-dialog',
zIndex: 300000
});
}
$element.wpdialog('open');
$element.on( 'wpdialogclose', function() {
if ( self.wp.$element ) {
self.wp = {};
}
});
};
this.close = function() {
if ( ! this.wp.features || ! this.wp.features.wpDialog ) {
return this.parent.close.apply( this, arguments );
}
this.wp.$element.wpdialog('close');
};
};
tinymce.PluginManager.add( 'wpdialogs', function( editor ) {
// Replace window manager.
editor.on( 'init', function() {
editor.windowManager = new tinymce.WPWindowManager( editor );
});
});

View file

@ -0,0 +1 @@
tinymce.WPWindowManager=tinymce.InlineWindowManager=function(a){if(this.wp)return this;this.wp={},this.parent=a.windowManager,this.editor=a,tinymce.extend(this,this.parent),this.open=function(e,i){var n,o=this,t=this.wp;if(!e.wpDialog)return this.parent.open.apply(this,arguments);e.id&&("undefined"!=typeof jQuery&&jQuery.wp&&jQuery.wp.wpdialog?(t.$element=n=jQuery("#"+e.id),n.length&&(window.console&&window.console.log&&window.console.log("tinymce.WPWindowManager is deprecated. Use the default editor.windowManager to open dialogs with inline HTML."),t.features=e,t.params=i,a.nodeChanged(),n.data("wpdialog")||n.wpdialog({title:e.title,width:e.width,height:e.height,modal:!0,dialogClass:"wp-dialog",zIndex:3e5}),n.wpdialog("open"),n.on("wpdialogclose",function(){o.wp.$element&&(o.wp={})}))):window.console&&window.console.error&&window.console.error('wpdialog.js is not loaded. Please set "wpdialogs" as dependency for your script when calling wp_enqueue_script(). You may also want to enqueue the "wp-jquery-ui-dialog" stylesheet.'))},this.close=function(){if(!this.wp.features||!this.wp.features.wpDialog)return this.parent.close.apply(this,arguments);this.wp.$element.wpdialog("close")}},tinymce.PluginManager.add("wpdialogs",function(e){e.on("init",function(){e.windowManager=new tinymce.WPWindowManager(e)})});

View file

@ -0,0 +1,900 @@
/* global tinymce */
tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
var toolbar, serializer, touchOnImage, pasteInCaption,
each = tinymce.each,
trim = tinymce.trim,
iOS = tinymce.Env.iOS;
function isPlaceholder( node ) {
return !! ( editor.dom.getAttrib( node, 'data-mce-placeholder' ) || editor.dom.getAttrib( node, 'data-mce-object' ) );
}
editor.addButton( 'wp_img_remove', {
tooltip: 'Remove',
icon: 'dashicon dashicons-no',
onclick: function() {
removeImage( editor.selection.getNode() );
}
} );
editor.addButton( 'wp_img_edit', {
tooltip: 'Edit|button', // '|button' is not displayed, only used for context.
icon: 'dashicon dashicons-edit',
onclick: function() {
editImage( editor.selection.getNode() );
}
} );
each( {
alignleft: 'Align left',
aligncenter: 'Align center',
alignright: 'Align right',
alignnone: 'No alignment'
}, function( tooltip, name ) {
var direction = name.slice( 5 );
editor.addButton( 'wp_img_' + name, {
tooltip: tooltip,
icon: 'dashicon dashicons-align-' + direction,
cmd: 'alignnone' === name ? 'wpAlignNone' : 'Justify' + direction.slice( 0, 1 ).toUpperCase() + direction.slice( 1 ),
onPostRender: function() {
var self = this;
editor.on( 'NodeChange', function( event ) {
var node;
// Don't bother.
if ( event.element.nodeName !== 'IMG' ) {
return;
}
node = editor.dom.getParent( event.element, '.wp-caption' ) || event.element;
if ( 'alignnone' === name ) {
self.active( ! /\balign(left|center|right)\b/.test( node.className ) );
} else {
self.active( editor.dom.hasClass( node, name ) );
}
} );
}
} );
} );
editor.once( 'preinit', function() {
if ( editor.wp && editor.wp._createToolbar ) {
toolbar = editor.wp._createToolbar( [
'wp_img_alignleft',
'wp_img_aligncenter',
'wp_img_alignright',
'wp_img_alignnone',
'wp_img_edit',
'wp_img_remove'
] );
}
} );
editor.on( 'wptoolbar', function( event ) {
if ( event.element.nodeName === 'IMG' && ! isPlaceholder( event.element ) ) {
event.toolbar = toolbar;
}
} );
function isNonEditable( node ) {
var parent = editor.$( node ).parents( '[contenteditable]' );
return parent && parent.attr( 'contenteditable' ) === 'false';
}
// Safari on iOS fails to select images in contentEditoble mode on touch.
// Select them again.
if ( iOS ) {
editor.on( 'init', function() {
editor.on( 'touchstart', function( event ) {
if ( event.target.nodeName === 'IMG' && ! isNonEditable( event.target ) ) {
touchOnImage = true;
}
});
editor.dom.bind( editor.getDoc(), 'touchmove', function() {
touchOnImage = false;
});
editor.on( 'touchend', function( event ) {
if ( touchOnImage && event.target.nodeName === 'IMG' && ! isNonEditable( event.target ) ) {
var node = event.target;
touchOnImage = false;
window.setTimeout( function() {
editor.selection.select( node );
editor.nodeChanged();
}, 100 );
} else if ( toolbar ) {
toolbar.hide();
}
});
});
}
function parseShortcode( content ) {
return content.replace( /(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function( a, b, c ) {
var id, align, classes, caption, img, width;
id = b.match( /id=['"]([^'"]*)['"] ?/ );
if ( id ) {
b = b.replace( id[0], '' );
}
align = b.match( /align=['"]([^'"]*)['"] ?/ );
if ( align ) {
b = b.replace( align[0], '' );
}
classes = b.match( /class=['"]([^'"]*)['"] ?/ );
if ( classes ) {
b = b.replace( classes[0], '' );
}
width = b.match( /width=['"]([0-9]*)['"] ?/ );
if ( width ) {
b = b.replace( width[0], '' );
}
c = trim( c );
img = c.match( /((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)([\s\S]*)/i );
if ( img && img[2] ) {
caption = trim( img[2] );
img = trim( img[1] );
} else {
// Old captions shortcode style.
caption = trim( b ).replace( /caption=['"]/, '' ).replace( /['"]$/, '' );
img = c;
}
id = ( id && id[1] ) ? id[1].replace( /[<>&]+/g, '' ) : '';
align = ( align && align[1] ) ? align[1] : 'alignnone';
classes = ( classes && classes[1] ) ? ' ' + classes[1].replace( /[<>&]+/g, '' ) : '';
if ( ! width && img ) {
width = img.match( /width=['"]([0-9]*)['"]/ );
}
if ( width && width[1] ) {
width = width[1];
}
if ( ! width || ! caption ) {
return c;
}
width = parseInt( width, 10 );
if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
width += 10;
}
return '<div class="mceTemp"><dl id="' + id + '" class="wp-caption ' + align + classes + '" style="width: ' + width + 'px">' +
'<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ caption +'</dd></dl></div>';
});
}
function getShortcode( content ) {
return content.replace( /(?:<div [^>]+mceTemp[^>]+>)?\s*(<dl [^>]+wp-caption[^>]+>[\s\S]+?<\/dl>)\s*(?:<\/div>)?/g, function( all, dl ) {
var out = '';
if ( dl.indexOf('<img ') === -1 || dl.indexOf('</p>') !== -1 ) {
// Broken caption. The user managed to drag the image out or type in the wrapper div?
// Remove the <dl>, <dd> and <dt> and return the remaining text.
return dl.replace( /<d[ldt]( [^>]+)?>/g, '' ).replace( /<\/d[ldt]>/g, '' );
}
out = dl.replace( /\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi, function( a, b, c, caption ) {
var id, classes, align, width;
width = c.match( /width="([0-9]*)"/ );
width = ( width && width[1] ) ? width[1] : '';
classes = b.match( /class="([^"]*)"/ );
classes = ( classes && classes[1] ) ? classes[1] : '';
align = classes.match( /align[a-z]+/i ) || 'alignnone';
if ( ! width || ! caption ) {
if ( 'alignnone' !== align[0] ) {
c = c.replace( /><img/, ' class="' + align[0] + '"><img' );
}
return c;
}
id = b.match( /id="([^"]*)"/ );
id = ( id && id[1] ) ? id[1] : '';
classes = classes.replace( /wp-caption ?|align[a-z]+ ?/gi, '' );
if ( classes ) {
classes = ' class="' + classes + '"';
}
caption = caption.replace( /\r\n|\r/g, '\n' ).replace( /<[a-zA-Z0-9]+( [^<>]+)?>/g, function( a ) {
// No line breaks inside HTML tags.
return a.replace( /[\r\n\t]+/, ' ' );
});
// Convert remaining line breaks to <br>.
caption = caption.replace( /\s*\n\s*/g, '<br />' );
return '[caption id="' + id + '" align="' + align + '" width="' + width + '"' + classes + ']' + c + ' ' + caption + '[/caption]';
});
if ( out.indexOf('[caption') === -1 ) {
// The caption html seems broken, try to find the image that may be wrapped in a link
// and may be followed by <p> with the caption text.
out = dl.replace( /[\s\S]*?((?:<a [^>]+>)?<img [^>]+>(?:<\/a>)?)(<p>[\s\S]*<\/p>)?[\s\S]*/gi, '<p>$1</p>$2' );
}
return out;
});
}
function extractImageData( imageNode ) {
var classes, extraClasses, metadata, captionBlock, caption, link, width, height,
captionClassName = [],
dom = editor.dom,
isIntRegExp = /^\d+$/;
// Default attributes.
metadata = {
attachment_id: false,
size: 'custom',
caption: '',
align: 'none',
extraClasses: '',
link: false,
linkUrl: '',
linkClassName: '',
linkTargetBlank: false,
linkRel: '',
title: ''
};
metadata.url = dom.getAttrib( imageNode, 'src' );
metadata.alt = dom.getAttrib( imageNode, 'alt' );
metadata.title = dom.getAttrib( imageNode, 'title' );
width = dom.getAttrib( imageNode, 'width' );
height = dom.getAttrib( imageNode, 'height' );
if ( ! isIntRegExp.test( width ) || parseInt( width, 10 ) < 1 ) {
width = imageNode.naturalWidth || imageNode.width;
}
if ( ! isIntRegExp.test( height ) || parseInt( height, 10 ) < 1 ) {
height = imageNode.naturalHeight || imageNode.height;
}
metadata.customWidth = metadata.width = width;
metadata.customHeight = metadata.height = height;
classes = tinymce.explode( imageNode.className, ' ' );
extraClasses = [];
tinymce.each( classes, function( name ) {
if ( /^wp-image/.test( name ) ) {
metadata.attachment_id = parseInt( name.replace( 'wp-image-', '' ), 10 );
} else if ( /^align/.test( name ) ) {
metadata.align = name.replace( 'align', '' );
} else if ( /^size/.test( name ) ) {
metadata.size = name.replace( 'size-', '' );
} else {
extraClasses.push( name );
}
} );
metadata.extraClasses = extraClasses.join( ' ' );
// Extract caption.
captionBlock = dom.getParents( imageNode, '.wp-caption' );
if ( captionBlock.length ) {
captionBlock = captionBlock[0];
classes = captionBlock.className.split( ' ' );
tinymce.each( classes, function( name ) {
if ( /^align/.test( name ) ) {
metadata.align = name.replace( 'align', '' );
} else if ( name && name !== 'wp-caption' ) {
captionClassName.push( name );
}
} );
metadata.captionClassName = captionClassName.join( ' ' );
caption = dom.select( 'dd.wp-caption-dd', captionBlock );
if ( caption.length ) {
caption = caption[0];
metadata.caption = editor.serializer.serialize( caption )
.replace( /<br[^>]*>/g, '$&\n' ).replace( /^<p>/, '' ).replace( /<\/p>$/, '' );
}
}
// Extract linkTo.
if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' ) {
link = imageNode.parentNode;
metadata.linkUrl = dom.getAttrib( link, 'href' );
metadata.linkTargetBlank = dom.getAttrib( link, 'target' ) === '_blank' ? true : false;
metadata.linkRel = dom.getAttrib( link, 'rel' );
metadata.linkClassName = link.className;
}
return metadata;
}
function hasTextContent( node ) {
return node && !! ( node.textContent || node.innerText ).replace( /\ufeff/g, '' );
}
// Verify HTML in captions.
function verifyHTML( caption ) {
if ( ! caption || ( caption.indexOf( '<' ) === -1 && caption.indexOf( '>' ) === -1 ) ) {
return caption;
}
if ( ! serializer ) {
serializer = new tinymce.html.Serializer( {}, editor.schema );
}
return serializer.serialize( editor.parser.parse( caption, { forced_root_block: false } ) );
}
function updateImage( $imageNode, imageData ) {
var classes, className, node, html, parent, wrap, linkNode, imageNode,
captionNode, dd, dl, id, attrs, linkAttrs, width, height, align,
$imageNode, srcset, src,
dom = editor.dom;
if ( ! $imageNode || ! $imageNode.length ) {
return;
}
imageNode = $imageNode[0];
classes = tinymce.explode( imageData.extraClasses, ' ' );
if ( ! classes ) {
classes = [];
}
if ( ! imageData.caption ) {
classes.push( 'align' + imageData.align );
}
if ( imageData.attachment_id ) {
classes.push( 'wp-image-' + imageData.attachment_id );
if ( imageData.size && imageData.size !== 'custom' ) {
classes.push( 'size-' + imageData.size );
}
}
width = imageData.width;
height = imageData.height;
if ( imageData.size === 'custom' ) {
width = imageData.customWidth;
height = imageData.customHeight;
}
attrs = {
src: imageData.url,
width: width || null,
height: height || null,
title: imageData.title || null,
'class': classes.join( ' ' ) || null
};
dom.setAttribs( imageNode, attrs );
// Preserve empty alt attributes.
$imageNode.attr( 'alt', imageData.alt || '' );
linkAttrs = {
href: imageData.linkUrl,
rel: imageData.linkRel || null,
target: imageData.linkTargetBlank ? '_blank': null,
'class': imageData.linkClassName || null
};
if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
// Update or remove an existing link wrapped around the image.
if ( imageData.linkUrl ) {
dom.setAttribs( imageNode.parentNode, linkAttrs );
} else {
dom.remove( imageNode.parentNode, true );
}
} else if ( imageData.linkUrl ) {
if ( linkNode = dom.getParent( imageNode, 'a' ) ) {
// The image is inside a link together with other nodes,
// or is nested in another node, move it out.
dom.insertAfter( imageNode, linkNode );
}
// Add link wrapped around the image.
linkNode = dom.create( 'a', linkAttrs );
imageNode.parentNode.insertBefore( linkNode, imageNode );
linkNode.appendChild( imageNode );
}
captionNode = editor.dom.getParent( imageNode, '.mceTemp' );
if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' && ! hasTextContent( imageNode.parentNode ) ) {
node = imageNode.parentNode;
} else {
node = imageNode;
}
if ( imageData.caption ) {
imageData.caption = verifyHTML( imageData.caption );
id = imageData.attachment_id ? 'attachment_' + imageData.attachment_id : null;
align = 'align' + ( imageData.align || 'none' );
className = 'wp-caption ' + align;
if ( imageData.captionClassName ) {
className += ' ' + imageData.captionClassName.replace( /[<>&]+/g, '' );
}
if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
width = parseInt( width, 10 );
width += 10;
}
if ( captionNode ) {
dl = dom.select( 'dl.wp-caption', captionNode );
if ( dl.length ) {
dom.setAttribs( dl, {
id: id,
'class': className,
style: 'width: ' + width + 'px'
} );
}
dd = dom.select( '.wp-caption-dd', captionNode );
if ( dd.length ) {
dom.setHTML( dd[0], imageData.caption );
}
} else {
id = id ? 'id="'+ id +'" ' : '';
// Should create a new function for generating the caption markup.
html = '<dl ' + id + 'class="' + className +'" style="width: '+ width +'px">' +
'<dt class="wp-caption-dt"></dt><dd class="wp-caption-dd">'+ imageData.caption +'</dd></dl>';
wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );
if ( parent = dom.getParent( node, 'p' ) ) {
parent.parentNode.insertBefore( wrap, parent );
} else {
node.parentNode.insertBefore( wrap, node );
}
editor.$( wrap ).find( 'dt.wp-caption-dt' ).append( node );
if ( parent && dom.isEmpty( parent ) ) {
dom.remove( parent );
}
}
} else if ( captionNode ) {
// Remove the caption wrapper and place the image in new paragraph.
parent = dom.create( 'p' );
captionNode.parentNode.insertBefore( parent, captionNode );
parent.appendChild( node );
dom.remove( captionNode );
}
$imageNode = editor.$( imageNode );
srcset = $imageNode.attr( 'srcset' );
src = $imageNode.attr( 'src' );
// Remove srcset and sizes if the image file was edited or the image was replaced.
if ( srcset && src ) {
src = src.replace( /[?#].*/, '' );
if ( srcset.indexOf( src ) === -1 ) {
$imageNode.attr( 'srcset', null ).attr( 'sizes', null );
}
}
if ( wp.media.events ) {
wp.media.events.trigger( 'editor:image-update', {
editor: editor,
metadata: imageData,
image: imageNode
} );
}
editor.nodeChanged();
}
function editImage( img ) {
var frame, callback, metadata, imageNode;
if ( typeof wp === 'undefined' || ! wp.media ) {
editor.execCommand( 'mceImage' );
return;
}
metadata = extractImageData( img );
// Mark the image node so we can select it later.
editor.$( img ).attr( 'data-wp-editing', 1 );
// Manipulate the metadata by reference that is fed into the PostImage model used in the media modal.
wp.media.events.trigger( 'editor:image-edit', {
editor: editor,
metadata: metadata,
image: img
} );
frame = wp.media({
frame: 'image',
state: 'image-details',
metadata: metadata
} );
wp.media.events.trigger( 'editor:frame-create', { frame: frame } );
callback = function( imageData ) {
editor.undoManager.transact( function() {
updateImage( imageNode, imageData );
} );
frame.detach();
};
frame.state('image-details').on( 'update', callback );
frame.state('replace-image').on( 'replace', callback );
frame.on( 'close', function() {
editor.focus();
frame.detach();
/*
* `close` fires first...
* To be able to update the image node, we need to find it here,
* and use it in the callback.
*/
imageNode = editor.$( 'img[data-wp-editing]' )
imageNode.removeAttr( 'data-wp-editing' );
});
frame.open();
}
function removeImage( node ) {
var wrap = editor.dom.getParent( node, 'div.mceTemp' );
if ( ! wrap && node.nodeName === 'IMG' ) {
wrap = editor.dom.getParent( node, 'a' );
}
if ( wrap ) {
if ( wrap.nextSibling ) {
editor.selection.select( wrap.nextSibling );
} else if ( wrap.previousSibling ) {
editor.selection.select( wrap.previousSibling );
} else {
editor.selection.select( wrap.parentNode );
}
editor.selection.collapse( true );
editor.dom.remove( wrap );
} else {
editor.dom.remove( node );
}
editor.nodeChanged();
editor.undoManager.add();
}
editor.on( 'init', function() {
var dom = editor.dom,
captionClass = editor.getParam( 'wpeditimage_html5_captions' ) ? 'html5-captions' : 'html4-captions';
dom.addClass( editor.getBody(), captionClass );
// Prevent IE11 from making dl.wp-caption resizable.
if ( tinymce.Env.ie && tinymce.Env.ie > 10 ) {
// The 'mscontrolselect' event is supported only in IE11+.
dom.bind( editor.getBody(), 'mscontrolselect', function( event ) {
if ( event.target.nodeName === 'IMG' && dom.getParent( event.target, '.wp-caption' ) ) {
// Hide the thick border with resize handles around dl.wp-caption.
editor.getBody().focus(); // :(
} else if ( event.target.nodeName === 'DL' && dom.hasClass( event.target, 'wp-caption' ) ) {
// Trigger the thick border with resize handles...
// This will make the caption text editable.
event.target.focus();
}
});
}
});
editor.on( 'ObjectResized', function( event ) {
var node = event.target;
if ( node.nodeName === 'IMG' ) {
editor.undoManager.transact( function() {
var parent, width,
dom = editor.dom;
node.className = node.className.replace( /\bsize-[^ ]+/, '' );
if ( parent = dom.getParent( node, '.wp-caption' ) ) {
width = event.width || dom.getAttrib( node, 'width' );
if ( width ) {
width = parseInt( width, 10 );
if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
width += 10;
}
dom.setStyle( parent, 'width', width + 'px' );
}
}
});
}
});
editor.on( 'pastePostProcess', function( event ) {
// Pasting in a caption node.
if ( editor.dom.getParent( editor.selection.getNode(), 'dd.wp-caption-dd' ) ) {
// Remove "non-block" elements that should not be in captions.
editor.$( 'img, audio, video, object, embed, iframe, script, style', event.node ).remove();
editor.$( '*', event.node ).each( function( i, node ) {
if ( editor.dom.isBlock( node ) ) {
// Insert <br> where the blocks used to be. Makes it look better after pasting in the caption.
if ( tinymce.trim( node.textContent || node.innerText ) ) {
editor.dom.insertAfter( editor.dom.create( 'br' ), node );
editor.dom.remove( node, true );
} else {
editor.dom.remove( node );
}
}
});
// Trim <br> tags.
editor.$( 'br', event.node ).each( function( i, node ) {
if ( ! node.nextSibling || node.nextSibling.nodeName === 'BR' ||
! node.previousSibling || node.previousSibling.nodeName === 'BR' ) {
editor.dom.remove( node );
}
} );
// Pasted HTML is cleaned up for inserting in the caption.
pasteInCaption = true;
}
});
editor.on( 'BeforeExecCommand', function( event ) {
var node, p, DL, align, replacement, captionParent,
cmd = event.command,
dom = editor.dom;
if ( cmd === 'mceInsertContent' || cmd === 'Indent' || cmd === 'Outdent' ) {
node = editor.selection.getNode();
captionParent = dom.getParent( node, 'div.mceTemp' );
if ( captionParent ) {
if ( cmd === 'mceInsertContent' ) {
if ( pasteInCaption ) {
pasteInCaption = false;
/*
* We are in the caption element, and in 'paste' context,
* and the pasted HTML was cleaned up on 'pastePostProcess' above.
* Let it be pasted in the caption.
*/
return;
}
/*
* The paste is somewhere else in the caption DL element.
* Prevent pasting in there as it will break the caption.
* Make new paragraph under the caption DL and move the caret there.
*/
p = dom.create( 'p' );
dom.insertAfter( p, captionParent );
editor.selection.setCursorLocation( p, 0 );
/*
* If the image is selected and the user pastes "over" it,
* replace both the image and the caption elements with the pasted content.
* This matches the behavior when pasting over non-caption images.
*/
if ( node.nodeName === 'IMG' ) {
editor.$( captionParent ).remove();
}
editor.nodeChanged();
} else {
// Clicking Indent or Outdent while an image with a caption is selected breaks the caption.
// See #38313.
event.preventDefault();
event.stopImmediatePropagation();
return false;
}
}
} else if ( cmd === 'JustifyLeft' || cmd === 'JustifyRight' || cmd === 'JustifyCenter' || cmd === 'wpAlignNone' ) {
node = editor.selection.getNode();
align = 'align' + cmd.slice( 7 ).toLowerCase();
DL = editor.dom.getParent( node, '.wp-caption' );
if ( node.nodeName !== 'IMG' && ! DL ) {
return;
}
node = DL || node;
if ( editor.dom.hasClass( node, align ) ) {
replacement = ' alignnone';
} else {
replacement = ' ' + align;
}
node.className = trim( node.className.replace( / ?align(left|center|right|none)/g, '' ) + replacement );
editor.nodeChanged();
event.preventDefault();
if ( toolbar ) {
toolbar.reposition();
}
editor.fire( 'ExecCommand', {
command: cmd,
ui: event.ui,
value: event.value
} );
}
});
editor.on( 'keydown', function( event ) {
var node, wrap, P, spacer,
selection = editor.selection,
keyCode = event.keyCode,
dom = editor.dom,
VK = tinymce.util.VK;
if ( keyCode === VK.ENTER ) {
// When pressing Enter inside a caption move the caret to a new parapraph under it.
node = selection.getNode();
wrap = dom.getParent( node, 'div.mceTemp' );
if ( wrap ) {
dom.events.cancel( event ); // Doesn't cancel all :(
// Remove any extra dt and dd cleated on pressing Enter...
tinymce.each( dom.select( 'dt, dd', wrap ), function( element ) {
if ( dom.isEmpty( element ) ) {
dom.remove( element );
}
});
spacer = tinymce.Env.ie && tinymce.Env.ie < 11 ? '' : '<br data-mce-bogus="1" />';
P = dom.create( 'p', null, spacer );
if ( node.nodeName === 'DD' ) {
dom.insertAfter( P, wrap );
} else {
wrap.parentNode.insertBefore( P, wrap );
}
editor.nodeChanged();
selection.setCursorLocation( P, 0 );
}
} else if ( keyCode === VK.DELETE || keyCode === VK.BACKSPACE ) {
node = selection.getNode();
if ( node.nodeName === 'DIV' && dom.hasClass( node, 'mceTemp' ) ) {
wrap = node;
} else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) {
wrap = dom.getParent( node, 'div.mceTemp' );
}
if ( wrap ) {
dom.events.cancel( event );
removeImage( node );
return false;
}
}
});
/*
* After undo/redo FF seems to set the image height very slowly when it is set to 'auto' in the CSS.
* This causes image.getBoundingClientRect() to return wrong values and the resize handles are shown in wrong places.
* Collapse the selection to remove the resize handles.
*/
if ( tinymce.Env.gecko ) {
editor.on( 'undo redo', function() {
if ( editor.selection.getNode().nodeName === 'IMG' ) {
editor.selection.collapse();
}
});
}
editor.wpSetImgCaption = function( content ) {
return parseShortcode( content );
};
editor.wpGetImgCaption = function( content ) {
return getShortcode( content );
};
editor.on( 'beforeGetContent', function( event ) {
if ( event.format !== 'raw' ) {
editor.$( 'img[id="__wp-temp-img-id"]' ).removeAttr( 'id' );
}
});
editor.on( 'BeforeSetContent', function( event ) {
if ( event.format !== 'raw' ) {
event.content = editor.wpSetImgCaption( event.content );
}
});
editor.on( 'PostProcess', function( event ) {
if ( event.get ) {
event.content = editor.wpGetImgCaption( event.content );
}
});
( function() {
var wrap;
editor.on( 'dragstart', function() {
var node = editor.selection.getNode();
if ( node.nodeName === 'IMG' ) {
wrap = editor.dom.getParent( node, '.mceTemp' );
if ( ! wrap && node.parentNode.nodeName === 'A' && ! hasTextContent( node.parentNode ) ) {
wrap = node.parentNode;
}
}
} );
editor.on( 'drop', function( event ) {
var dom = editor.dom,
rng = tinymce.dom.RangeUtils.getCaretRangeFromPoint( event.clientX, event.clientY, editor.getDoc() );
// Don't allow anything to be dropped in a captioned image.
if ( rng && dom.getParent( rng.startContainer, '.mceTemp' ) ) {
event.preventDefault();
} else if ( wrap ) {
event.preventDefault();
editor.undoManager.transact( function() {
if ( rng ) {
editor.selection.setRng( rng );
}
editor.selection.setNode( wrap );
dom.remove( wrap );
} );
}
wrap = null;
} );
} )();
// Add to editor.wp.
editor.wp = editor.wp || {};
editor.wp.isPlaceholder = isPlaceholder;
// Back-compat.
return {
_do_shcode: parseShortcode,
_get_shcode: getShortcode
};
});

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,134 @@
( function( tinymce ) {
tinymce.PluginManager.add( 'wpemoji', function( editor ) {
var typing,
wp = window.wp,
settings = window._wpemojiSettings,
env = tinymce.Env,
ua = window.navigator.userAgent,
isWin = ua.indexOf( 'Windows' ) > -1,
isWin8 = ( function() {
var match = ua.match( /Windows NT 6\.(\d)/ );
if ( match && match[1] > 1 ) {
return true;
}
return false;
}());
if ( ! wp || ! wp.emoji || settings.supports.everything ) {
return;
}
function setImgAttr( image ) {
image.className = 'emoji';
image.setAttribute( 'data-mce-resize', 'false' );
image.setAttribute( 'data-mce-placeholder', '1' );
image.setAttribute( 'data-wp-emoji', '1' );
}
function replaceEmoji( node ) {
var imgAttr = {
'data-mce-resize': 'false',
'data-mce-placeholder': '1',
'data-wp-emoji': '1'
};
wp.emoji.parse( node, { imgAttr: imgAttr } );
}
// Test if the node text contains emoji char(s) and replace.
function parseNode( node ) {
var selection, bookmark;
if ( node && window.twemoji && window.twemoji.test( node.textContent || node.innerText ) ) {
if ( env.webkit ) {
selection = editor.selection;
bookmark = selection.getBookmark();
}
replaceEmoji( node );
if ( env.webkit ) {
selection.moveToBookmark( bookmark );
}
}
}
if ( isWin8 ) {
/*
* Windows 8+ emoji can be "typed" with the onscreen keyboard.
* That triggers the normal keyboard events, but not the 'input' event.
* Thankfully it sets keyCode 231 when the onscreen keyboard inserts any emoji.
*/
editor.on( 'keyup', function( event ) {
if ( event.keyCode === 231 ) {
parseNode( editor.selection.getNode() );
}
} );
} else if ( ! isWin ) {
/*
* In MacOS inserting emoji doesn't trigger the stanradr keyboard events.
* Thankfully it triggers the 'input' event.
* This works in Android and iOS as well.
*/
editor.on( 'keydown keyup', function( event ) {
typing = ( event.type === 'keydown' );
} );
editor.on( 'input', function() {
if ( typing ) {
return;
}
parseNode( editor.selection.getNode() );
});
}
editor.on( 'setcontent', function( event ) {
var selection = editor.selection,
node = selection.getNode();
if ( window.twemoji && window.twemoji.test( node.textContent || node.innerText ) ) {
replaceEmoji( node );
// In IE all content in the editor is left selected after wp.emoji.parse()...
// Collapse the selection to the beginning.
if ( env.ie && env.ie < 9 && event.load && node && node.nodeName === 'BODY' ) {
selection.collapse( true );
}
}
} );
// Convert Twemoji compatible pasted emoji replacement images into our format.
editor.on( 'PastePostProcess', function( event ) {
if ( window.twemoji ) {
tinymce.each( editor.dom.$( 'img.emoji', event.node ), function( image ) {
if ( image.alt && window.twemoji.test( image.alt ) ) {
setImgAttr( image );
}
});
}
});
editor.on( 'postprocess', function( event ) {
if ( event.content ) {
event.content = event.content.replace( /<img[^>]+data-wp-emoji="[^>]+>/g, function( img ) {
var alt = img.match( /alt="([^"]+)"/ );
if ( alt && alt[1] ) {
return alt[1];
}
return img;
});
}
} );
editor.on( 'resolvename', function( event ) {
if ( event.target.nodeName === 'IMG' && editor.dom.getAttrib( event.target, 'data-wp-emoji' ) ) {
event.preventDefault();
}
} );
} );
} )( window.tinymce );

View file

@ -0,0 +1 @@
!function(m){m.PluginManager.add("wpemoji",function(n){var t,o=window.wp,e=window._wpemojiSettings,i=m.Env,a=window.navigator.userAgent,w=-1<a.indexOf("Windows"),a=!!((a=a.match(/Windows NT 6\.(\d)/))&&1<a[1]);function d(e){o.emoji.parse(e,{imgAttr:{"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"}})}function c(e){var t,o;e&&window.twemoji&&window.twemoji.test(e.textContent||e.innerText)&&(i.webkit&&(o=(t=n.selection).getBookmark()),d(e),i.webkit&&t.moveToBookmark(o))}o&&o.emoji&&!e.supports.everything&&(a?n.on("keyup",function(e){231===e.keyCode&&c(n.selection.getNode())}):w||(n.on("keydown keyup",function(e){t="keydown"===e.type}),n.on("input",function(){t||c(n.selection.getNode())})),n.on("setcontent",function(e){var t=n.selection,o=t.getNode();window.twemoji&&window.twemoji.test(o.textContent||o.innerText)&&(d(o),i.ie&&i.ie<9&&e.load&&o&&"BODY"===o.nodeName&&t.collapse(!0))}),n.on("PastePostProcess",function(e){window.twemoji&&m.each(n.dom.$("img.emoji",e.node),function(e){e.alt&&window.twemoji.test(e.alt)&&((e=e).className="emoji",e.setAttribute("data-mce-resize","false"),e.setAttribute("data-mce-placeholder","1"),e.setAttribute("data-wp-emoji","1"))})}),n.on("postprocess",function(e){e.content&&(e.content=e.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(e){var t=e.match(/alt="([^"]+)"/);return t&&t[1]?t[1]:e}))}),n.on("resolvename",function(e){"IMG"===e.target.nodeName&&n.dom.getAttrib(e.target,"data-wp-emoji")&&e.preventDefault()}))})}(window.tinymce);

View file

@ -0,0 +1,112 @@
/* global tinymce */
tinymce.PluginManager.add('wpgallery', function( editor ) {
function replaceGalleryShortcodes( content ) {
return content.replace( /\[gallery([^\]]*)\]/g, function( match ) {
return html( 'wp-gallery', match );
});
}
function html( cls, data ) {
data = window.encodeURIComponent( data );
return '<img src="' + tinymce.Env.transparentSrc + '" class="wp-media mceItem ' + cls + '" ' +
'data-wp-media="' + data + '" data-mce-resize="false" data-mce-placeholder="1" alt="" />';
}
function restoreMediaShortcodes( content ) {
function getAttr( str, name ) {
name = new RegExp( name + '=\"([^\"]+)\"' ).exec( str );
return name ? window.decodeURIComponent( name[1] ) : '';
}
return content.replace( /(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g, function( match, image ) {
var data = getAttr( image, 'data-wp-media' );
if ( data ) {
return '<p>' + data + '</p>';
}
return match;
});
}
function editMedia( node ) {
var gallery, frame, data;
if ( node.nodeName !== 'IMG' ) {
return;
}
// Check if the `wp.media` API exists.
if ( typeof wp === 'undefined' || ! wp.media ) {
return;
}
data = window.decodeURIComponent( editor.dom.getAttrib( node, 'data-wp-media' ) );
// Make sure we've selected a gallery node.
if ( editor.dom.hasClass( node, 'wp-gallery' ) && wp.media.gallery ) {
gallery = wp.media.gallery;
frame = gallery.edit( data );
frame.state('gallery-edit').on( 'update', function( selection ) {
var shortcode = gallery.shortcode( selection ).string();
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
frame.detach();
});
}
}
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...').
editor.addCommand( 'WP_Gallery', function() {
editMedia( editor.selection.getNode() );
});
editor.on( 'mouseup', function( event ) {
var dom = editor.dom,
node = event.target;
function unselect() {
dom.removeClass( dom.select( 'img.wp-media-selected' ), 'wp-media-selected' );
}
if ( node.nodeName === 'IMG' && dom.getAttrib( node, 'data-wp-media' ) ) {
// Don't trigger on right-click.
if ( event.button !== 2 ) {
if ( dom.hasClass( node, 'wp-media-selected' ) ) {
editMedia( node );
} else {
unselect();
dom.addClass( node, 'wp-media-selected' );
}
}
} else {
unselect();
}
});
// Display gallery, audio or video instead of img in the element path.
editor.on( 'ResolveName', function( event ) {
var dom = editor.dom,
node = event.target;
if ( node.nodeName === 'IMG' && dom.getAttrib( node, 'data-wp-media' ) ) {
if ( dom.hasClass( node, 'wp-gallery' ) ) {
event.name = 'gallery';
}
}
});
editor.on( 'BeforeSetContent', function( event ) {
// 'wpview' handles the gallery shortcode when present.
if ( ! editor.plugins.wpview || typeof wp === 'undefined' || ! wp.mce ) {
event.content = replaceGalleryShortcodes( event.content );
}
});
editor.on( 'PostProcess', function( event ) {
if ( event.get ) {
event.content = restoreMediaShortcodes( event.content );
}
});
});

View file

@ -0,0 +1 @@
tinymce.PluginManager.add("wpgallery",function(d){function t(e){return e.replace(/\[gallery([^\]]*)\]/g,function(e){return t="wp-gallery",n=e,n=window.encodeURIComponent(e),'<img src="'+tinymce.Env.transparentSrc+'" class="wp-media mceItem '+t+'" data-wp-media="'+n+'" data-mce-resize="false" data-mce-placeholder="1" alt="" />';var t,n})}function n(e){return e.replace(/(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g,function(e,t){var n,t=(n=t,t="data-wp-media",(t=new RegExp(t+'="([^"]+)"').exec(n))?window.decodeURIComponent(t[1]):"");return t?"<p>"+t+"</p>":e})}function o(t){var n,a,e;"IMG"===t.nodeName&&"undefined"!=typeof wp&&wp.media&&(e=window.decodeURIComponent(d.dom.getAttrib(t,"data-wp-media")),d.dom.hasClass(t,"wp-gallery")&&wp.media.gallery&&(n=wp.media.gallery,(a=n.edit(e)).state("gallery-edit").on("update",function(e){e=n.shortcode(e).string();d.dom.setAttrib(t,"data-wp-media",window.encodeURIComponent(e)),a.detach()})))}d.addCommand("WP_Gallery",function(){o(d.selection.getNode())}),d.on("mouseup",function(e){var t=d.dom,n=e.target;function a(){t.removeClass(t.select("img.wp-media-selected"),"wp-media-selected")}"IMG"===n.nodeName&&t.getAttrib(n,"data-wp-media")?2!==e.button&&(t.hasClass(n,"wp-media-selected")?o(n):(a(),t.addClass(n,"wp-media-selected"))):a()}),d.on("ResolveName",function(e){var t=d.dom,n=e.target;"IMG"===n.nodeName&&t.getAttrib(n,"data-wp-media")&&t.hasClass(n,"wp-gallery")&&(e.name="gallery")}),d.on("BeforeSetContent",function(e){d.plugins.wpview&&"undefined"!=typeof wp&&wp.mce||(e.content=t(e.content))}),d.on("PostProcess",function(e){e.get&&(e.content=n(e.content))})});

View file

@ -0,0 +1,610 @@
( function( tinymce ) {
tinymce.ui.Factory.add( 'WPLinkPreview', tinymce.ui.Control.extend( {
url: '#',
renderHtml: function() {
return (
'<div id="' + this._id + '" class="wp-link-preview">' +
'<a href="' + this.url + '" target="_blank" rel="noopener" tabindex="-1">' + this.url + '</a>' +
'</div>'
);
},
setURL: function( url ) {
var index, lastIndex;
if ( this.url !== url ) {
this.url = url;
url = window.decodeURIComponent( url );
url = url.replace( /^(?:https?:)?\/\/(?:www\.)?/, '' );
if ( ( index = url.indexOf( '?' ) ) !== -1 ) {
url = url.slice( 0, index );
}
if ( ( index = url.indexOf( '#' ) ) !== -1 ) {
url = url.slice( 0, index );
}
url = url.replace( /(?:index)?\.html$/, '' );
if ( url.charAt( url.length - 1 ) === '/' ) {
url = url.slice( 0, -1 );
}
// If nothing's left (maybe the URL was just a fragment), use the whole URL.
if ( url === '' ) {
url = this.url;
}
// If the URL is longer that 40 chars, concatenate the beginning (after the domain) and ending with '...'.
if ( url.length > 40 && ( index = url.indexOf( '/' ) ) !== -1 && ( lastIndex = url.lastIndexOf( '/' ) ) !== -1 && lastIndex !== index ) {
// If the beginning + ending are shorter that 40 chars, show more of the ending.
if ( index + url.length - lastIndex < 40 ) {
lastIndex = -( 40 - ( index + 1 ) );
}
url = url.slice( 0, index + 1 ) + '\u2026' + url.slice( lastIndex );
}
tinymce.$( this.getEl().firstChild ).attr( 'href', this.url ).text( url );
}
}
} ) );
tinymce.ui.Factory.add( 'WPLinkInput', tinymce.ui.Control.extend( {
renderHtml: function() {
return (
'<div id="' + this._id + '" class="wp-link-input">' +
'<input type="text" value="" placeholder="' + tinymce.translate( 'Paste URL or type to search' ) + '" />' +
'<input type="text" style="display:none" value="" />' +
'</div>'
);
},
setURL: function( url ) {
this.getEl().firstChild.value = url;
},
getURL: function() {
return tinymce.trim( this.getEl().firstChild.value );
},
getLinkText: function() {
var text = this.getEl().firstChild.nextSibling.value;
if ( ! tinymce.trim( text ) ) {
return '';
}
return text.replace( /[\r\n\t ]+/g, ' ' );
},
reset: function() {
var urlInput = this.getEl().firstChild;
urlInput.value = '';
urlInput.nextSibling.value = '';
}
} ) );
tinymce.PluginManager.add( 'wplink', function( editor ) {
var toolbar;
var editToolbar;
var previewInstance;
var inputInstance;
var linkNode;
var doingUndoRedo;
var doingUndoRedoTimer;
var $ = window.jQuery;
var emailRegex = /^(mailto:)?[a-z0-9._%+-]+@[a-z0-9][a-z0-9.-]*\.[a-z]{2,63}$/i;
var urlRegex1 = /^https?:\/\/([^\s/?.#-][^\s\/?.#]*\.?)+(\/[^\s"]*)?$/i;
var urlRegex2 = /^https?:\/\/[^\/]+\.[^\/]+($|\/)/i;
var speak = ( typeof window.wp !== 'undefined' && window.wp.a11y && window.wp.a11y.speak ) ? window.wp.a11y.speak : function() {};
var hasLinkError = false;
function getSelectedLink() {
var href, html,
node = editor.selection.getStart(),
link = editor.dom.getParent( node, 'a[href]' );
if ( ! link ) {
html = editor.selection.getContent({ format: 'raw' });
if ( html && html.indexOf( '</a>' ) !== -1 ) {
href = html.match( /href="([^">]+)"/ );
if ( href && href[1] ) {
link = editor.$( 'a[href="' + href[1] + '"]', node )[0];
}
if ( link ) {
editor.selection.select( link );
}
}
}
return link;
}
function removePlaceholders() {
editor.$( 'a' ).each( function( i, element ) {
var $element = editor.$( element );
if ( $element.attr( 'href' ) === '_wp_link_placeholder' ) {
editor.dom.remove( element, true );
} else if ( $element.attr( 'data-wplink-edit' ) ) {
$element.attr( 'data-wplink-edit', null );
}
});
}
function removePlaceholderStrings( content, dataAttr ) {
return content.replace( /(<a [^>]+>)([\s\S]*?)<\/a>/g, function( all, tag, text ) {
if ( tag.indexOf( ' href="_wp_link_placeholder"' ) > -1 ) {
return text;
}
if ( dataAttr ) {
tag = tag.replace( / data-wplink-edit="true"/g, '' );
}
tag = tag.replace( / data-wplink-url-error="true"/g, '' );
return tag + text + '</a>';
});
}
function checkLink( node ) {
var $link = editor.$( node );
var href = $link.attr( 'href' );
if ( ! href || typeof $ === 'undefined' ) {
return;
}
hasLinkError = false;
if ( /^http/i.test( href ) && ( ! urlRegex1.test( href ) || ! urlRegex2.test( href ) ) ) {
hasLinkError = true;
$link.attr( 'data-wplink-url-error', 'true' );
speak( editor.translate( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'assertive' );
} else {
$link.removeAttr( 'data-wplink-url-error' );
}
}
editor.on( 'preinit', function() {
if ( editor.wp && editor.wp._createToolbar ) {
toolbar = editor.wp._createToolbar( [
'wp_link_preview',
'wp_link_edit',
'wp_link_remove'
], true );
var editButtons = [
'wp_link_input',
'wp_link_apply'
];
if ( typeof window.wpLink !== 'undefined' ) {
editButtons.push( 'wp_link_advanced' );
}
editToolbar = editor.wp._createToolbar( editButtons, true );
editToolbar.on( 'show', function() {
if ( typeof window.wpLink === 'undefined' || ! window.wpLink.modalOpen ) {
window.setTimeout( function() {
var element = editToolbar.$el.find( 'input.ui-autocomplete-input' )[0],
selection = linkNode && ( linkNode.textContent || linkNode.innerText );
if ( element ) {
if ( ! element.value && selection && typeof window.wpLink !== 'undefined' ) {
element.value = window.wpLink.getUrlFromSelection( selection );
}
if ( ! doingUndoRedo ) {
element.focus();
element.select();
}
}
} );
}
} );
editToolbar.on( 'hide', function() {
if ( ! editToolbar.scrolling ) {
editor.execCommand( 'wp_link_cancel' );
}
} );
}
} );
editor.addCommand( 'WP_Link', function() {
if ( tinymce.Env.ie && tinymce.Env.ie < 10 && typeof window.wpLink !== 'undefined' ) {
window.wpLink.open( editor.id );
return;
}
linkNode = getSelectedLink();
editToolbar.tempHide = false;
if ( ! linkNode ) {
removePlaceholders();
editor.execCommand( 'mceInsertLink', false, { href: '_wp_link_placeholder' } );
linkNode = editor.$( 'a[href="_wp_link_placeholder"]' )[0];
editor.nodeChanged();
}
editor.dom.setAttribs( linkNode, { 'data-wplink-edit': true } );
} );
editor.addCommand( 'wp_link_apply', function() {
if ( editToolbar.scrolling ) {
return;
}
var href, text;
if ( linkNode ) {
href = inputInstance.getURL();
text = inputInstance.getLinkText();
editor.focus();
var parser = document.createElement( 'a' );
parser.href = href;
if ( 'javascript:' === parser.protocol || 'data:' === parser.protocol ) { // jshint ignore:line
href = '';
}
if ( ! href ) {
editor.dom.remove( linkNode, true );
return;
}
if ( ! /^(?:[a-z]+:|#|\?|\.|\/)/.test( href ) && ! emailRegex.test( href ) ) {
href = 'http://' + href;
}
editor.dom.setAttribs( linkNode, { href: href, 'data-wplink-edit': null } );
if ( ! tinymce.trim( linkNode.innerHTML ) ) {
editor.$( linkNode ).text( text || href );
}
checkLink( linkNode );
}
inputInstance.reset();
editor.nodeChanged();
// Audible confirmation message when a link has been inserted in the Editor.
if ( typeof window.wpLinkL10n !== 'undefined' && ! hasLinkError ) {
speak( window.wpLinkL10n.linkInserted );
}
} );
editor.addCommand( 'wp_link_cancel', function() {
inputInstance.reset();
if ( ! editToolbar.tempHide ) {
removePlaceholders();
}
} );
editor.addCommand( 'wp_unlink', function() {
editor.execCommand( 'unlink' );
editToolbar.tempHide = false;
editor.execCommand( 'wp_link_cancel' );
} );
// WP default shortcuts.
editor.addShortcut( 'access+a', '', 'WP_Link' );
editor.addShortcut( 'access+s', '', 'wp_unlink' );
// The "de-facto standard" shortcut, see #27305.
editor.addShortcut( 'meta+k', '', 'WP_Link' );
editor.addButton( 'link', {
icon: 'link',
tooltip: 'Insert/edit link',
cmd: 'WP_Link',
stateSelector: 'a[href]'
});
editor.addButton( 'unlink', {
icon: 'unlink',
tooltip: 'Remove link',
cmd: 'unlink'
});
editor.addMenuItem( 'link', {
icon: 'link',
text: 'Insert/edit link',
cmd: 'WP_Link',
stateSelector: 'a[href]',
context: 'insert',
prependToContext: true
});
editor.on( 'pastepreprocess', function( event ) {
var pastedStr = event.content,
regExp = /^(?:https?:)?\/\/\S+$/i;
if ( ! editor.selection.isCollapsed() && ! regExp.test( editor.selection.getContent() ) ) {
pastedStr = pastedStr.replace( /<[^>]+>/g, '' );
pastedStr = tinymce.trim( pastedStr );
if ( regExp.test( pastedStr ) ) {
editor.execCommand( 'mceInsertLink', false, {
href: editor.dom.decode( pastedStr )
} );
event.preventDefault();
}
}
} );
// Remove any remaining placeholders on saving.
editor.on( 'savecontent', function( event ) {
event.content = removePlaceholderStrings( event.content, true );
});
// Prevent adding undo levels on inserting link placeholder.
editor.on( 'BeforeAddUndo', function( event ) {
if ( event.lastLevel && event.lastLevel.content && event.level.content &&
event.lastLevel.content === removePlaceholderStrings( event.level.content ) ) {
event.preventDefault();
}
});
// When doing undo and redo with keyboard shortcuts (Ctrl|Cmd+Z, Ctrl|Cmd+Shift+Z, Ctrl|Cmd+Y),
// set a flag to not focus the inline dialog. The editor has to remain focused so the users can do consecutive undo/redo.
editor.on( 'keydown', function( event ) {
if ( event.keyCode === 27 ) { // Esc
editor.execCommand( 'wp_link_cancel' );
}
if ( event.altKey || ( tinymce.Env.mac && ( ! event.metaKey || event.ctrlKey ) ) ||
( ! tinymce.Env.mac && ! event.ctrlKey ) ) {
return;
}
if ( event.keyCode === 89 || event.keyCode === 90 ) { // Y or Z
doingUndoRedo = true;
window.clearTimeout( doingUndoRedoTimer );
doingUndoRedoTimer = window.setTimeout( function() {
doingUndoRedo = false;
}, 500 );
}
} );
editor.addButton( 'wp_link_preview', {
type: 'WPLinkPreview',
onPostRender: function() {
previewInstance = this;
}
} );
editor.addButton( 'wp_link_input', {
type: 'WPLinkInput',
onPostRender: function() {
var element = this.getEl(),
input = element.firstChild,
$input, cache, last;
inputInstance = this;
if ( $ && $.ui && $.ui.autocomplete ) {
$input = $( input );
$input.on( 'keydown', function() {
$input.removeAttr( 'aria-activedescendant' );
} )
.autocomplete( {
source: function( request, response ) {
if ( last === request.term ) {
response( cache );
return;
}
if ( /^https?:/.test( request.term ) || request.term.indexOf( '.' ) !== -1 ) {
return response();
}
$.post( window.ajaxurl, {
action: 'wp-link-ajax',
page: 1,
search: request.term,
_ajax_linking_nonce: $( '#_ajax_linking_nonce' ).val()
}, function( data ) {
cache = data;
response( data );
}, 'json' );
last = request.term;
},
focus: function( event, ui ) {
$input.attr( 'aria-activedescendant', 'mce-wp-autocomplete-' + ui.item.ID );
/*
* Don't empty the URL input field, when using the arrow keys to
* highlight items. See api.jqueryui.com/autocomplete/#event-focus
*/
event.preventDefault();
},
select: function( event, ui ) {
$input.val( ui.item.permalink );
$( element.firstChild.nextSibling ).val( ui.item.title );
if ( 9 === event.keyCode && typeof window.wpLinkL10n !== 'undefined' ) {
// Audible confirmation message when a link has been selected.
speak( window.wpLinkL10n.linkSelected );
}
return false;
},
open: function() {
$input.attr( 'aria-expanded', 'true' );
editToolbar.blockHide = true;
},
close: function() {
$input.attr( 'aria-expanded', 'false' );
editToolbar.blockHide = false;
},
minLength: 2,
position: {
my: 'left top+2'
},
messages: {
noResults: ( typeof window.uiAutocompleteL10n !== 'undefined' ) ? window.uiAutocompleteL10n.noResults : '',
results: function( number ) {
if ( typeof window.uiAutocompleteL10n !== 'undefined' ) {
if ( number > 1 ) {
return window.uiAutocompleteL10n.manyResults.replace( '%d', number );
}
return window.uiAutocompleteL10n.oneResult;
}
}
}
} ).autocomplete( 'instance' )._renderItem = function( ul, item ) {
var fallbackTitle = ( typeof window.wpLinkL10n !== 'undefined' ) ? window.wpLinkL10n.noTitle : '',
title = item.title ? item.title : fallbackTitle;
return $( '<li role="option" id="mce-wp-autocomplete-' + item.ID + '">' )
.append( '<span>' + title + '</span>&nbsp;<span class="wp-editor-float-right">' + item.info + '</span>' )
.appendTo( ul );
};
$input.attr( {
'role': 'combobox',
'aria-autocomplete': 'list',
'aria-expanded': 'false',
'aria-owns': $input.autocomplete( 'widget' ).attr( 'id' )
} )
.on( 'focus', function() {
var inputValue = $input.val();
/*
* Don't trigger a search if the URL field already has a link or is empty.
* Also, avoids screen readers announce `No search results`.
*/
if ( inputValue && ! /^https?:/.test( inputValue ) ) {
$input.autocomplete( 'search' );
}
} )
// Returns a jQuery object containing the menu element.
.autocomplete( 'widget' )
.addClass( 'wplink-autocomplete' )
.attr( 'role', 'listbox' )
.removeAttr( 'tabindex' ) // Remove the `tabindex=0` attribute added by jQuery UI.
/*
* Looks like Safari and VoiceOver need an `aria-selected` attribute. See ticket #33301.
* The `menufocus` and `menublur` events are the same events used to add and remove
* the `ui-state-focus` CSS class on the menu items. See jQuery UI Menu Widget.
*/
.on( 'menufocus', function( event, ui ) {
ui.item.attr( 'aria-selected', 'true' );
})
.on( 'menublur', function() {
/*
* The `menublur` event returns an object where the item is `null`
* so we need to find the active item with other means.
*/
$( this ).find( '[aria-selected="true"]' ).removeAttr( 'aria-selected' );
});
}
tinymce.$( input ).on( 'keydown', function( event ) {
if ( event.keyCode === 13 ) {
editor.execCommand( 'wp_link_apply' );
event.preventDefault();
}
} );
}
} );
editor.on( 'wptoolbar', function( event ) {
var linkNode = editor.dom.getParent( event.element, 'a' ),
$linkNode, href, edit;
if ( typeof window.wpLink !== 'undefined' && window.wpLink.modalOpen ) {
editToolbar.tempHide = true;
return;
}
editToolbar.tempHide = false;
if ( linkNode ) {
$linkNode = editor.$( linkNode );
href = $linkNode.attr( 'href' );
edit = $linkNode.attr( 'data-wplink-edit' );
if ( href === '_wp_link_placeholder' || edit ) {
if ( href !== '_wp_link_placeholder' && ! inputInstance.getURL() ) {
inputInstance.setURL( href );
}
event.element = linkNode;
event.toolbar = editToolbar;
} else if ( href && ! $linkNode.find( 'img' ).length ) {
previewInstance.setURL( href );
event.element = linkNode;
event.toolbar = toolbar;
if ( $linkNode.attr( 'data-wplink-url-error' ) === 'true' ) {
toolbar.$el.find( '.wp-link-preview a' ).addClass( 'wplink-url-error' );
} else {
toolbar.$el.find( '.wp-link-preview a' ).removeClass( 'wplink-url-error' );
hasLinkError = false;
}
}
} else if ( editToolbar.visible() ) {
editor.execCommand( 'wp_link_cancel' );
}
} );
editor.addButton( 'wp_link_edit', {
tooltip: 'Edit|button', // '|button' is not displayed, only used for context.
icon: 'dashicon dashicons-edit',
cmd: 'WP_Link'
} );
editor.addButton( 'wp_link_remove', {
tooltip: 'Remove link',
icon: 'dashicon dashicons-editor-unlink',
cmd: 'wp_unlink'
} );
editor.addButton( 'wp_link_advanced', {
tooltip: 'Link options',
icon: 'dashicon dashicons-admin-generic',
onclick: function() {
if ( typeof window.wpLink !== 'undefined' ) {
var url = inputInstance.getURL() || null,
text = inputInstance.getLinkText() || null;
window.wpLink.open( editor.id, url, text );
editToolbar.tempHide = true;
editToolbar.hide();
}
}
} );
editor.addButton( 'wp_link_apply', {
tooltip: 'Apply',
icon: 'dashicon dashicons-editor-break',
cmd: 'wp_link_apply',
classes: 'widget btn primary'
} );
return {
close: function() {
editToolbar.tempHide = false;
editor.execCommand( 'wp_link_cancel' );
},
checkLink: checkLink
};
} );
} )( window.tinymce );

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,348 @@
/**
* Text pattern plugin for TinyMCE
*
* @since 4.3.0
*
* This plugin can automatically format text patterns as you type. It includes several groups of patterns.
*
* Start of line patterns:
* As-you-type:
* - Unordered list (`* ` and `- `).
* - Ordered list (`1. ` and `1) `).
*
* On enter:
* - h2 (## ).
* - h3 (### ).
* - h4 (#### ).
* - h5 (##### ).
* - h6 (###### ).
* - blockquote (> ).
* - hr (---).
*
* Inline patterns:
* - <code> (`) (backtick).
*
* If the transformation in unwanted, the user can undo the change by pressing backspace,
* using the undo shortcut, or the undo button in the toolbar.
*
* Setting for the patterns can be overridden by plugins by using the `tiny_mce_before_init` PHP filter.
* The setting name is `wptextpattern` and the value is an object containing override arrays for each
* patterns group. There are three groups: "space", "enter", and "inline". Example (PHP):
*
* add_filter( 'tiny_mce_before_init', 'my_mce_init_wptextpattern' );
* function my_mce_init_wptextpattern( $init ) {
* $init['wptextpattern'] = wp_json_encode( array(
* 'inline' => array(
* array( 'delimiter' => '**', 'format' => 'bold' ),
* array( 'delimiter' => '__', 'format' => 'italic' ),
* ),
* ) );
*
* return $init;
* }
*
* Note that setting this will override the default text patterns. You will need to include them
* in your settings array if you want to keep them working.
*/
( function( tinymce, setTimeout ) {
if ( tinymce.Env.ie && tinymce.Env.ie < 9 ) {
return;
}
/**
* Escapes characters for use in a Regular Expression.
*
* @param {String} string Characters to escape
*
* @return {String} Escaped characters
*/
function escapeRegExp( string ) {
return string.replace( /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&' );
}
tinymce.PluginManager.add( 'wptextpattern', function( editor ) {
var VK = tinymce.util.VK;
var settings = editor.settings.wptextpattern || {};
var spacePatterns = settings.space || [
{ regExp: /^[*-]\s/, cmd: 'InsertUnorderedList' },
{ regExp: /^1[.)]\s/, cmd: 'InsertOrderedList' }
];
var enterPatterns = settings.enter || [
{ start: '##', format: 'h2' },
{ start: '###', format: 'h3' },
{ start: '####', format: 'h4' },
{ start: '#####', format: 'h5' },
{ start: '######', format: 'h6' },
{ start: '>', format: 'blockquote' },
{ regExp: /^(-){3,}$/, element: 'hr' }
];
var inlinePatterns = settings.inline || [
{ delimiter: '`', format: 'code' }
];
var canUndo;
editor.on( 'selectionchange', function() {
canUndo = null;
} );
editor.on( 'keydown', function( event ) {
if ( ( canUndo && event.keyCode === 27 /* ESCAPE */ ) || ( canUndo === 'space' && event.keyCode === VK.BACKSPACE ) ) {
editor.undoManager.undo();
event.preventDefault();
event.stopImmediatePropagation();
}
if ( VK.metaKeyPressed( event ) ) {
return;
}
if ( event.keyCode === VK.ENTER ) {
enter();
// Wait for the browser to insert the character.
} else if ( event.keyCode === VK.SPACEBAR ) {
setTimeout( space );
} else if ( event.keyCode > 47 && ! ( event.keyCode >= 91 && event.keyCode <= 93 ) ) {
setTimeout( inline );
}
}, true );
function inline() {
var rng = editor.selection.getRng();
var node = rng.startContainer;
var offset = rng.startOffset;
var startOffset;
var endOffset;
var pattern;
var format;
var zero;
// We need a non-empty text node with an offset greater than zero.
if ( ! node || node.nodeType !== 3 || ! node.data.length || ! offset ) {
return;
}
var string = node.data.slice( 0, offset );
var lastChar = node.data.charAt( offset - 1 );
tinymce.each( inlinePatterns, function( p ) {
// Character before selection should be delimiter.
if ( lastChar !== p.delimiter.slice( -1 ) ) {
return;
}
var escDelimiter = escapeRegExp( p.delimiter );
var delimiterFirstChar = p.delimiter.charAt( 0 );
var regExp = new RegExp( '(.*)' + escDelimiter + '.+' + escDelimiter + '$' );
var match = string.match( regExp );
if ( ! match ) {
return;
}
startOffset = match[1].length;
endOffset = offset - p.delimiter.length;
var before = string.charAt( startOffset - 1 );
var after = string.charAt( startOffset + p.delimiter.length );
// test*test* => format applied.
// test *test* => applied.
// test* test* => not applied.
if ( startOffset && /\S/.test( before ) ) {
if ( /\s/.test( after ) || before === delimiterFirstChar ) {
return;
}
}
// Do not replace when only whitespace and delimiter characters.
if ( ( new RegExp( '^[\\s' + escapeRegExp( delimiterFirstChar ) + ']+$' ) ).test( string.slice( startOffset, endOffset ) ) ) {
return;
}
pattern = p;
return false;
} );
if ( ! pattern ) {
return;
}
format = editor.formatter.get( pattern.format );
if ( format && format[0].inline ) {
editor.undoManager.add();
editor.undoManager.transact( function() {
node.insertData( offset, '\uFEFF' );
node = node.splitText( startOffset );
zero = node.splitText( offset - startOffset );
node.deleteData( 0, pattern.delimiter.length );
node.deleteData( node.data.length - pattern.delimiter.length, pattern.delimiter.length );
editor.formatter.apply( pattern.format, {}, node );
editor.selection.setCursorLocation( zero, 1 );
} );
// We need to wait for native events to be triggered.
setTimeout( function() {
canUndo = 'space';
editor.once( 'selectionchange', function() {
var offset;
if ( zero ) {
offset = zero.data.indexOf( '\uFEFF' );
if ( offset !== -1 ) {
zero.deleteData( offset, offset + 1 );
}
}
} );
} );
}
}
function firstTextNode( node ) {
var parent = editor.dom.getParent( node, 'p' ),
child;
if ( ! parent ) {
return;
}
while ( child = parent.firstChild ) {
if ( child.nodeType !== 3 ) {
parent = child;
} else {
break;
}
}
if ( ! child ) {
return;
}
if ( ! child.data ) {
if ( child.nextSibling && child.nextSibling.nodeType === 3 ) {
child = child.nextSibling;
} else {
child = null;
}
}
return child;
}
function space() {
var rng = editor.selection.getRng(),
node = rng.startContainer,
parent,
text;
if ( ! node || firstTextNode( node ) !== node ) {
return;
}
parent = node.parentNode;
text = node.data;
tinymce.each( spacePatterns, function( pattern ) {
var match = text.match( pattern.regExp );
if ( ! match || rng.startOffset !== match[0].length ) {
return;
}
editor.undoManager.add();
editor.undoManager.transact( function() {
node.deleteData( 0, match[0].length );
if ( ! parent.innerHTML ) {
parent.appendChild( document.createElement( 'br' ) );
}
editor.selection.setCursorLocation( parent );
editor.execCommand( pattern.cmd );
} );
// We need to wait for native events to be triggered.
setTimeout( function() {
canUndo = 'space';
} );
return false;
} );
}
function enter() {
var rng = editor.selection.getRng(),
start = rng.startContainer,
node = firstTextNode( start ),
i = enterPatterns.length,
text, pattern, parent;
if ( ! node ) {
return;
}
text = node.data;
while ( i-- ) {
if ( enterPatterns[ i ].start ) {
if ( text.indexOf( enterPatterns[ i ].start ) === 0 ) {
pattern = enterPatterns[ i ];
break;
}
} else if ( enterPatterns[ i ].regExp ) {
if ( enterPatterns[ i ].regExp.test( text ) ) {
pattern = enterPatterns[ i ];
break;
}
}
}
if ( ! pattern ) {
return;
}
if ( node === start && tinymce.trim( text ) === pattern.start ) {
return;
}
editor.once( 'keyup', function() {
editor.undoManager.add();
editor.undoManager.transact( function() {
if ( pattern.format ) {
editor.formatter.apply( pattern.format, {}, node );
node.replaceData( 0, node.data.length, ltrim( node.data.slice( pattern.start.length ) ) );
} else if ( pattern.element ) {
parent = node.parentNode && node.parentNode.parentNode;
if ( parent ) {
parent.replaceChild( document.createElement( pattern.element ), node.parentNode );
}
}
} );
// We need to wait for native events to be triggered.
setTimeout( function() {
canUndo = 'enter';
} );
} );
}
function ltrim( text ) {
return text ? text.replace( /^\s+/, '' ) : '';
}
} );
} )( window.tinymce, window.setTimeout );

View file

@ -0,0 +1 @@
!function(u,m){function p(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}u.Env.ie&&u.Env.ie<9||u.PluginManager.add("wptextpattern",function(s){var f,t=u.util.VK,e=s.settings.wptextpattern||{},o=e.space||[{regExp:/^[*-]\s/,cmd:"InsertUnorderedList"},{regExp:/^1[.)]\s/,cmd:"InsertOrderedList"}],d=e.enter||[{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:">",format:"blockquote"},{regExp:/^(-){3,}$/,element:"hr"}],g=e.inline||[{delimiter:"`",format:"code"}];function n(){var r,i,o,e,t,d,l,n=s.selection.getRng(),a=n.startContainer,c=n.startOffset;a&&3===a.nodeType&&a.data.length&&c&&(d=a.data.slice(0,c),l=a.data.charAt(c-1),u.each(g,function(e){if(l===e.delimiter.slice(-1)){var t=p(e.delimiter),n=e.delimiter.charAt(0),a=new RegExp("(.*)"+t+".+"+t+"$"),t=d.match(a);if(t){r=t[1].length,i=c-e.delimiter.length;a=d.charAt(r-1),t=d.charAt(r+e.delimiter.length);if(!(r&&/\S/.test(a)&&(/\s/.test(t)||a===n)||new RegExp("^[\\s"+p(n)+"]+$").test(d.slice(r,i))))return o=e,!1}}}),o&&(e=s.formatter.get(o.format))&&e[0].inline&&(s.undoManager.add(),s.undoManager.transact(function(){a.insertData(c,"\ufeff"),a=a.splitText(r),t=a.splitText(c-r),a.deleteData(0,o.delimiter.length),a.deleteData(a.data.length-o.delimiter.length,o.delimiter.length),s.formatter.apply(o.format,{},a),s.selection.setCursorLocation(t,1)}),m(function(){f="space",s.once("selectionchange",function(){var e;t&&-1!==(e=t.data.indexOf("\ufeff"))&&t.deleteData(e,e+1)})})))}function l(e){var t,n=s.dom.getParent(e,"p");if(n){for(;(t=n.firstChild)&&3!==t.nodeType;)n=t;if(t)return t=!t.data?t.nextSibling&&3===t.nextSibling.nodeType?t.nextSibling:null:t}}function a(){var n,a,r=s.selection.getRng(),i=r.startContainer;i&&l(i)===i&&(n=i.parentNode,a=i.data,u.each(o,function(e){var t=a.match(e.regExp);if(t&&r.startOffset===t[0].length)return s.undoManager.add(),s.undoManager.transact(function(){i.deleteData(0,t[0].length),n.innerHTML||n.appendChild(document.createElement("br")),s.selection.setCursorLocation(n),s.execCommand(e.cmd)}),m(function(){f="space"}),!1}))}s.on("selectionchange",function(){f=null}),s.on("keydown",function(e){(f&&27===e.keyCode||"space"===f&&e.keyCode===t.BACKSPACE)&&(s.undoManager.undo(),e.preventDefault(),e.stopImmediatePropagation()),t.metaKeyPressed(e)||(e.keyCode===t.ENTER?function(){var e,t,n,a=s.selection.getRng().startContainer,r=l(a),i=d.length;if(r){for(e=r.data;i--;)if(d[i].start){if(0===e.indexOf(d[i].start)){t=d[i];break}}else if(d[i].regExp&&d[i].regExp.test(e)){t=d[i];break}t&&(r===a&&u.trim(e)===t.start||s.once("keyup",function(){s.undoManager.add(),s.undoManager.transact(function(){var e;t.format?(s.formatter.apply(t.format,{},r),r.replaceData(0,r.data.length,(e=r.data.slice(t.start.length))?e.replace(/^\s+/,""):"")):t.element&&(n=r.parentNode&&r.parentNode.parentNode)&&n.replaceChild(document.createElement(t.element),r.parentNode)}),m(function(){f="enter"})}))}}():e.keyCode===t.SPACEBAR?m(a):47<e.keyCode&&!(91<=e.keyCode&&e.keyCode<=93)&&m(n))},!0)})}(window.tinymce,window.setTimeout);

View file

@ -0,0 +1,225 @@
/**
* WordPress View plugin.
*/
( function( tinymce ) {
tinymce.PluginManager.add( 'wpview', function( editor ) {
function noop () {}
// Set this here as wp-tinymce.js may be loaded too early.
var wp = window.wp;
if ( ! wp || ! wp.mce || ! wp.mce.views ) {
return {
getView: noop
};
}
// Check if a node is a view or not.
function isView( node ) {
return editor.dom.hasClass( node, 'wpview' );
}
// Replace view tags with their text.
function resetViews( content ) {
function callback( match, $1 ) {
return '<p>' + window.decodeURIComponent( $1 ) + '</p>';
}
if ( ! content || content.indexOf( ' data-wpview-' ) === -1 ) {
return content;
}
return content
.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g, callback )
.replace( /<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, callback );
}
editor.on( 'init', function() {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
if ( MutationObserver ) {
new MutationObserver( function() {
editor.fire( 'wp-body-class-change' );
} )
.observe( editor.getBody(), {
attributes: true,
attributeFilter: ['class']
} );
}
// Pass on body class name changes from the editor to the wpView iframes.
editor.on( 'wp-body-class-change', function() {
var className = editor.getBody().className;
editor.$( 'iframe[class="wpview-sandbox"]' ).each( function( i, iframe ) {
// Make sure it is a local iframe.
// jshint scripturl: true
if ( ! iframe.src || iframe.src === 'javascript:""' ) {
try {
iframe.contentWindow.document.body.className = className;
} catch( er ) {}
}
});
} );
});
// Scan new content for matching view patterns and replace them with markers.
editor.on( 'beforesetcontent', function( event ) {
var node;
if ( ! event.selection ) {
wp.mce.views.unbind();
}
if ( ! event.content ) {
return;
}
if ( ! event.load ) {
node = editor.selection.getNode();
if ( node && node !== editor.getBody() && /^\s*https?:\/\/\S+\s*$/i.test( event.content ) ) {
// When a url is pasted or inserted, only try to embed it when it is in an empty paragraph.
node = editor.dom.getParent( node, 'p' );
if ( node && /^[\s\uFEFF\u00A0]*$/.test( editor.$( node ).text() || '' ) ) {
// Make sure there are no empty inline elements in the <p>.
node.innerHTML = '';
} else {
return;
}
}
}
event.content = wp.mce.views.setMarkers( event.content, editor );
} );
// Replace any new markers nodes with views.
editor.on( 'setcontent', function() {
wp.mce.views.render();
} );
// Empty view nodes for easier processing.
editor.on( 'preprocess hide', function( event ) {
editor.$( 'div[data-wpview-text], p[data-wpview-marker]', event.node ).each( function( i, node ) {
node.innerHTML = '.';
} );
}, true );
// Replace views with their text.
editor.on( 'postprocess', function( event ) {
event.content = resetViews( event.content );
} );
// Prevent adding of undo levels when replacing wpview markers
// or when there are changes only in the (non-editable) previews.
editor.on( 'beforeaddundo', function( event ) {
var lastContent;
var newContent = event.level.content || ( event.level.fragments && event.level.fragments.join( '' ) );
if ( ! event.lastLevel ) {
lastContent = editor.startContent;
} else {
lastContent = event.lastLevel.content || ( event.lastLevel.fragments && event.lastLevel.fragments.join( '' ) );
}
if (
! newContent ||
! lastContent ||
newContent.indexOf( ' data-wpview-' ) === -1 ||
lastContent.indexOf( ' data-wpview-' ) === -1
) {
return;
}
if ( resetViews( lastContent ) === resetViews( newContent ) ) {
event.preventDefault();
}
} );
// Make sure views are copied as their text.
editor.on( 'drop objectselected', function( event ) {
if ( isView( event.targetClone ) ) {
event.targetClone = editor.getDoc().createTextNode(
window.decodeURIComponent( editor.dom.getAttrib( event.targetClone, 'data-wpview-text' ) )
);
}
} );
// Clean up URLs for easier processing.
editor.on( 'pastepreprocess', function( event ) {
var content = event.content;
if ( content ) {
content = tinymce.trim( content.replace( /<[^>]+>/g, '' ) );
if ( /^https?:\/\/\S+$/i.test( content ) ) {
event.content = content;
}
}
} );
// Show the view type in the element path.
editor.on( 'resolvename', function( event ) {
if ( isView( event.target ) ) {
event.name = editor.dom.getAttrib( event.target, 'data-wpview-type' ) || 'object';
}
} );
// See `media` plugin.
editor.on( 'click keyup', function() {
var node = editor.selection.getNode();
if ( isView( node ) ) {
if ( editor.dom.getAttrib( node, 'data-mce-selected' ) ) {
node.setAttribute( 'data-mce-selected', '2' );
}
}
} );
editor.addButton( 'wp_view_edit', {
tooltip: 'Edit|button', // '|button' is not displayed, only used for context.
icon: 'dashicon dashicons-edit',
onclick: function() {
var node = editor.selection.getNode();
if ( isView( node ) ) {
wp.mce.views.edit( editor, node );
}
}
} );
editor.addButton( 'wp_view_remove', {
tooltip: 'Remove',
icon: 'dashicon dashicons-no',
onclick: function() {
editor.fire( 'cut' );
}
} );
editor.once( 'preinit', function() {
var toolbar;
if ( editor.wp && editor.wp._createToolbar ) {
toolbar = editor.wp._createToolbar( [
'wp_view_edit',
'wp_view_remove'
] );
editor.on( 'wptoolbar', function( event ) {
if ( ! event.collapsed && isView( event.element ) ) {
event.toolbar = toolbar;
}
} );
}
} );
editor.wp = editor.wp || {};
editor.wp.getView = noop;
editor.wp.setViewCursor = noop;
return {
getView: noop
};
} );
} )( window.tinymce );

View file

@ -0,0 +1 @@
!function(c){c.PluginManager.add("wpview",function(o){function e(){}var n=window.wp;return n&&n.mce&&n.mce.views?(o.on("init",function(){var e=window.MutationObserver||window.WebKitMutationObserver;e&&new e(function(){o.fire("wp-body-class-change")}).observe(o.getBody(),{attributes:!0,attributeFilter:["class"]}),o.on("wp-body-class-change",function(){var n=o.getBody().className;o.$('iframe[class="wpview-sandbox"]').each(function(e,t){if(!t.src||'javascript:""'===t.src)try{t.contentWindow.document.body.className=n}catch(e){}})})}),o.on("beforesetcontent",function(e){var t;if(e.selection||n.mce.views.unbind(),e.content){if(!e.load&&(t=o.selection.getNode())&&t!==o.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(e.content)){if(!(t=o.dom.getParent(t,"p"))||!/^[\s\uFEFF\u00A0]*$/.test(o.$(t).text()||""))return;t.innerHTML=""}e.content=n.mce.views.setMarkers(e.content,o)}}),o.on("setcontent",function(){n.mce.views.render()}),o.on("preprocess hide",function(e){o.$("div[data-wpview-text], p[data-wpview-marker]",e.node).each(function(e,t){t.innerHTML="."})},!0),o.on("postprocess",function(e){e.content=a(e.content)}),o.on("beforeaddundo",function(e){var t=e.level.content||e.level.fragments&&e.level.fragments.join(""),n=e.lastLevel?e.lastLevel.content||e.lastLevel.fragments&&e.lastLevel.fragments.join(""):o.startContent;t&&n&&-1!==t.indexOf(" data-wpview-")&&-1!==n.indexOf(" data-wpview-")&&a(n)===a(t)&&e.preventDefault()}),o.on("drop objectselected",function(e){i(e.targetClone)&&(e.targetClone=o.getDoc().createTextNode(window.decodeURIComponent(o.dom.getAttrib(e.targetClone,"data-wpview-text"))))}),o.on("pastepreprocess",function(e){var t=e.content;t&&(t=c.trim(t.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(t)&&(e.content=t))}),o.on("resolvename",function(e){i(e.target)&&(e.name=o.dom.getAttrib(e.target,"data-wpview-type")||"object")}),o.on("click keyup",function(){var e=o.selection.getNode();i(e)&&o.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),o.addButton("wp_view_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",onclick:function(){var e=o.selection.getNode();i(e)&&n.mce.views.edit(o,e)}}),o.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){o.fire("cut")}}),o.once("preinit",function(){var t;o.wp&&o.wp._createToolbar&&(t=o.wp._createToolbar(["wp_view_edit","wp_view_remove"]),o.on("wptoolbar",function(e){!e.collapsed&&i(e.element)&&(e.toolbar=t)}))}),o.wp=o.wp||{},o.wp.getView=e,{getView:o.wp.setViewCursor=e}):{getView:e};function i(e){return o.dom.hasClass(e,"wpview")}function a(e){function t(e,t){return"<p>"+window.decodeURIComponent(t)+"</p>"}return e&&-1!==e.indexOf(" data-wpview-")?e.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:\.|[\s\S]+?wpview-end[^>]+>\s*<\/span>\s*)?<\/div>/g,t).replace(/<p[^>]+data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,t):e}})}(window.tinymce);

View file

@ -0,0 +1 @@
.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}.mce-content-body{line-height:1.3}

View file

@ -0,0 +1 @@
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body.mce-content-readonly *[contentEditable=true]:focus,.mce-content-body.mce-content-readonly *[contentEditable=true]:hover{outline:none}.mce-content-body *[data-mce-selected="inline-boundary"]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body table{-webkit-nbsp-mode:normal}.ephox-snooker-resizer-bar{background-color:#2276d2;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ephox-snooker-resizer-cols{cursor:col-resize}.ephox-snooker-resizer-rows{cursor:row-resize}.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging{opacity:.2}

View file

@ -0,0 +1,63 @@
<?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>Generated by IcoMoon</metadata>
<defs>
<font id="tinymce-small" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe000;" glyph-name="save" d="M960 80v591.938l-223.938 224.062h-592.062c-44.182 0-80-35.816-80-80v-736c0-44.184 35.818-80 80-80h736c44.184 0 80 35.816 80 80zM576 768h64v-192h-64v192zM704 128h-384v255.882c0.034 0.042 0.076 0.082 0.116 0.118h383.77c0.040-0.036 0.082-0.076 0.116-0.118l-0.002-255.882zM832 128h-64v256c0 35.2-28.8 64-64 64h-384c-35.2 0-64-28.8-64-64v-256h-64v640h64v-192c0-35.2 28.8-64 64-64h320c35.2 0 64 28.8 64 64v171.010l128-128.072v-490.938z" />
<glyph unicode="&#xe001;" glyph-name="newdocument" d="M850.746 717.254l-133.492 133.49c-24.888 24.892-74.054 45.256-109.254 45.256h-416c-35.2 0-64-28.8-64-64v-768c0-35.2 28.8-64 64-64h640c35.2 0 64 28.8 64 64v544c0 35.2-20.366 84.364-45.254 109.254zM805.49 672.002c6.792-6.796 13.792-19.162 18.894-32.002h-184.384v184.386c12.84-5.1 25.204-12.1 32-18.896l133.49-133.488zM831.884 64h-639.77c-0.040 0.034-0.082 0.076-0.114 0.116v767.77c0.034 0.040 0.076 0.082 0.114 0.114h383.886v-256h256v-511.884c-0.034-0.040-0.076-0.082-0.116-0.116z" />
<glyph unicode="&#xe002;" glyph-name="fullpage" d="M1024 367.542v160.916l-159.144 15.914c-8.186 30.042-20.088 58.548-35.21 84.98l104.596 127.838-113.052 113.050-127.836-104.596c-26.434 15.124-54.942 27.026-84.982 35.208l-15.914 159.148h-160.916l-15.914-159.146c-30.042-8.186-58.548-20.086-84.98-35.208l-127.838 104.594-113.050-113.050 104.596-127.836c-15.124-26.432-27.026-54.94-35.21-84.98l-159.146-15.916v-160.916l159.146-15.914c8.186-30.042 20.086-58.548 35.21-84.982l-104.596-127.836 113.048-113.048 127.838 104.596c26.432-15.124 54.94-27.028 84.98-35.21l15.916-159.148h160.916l15.914 159.144c30.042 8.186 58.548 20.088 84.982 35.21l127.836-104.596 113.048 113.048-104.596 127.836c15.124 26.434 27.028 54.942 35.21 84.98l159.148 15.92zM704 384l-128-128h-128l-128 128v128l128 128h128l128-128v-128z" />
<glyph unicode="&#xe003;" glyph-name="alignleft" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM64 576h576v-128h-576zM64 192h576v-128h-576z" />
<glyph unicode="&#xe004;" glyph-name="aligncenter" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM256 576h512v-128h-512zM256 192h512v-128h-512z" />
<glyph unicode="&#xe005;" glyph-name="alignright" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM384 576h576v-128h-576zM384 192h576v-128h-576z" />
<glyph unicode="&#xe006;" glyph-name="alignjustify" d="M64 768h896v-128h-896zM64 384h896v-128h-896zM64 576h896v-128h-896zM64 192h896v-128h-896z" />
<glyph unicode="&#xe007;" glyph-name="cut" d="M864.408 289.868c-46.47 46.47-106.938 68.004-161.082 62.806l-63.326 63.326 192 192c0 0 128 128 0 256l-320-320-320 320c-128-128 0-256 0-256l192-192-63.326-63.326c-54.144 5.198-114.61-16.338-161.080-62.806-74.98-74.98-85.112-186.418-22.626-248.9 62.482-62.482 173.92-52.354 248.9 22.626 46.47 46.468 68.002 106.938 62.806 161.080l63.326 63.326 63.328-63.328c-5.196-54.144 16.336-114.61 62.806-161.078 74.978-74.98 186.418-85.112 248.898-22.626 62.488 62.482 52.356 173.918-22.624 248.9zM353.124 201.422c-2.212-24.332-15.020-49.826-35.14-69.946-22.212-22.214-51.080-35.476-77.218-35.476-10.524 0-25.298 2.228-35.916 12.848-21.406 21.404-17.376 73.132 22.626 113.136 22.212 22.214 51.080 35.476 77.218 35.476 10.524 0 25.298-2.228 35.916-12.848 13.112-13.11 13.47-32.688 12.514-43.19zM512 352c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zM819.152 108.848c-10.62-10.62-25.392-12.848-35.916-12.848-26.138 0-55.006 13.262-77.218 35.476-20.122 20.12-32.928 45.614-35.138 69.946-0.958 10.502-0.6 30.080 12.514 43.192 10.618 10.622 25.39 12.848 35.916 12.848 26.136 0 55.006-13.262 77.216-35.474 40.004-40.008 44.032-91.736 22.626-113.14z" />
<glyph unicode="&#xe008;" glyph-name="paste" d="M704 576v160c0 17.6-14.4 32-32 32h-160v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-160c-17.602 0-32-14.4-32-32v-512c0-17.6 14.398-32 32-32h224v-192h384l192 192v384h-192zM320 831.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 640v64h384v-64h-384zM704 90.51v101.49h101.49l-101.49-101.49zM832 256h-192v-192h-256v448h448v-256z" />
<glyph unicode="&#xe009;" glyph-name="searchreplace" d="M888 576h-56v256h64v64h-320v-64h64v-256h-256v256h64v64h-320v-64h64v-256h-56c-39.6 0-72-32.4-72-72v-432c0-39.6 32.4-72 72-72h240c39.6 0 72 32.4 72 72v312h128v-312c0-39.6 32.4-72 72-72h240c39.6 0 72 32.4 72 72v432c0 39.6-32.4 72-72 72zM348 64h-184c-19.8 0-36 14.4-36 32s16.2 32 36 32h184c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM860 64h-184c-19.8 0-36 14.4-36 32s16.2 32 36 32h184c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
<glyph unicode="&#xe00a;" glyph-name="bullist" d="M384 832h576v-128h-576zM384 512h576v-128h-576zM384 192h576v-128h-576zM128 768c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM128 448c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM128 128c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64z" />
<glyph unicode="&#xe00b;" glyph-name="numlist" d="M384 832h576v-128h-576zM384 512h576v-128h-576zM384 192h576v-128h-576zM320 430v146h-64v320h-128v-64h64v-256h-64v-64h128v-50l-128-60v-146h128v-64h-128v-64h128v-64h-128v-64h192v320h-128v50z" />
<glyph unicode="&#xe00c;" glyph-name="indent" d="M64 768h896v-128h-896zM384 384h576v-128h-576zM384 576h576v-128h-576zM64 192h896v-128h-896zM64 576l224-160-224-160z" />
<glyph unicode="&#xe00d;" glyph-name="outdent" d="M64 768h896v-128h-896zM64 384h576v-128h-576zM64 576h576v-128h-576zM64 192h896v-128h-896zM960 576l-224-160 224-160z" />
<glyph unicode="&#xe00e;" glyph-name="blockquote" d="M256.428 535.274c105.8 0 191.572-91.17 191.572-203.638 0-112.464-85.772-203.636-191.572-203.636-105.802 0-191.572 91.17-191.572 203.636l-0.856 29.092c0 224.93 171.54 407.272 383.144 407.272v-116.364c-73.1 0-141.826-30.26-193.516-85.204-9.954-10.578-19.034-21.834-27.224-33.656 9.784 1.64 19.806 2.498 30.024 2.498zM768.428 535.274c105.8 0 191.572-91.17 191.572-203.638 0-112.464-85.772-203.636-191.572-203.636-105.802 0-191.572 91.17-191.572 203.636l-0.856 29.092c0 224.93 171.54 407.272 383.144 407.272v-116.364c-73.1 0-141.826-30.26-193.516-85.204-9.956-10.578-19.036-21.834-27.224-33.656 9.784 1.64 19.806 2.498 30.024 2.498z" />
<glyph unicode="&#xe00f;" glyph-name="undo" d="M704 0c59 199 134.906 455.266-256 446.096v-222.096l-336.002 336 336.002 336v-217.326c468.092 12.2 544-358.674 256-678.674z" />
<glyph unicode="&#xe010;" glyph-name="redo" d="M576 678.674v217.326l336.002-336-336.002-336v222.096c-390.906 9.17-315-247.096-256-446.096-288 320-212.092 690.874 256 678.674z" />
<glyph unicode="&#xe011;" glyph-name="unlink" d="M927.274 729.784l-133.49 133.488c-21.104 21.104-49.232 32.728-79.198 32.728s-58.094-11.624-79.196-32.726l-165.492-165.49c-43.668-43.668-43.668-114.724 0-158.392l2.746-2.746 67.882 67.882-2.746 2.746c-6.132 6.132-6.132 16.494 0 22.626l165.492 165.492c4.010 4.008 8.808 4.608 11.312 4.608s7.302-0.598 11.312-4.61l133.49-133.488c6.132-6.134 6.132-16.498 0.002-22.628l-165.494-165.494c-4.008-4.008-8.806-4.608-11.31-4.608s-7.302 0.6-11.312 4.612l-2.746 2.746-67.88-67.884 2.742-2.742c21.106-21.108 49.23-32.728 79.2-32.728s58.094 11.624 79.196 32.726l165.494 165.492c43.662 43.666 43.662 114.72-0.004 158.39zM551.356 359.356l-67.882-67.882 2.746-2.746c4.008-4.008 4.61-8.806 4.61-11.31 0-2.506-0.598-7.302-4.606-11.314l-165.494-165.49c-4.010-4.010-8.81-4.61-11.314-4.61s-7.304 0.6-11.314 4.61l-133.492 133.486c-4.010 4.010-4.61 8.81-4.61 11.314s0.598 7.3 4.61 11.312l165.49 165.488c4.010 4.012 8.81 4.612 11.314 4.612s7.304-0.6 11.314-4.612l2.746-2.742 67.882 67.88-2.746 2.746c-21.104 21.104-49.23 32.726-79.196 32.726s-58.092-11.624-79.196-32.726l-165.488-165.486c-21.106-21.104-32.73-49.234-32.73-79.198s11.624-58.094 32.726-79.198l133.49-133.49c21.106-21.102 49.232-32.726 79.198-32.726s58.092 11.624 79.196 32.726l165.494 165.492c21.104 21.104 32.722 49.23 32.722 79.196s-11.624 58.094-32.726 79.196l-2.744 2.746zM352 250c-9.724 0-19.45 3.71-26.87 11.128-14.84 14.84-14.84 38.898 0 53.738l320 320c14.84 14.84 38.896 14.84 53.736 0 14.844-14.84 14.844-38.9 0-53.74l-320-320c-7.416-7.416-17.142-11.126-26.866-11.126z" />
<glyph unicode="&#xe012;" glyph-name="link" d="M927.274 729.784l-133.49 133.488c-21.104 21.104-49.232 32.728-79.198 32.728s-58.094-11.624-79.196-32.726l-165.492-165.49c-43.668-43.668-43.668-114.724 0-158.392l2.746-2.746 67.882 67.882-2.746 2.746c-6.132 6.132-6.132 16.494 0 22.626l165.492 165.492c4.010 4.008 8.808 4.608 11.312 4.608s7.302-0.598 11.312-4.61l133.49-133.488c6.132-6.134 6.132-16.498 0.002-22.628l-165.494-165.494c-4.008-4.008-8.806-4.608-11.31-4.608s-7.302 0.6-11.312 4.612l-2.746 2.746-67.88-67.884 2.742-2.742c21.106-21.108 49.23-32.728 79.2-32.728s58.094 11.624 79.196 32.726l165.494 165.492c43.662 43.666 43.662 114.72-0.004 158.39zM551.356 359.356l-67.882-67.882 2.746-2.746c4.008-4.008 4.61-8.806 4.61-11.31 0-2.506-0.598-7.302-4.606-11.314l-165.494-165.49c-4.010-4.010-8.81-4.61-11.314-4.61s-7.304 0.6-11.314 4.61l-133.492 133.486c-4.010 4.010-4.61 8.81-4.61 11.314s0.598 7.3 4.61 11.312l165.49 165.488c4.010 4.012 8.81 4.612 11.314 4.612s7.304-0.6 11.314-4.612l2.746-2.742 67.882 67.88-2.746 2.746c-21.104 21.104-49.23 32.726-79.196 32.726s-58.092-11.624-79.196-32.726l-165.488-165.486c-21.106-21.104-32.73-49.234-32.73-79.198s11.624-58.094 32.726-79.198l133.49-133.49c21.106-21.102 49.232-32.726 79.198-32.726s58.092 11.624 79.196 32.726l165.494 165.492c21.104 21.104 32.722 49.23 32.722 79.196s-11.624 58.094-32.726 79.196l-2.744 2.746zM800 122c-9.724 0-19.45 3.708-26.87 11.13l-128 127.998c-14.844 14.84-14.844 38.898 0 53.738 14.84 14.844 38.896 14.844 53.736 0l128-128c14.844-14.84 14.844-38.896 0-53.736-7.416-7.422-17.142-11.13-26.866-11.13zM608 0c-17.674 0-32 14.326-32 32v128c0 17.674 14.326 32 32 32s32-14.326 32-32v-128c0-17.674-14.326-32-32-32zM928 320h-128c-17.674 0-32 14.326-32 32s14.326 32 32 32h128c17.674 0 32-14.326 32-32s-14.326-32-32-32zM224 774c9.724 0 19.45-3.708 26.87-11.13l128-128c14.842-14.84 14.842-38.898 0-53.738-14.84-14.844-38.898-14.844-53.738 0l-128 128c-14.842 14.84-14.842 38.898 0 53.738 7.418 7.422 17.144 11.13 26.868 11.13zM416 896c17.674 0 32-14.326 32-32v-128c0-17.674-14.326-32-32-32s-32 14.326-32 32v128c0 17.674 14.326 32 32 32zM96 576h128c17.674 0 32-14.326 32-32s-14.326-32-32-32h-128c-17.674 0-32 14.326-32 32s14.326 32 32 32z" />
<glyph unicode="&#xe013;" glyph-name="bookmark" d="M256 896v-896l256 256 256-256v896h-512zM704 170.51l-192 192-192-192v661.49h384v-661.49z" />
<glyph unicode="&#xe014;" glyph-name="image" d="M896 832h-768c-35.2 0-64-28.8-64-64v-640c0-35.2 28.8-64 64-64h768c35.2 0 64 28.8 64 64v640c0 35.2-28.8 64-64 64zM896 128.116c-0.012-0.014-0.030-0.028-0.042-0.042l-191.958 319.926-160-128-224 288-191.968-479.916c-0.010 0.010-0.022 0.022-0.032 0.032v639.77c0.034 0.040 0.076 0.082 0.114 0.114h767.77c0.040-0.034 0.082-0.076 0.116-0.116v-639.768zM640 608c0-53.019 42.981-96 96-96s96 42.981 96 96c0 53.019-42.981 96-96 96s-96-42.981-96-96z" />
<glyph unicode="&#xe015;" glyph-name="media" d="M896 832h-768c-35.2 0-64-28.8-64-64v-640c0-35.2 28.8-64 64-64h768c35.2 0 64 28.8 64 64v640c0 35.2-28.8 64-64 64zM256 128h-128v128h128v-128zM256 384h-128v128h128v-128zM256 640h-128v128h128v-128zM704 128h-384v640h384v-640zM896 128h-128v128h128v-128zM896 384h-128v128h128v-128zM896 640h-128v128h128v-128zM384 640v-384l288 192z" />
<glyph unicode="&#xe016;" glyph-name="help" d="M448 256h128v-128h-128v128zM704 704c35.346 0 64-28.654 64-64v-166l-228-154h-92v64l192 128v64h-320v128h384zM512 896c-119.666 0-232.166-46.6-316.784-131.216-84.614-84.618-131.216-197.118-131.216-316.784 0-119.664 46.602-232.168 131.216-316.784 84.618-84.616 197.118-131.216 316.784-131.216 119.664 0 232.168 46.6 316.784 131.216s131.216 197.12 131.216 316.784c0 119.666-46.6 232.166-131.216 316.784-84.616 84.616-197.12 131.216-316.784 131.216z" />
<glyph unicode="&#xe017;" glyph-name="code" d="M416 256l-192 192 192 192-64 64-256-256 256-256zM672 704l-64-64 192-192-192-192 64-64 256 256z" />
<glyph unicode="&#xe018;" glyph-name="insertdatetime" d="M77.798 655.376l81.414-50.882c50.802 81.114 128.788 143.454 221.208 174.246l-30.366 91.094c-113.748-37.898-209.728-114.626-272.256-214.458zM673.946 869.834l-30.366-91.094c92.422-30.792 170.404-93.132 221.208-174.248l81.412 50.882c-62.526 99.834-158.506 176.562-272.254 214.46zM607.974 255.992c-4.808 0-9.692 1.090-14.286 3.386l-145.688 72.844v211.778c0 17.672 14.328 32 32 32s32-14.328 32-32v-172.222l110.31-55.156c15.806-7.902 22.214-27.124 14.31-42.932-5.604-11.214-16.908-17.696-28.646-17.698zM512 768c-212.078 0-384-171.922-384-384s171.922-384 384-384c212.078 0 384 171.922 384 384s-171.922 384-384 384zM512 96c-159.058 0-288 128.942-288 288s128.942 288 288 288c159.058 0 288-128.942 288-288s-128.942-288-288-288z" />
<glyph unicode="&#xe019;" glyph-name="preview" d="M64 504.254c45.318 49.92 97.162 92.36 153.272 125.124 90.332 52.744 192.246 80.622 294.728 80.622 102.48 0 204.396-27.878 294.726-80.624 56.112-32.764 107.956-75.204 153.274-125.124v117.432c-33.010 28.118-68.124 53.14-104.868 74.594-105.006 61.314-223.658 93.722-343.132 93.722s-238.128-32.408-343.134-93.72c-36.742-21.454-71.856-46.478-104.866-74.596v-117.43zM512 640c-183.196 0-345.838-100.556-448-256 102.162-155.448 264.804-256 448-256s345.838 100.552 448 256c-102.162 155.444-264.804 256-448 256zM512 448c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.348 28.654 64 64 64s64-28.652 64-64zM728.066 263.338c-67.434-39.374-140.128-59.338-216.066-59.338s-148.632 19.964-216.066 59.338c-51.554 30.104-98.616 71.31-138.114 120.662 39.498 49.35 86.56 90.558 138.116 120.66 13.276 7.752 26.758 14.74 40.426 20.982-10.512-23.742-16.362-50.008-16.362-77.642 0-106.040 85.962-192 192-192 106.040 0 192 85.96 192 192 0 27.634-5.85 53.9-16.36 77.642 13.668-6.244 27.15-13.23 40.426-20.982 51.554-30.102 98.616-71.31 138.116-120.66-39.498-49.352-86.56-90.558-138.116-120.662z" />
<glyph unicode="&#xe01a;" glyph-name="forecolor" d="M651.168 676.166c-24.612 81.962-28.876 91.834-107.168 91.834h-64c-79.618 0-82.664-10.152-108.418-96 0-0.002 0-0.002-0.002-0.004l-143.998-479.996h113.636l57.6 192h226.366l57.6-192h113.63l-145.246 484.166zM437.218 512l38.4 136c10.086 33.618 36.38 30 36.38 30s26.294 3.618 36.38-30h0.004l38.4-136h-149.564z" />
<glyph unicode="&#xe01b;" glyph-name="table" d="M64 768v-704h896v704h-896zM384 320v128h256v-128h-256zM640 256v-128h-256v128h256zM640 640v-128h-256v128h256zM320 640v-128h-192v128h192zM128 448h192v-128h-192v128zM704 448h192v-128h-192v128zM704 512v128h192v-128h-192zM128 256h192v-128h-192v128zM704 128v128h192v-128h-192z" />
<glyph unicode="&#xe01c;" glyph-name="hr" d="M64 512h896v-128h-896z" />
<glyph unicode="&#xe01d;" glyph-name="removeformat" d="M64 192h512v-128h-512v128zM768 768h-220.558l-183.766-512h-132.288l183.762 512h-223.15v128h576v-128zM929.774 64l-129.774 129.774-129.774-129.774-62.226 62.226 129.774 129.774-129.774 129.774 62.226 62.226 129.774-129.774 129.774 129.774 62.226-62.226-129.774-129.774 129.774-129.774-62.226-62.226z" />
<glyph unicode="&#xe01e;" glyph-name="subscript" d="M768 50v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe01f;" glyph-name="superscript" d="M768 754v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe020;" glyph-name="charmap" d="M704 128v37.004c151.348 61.628 256 193.82 256 346.996 0 212.078-200.576 384-448 384s-448-171.922-448-384c0-153.176 104.654-285.368 256-346.996v-37.004h-192l-64 96v-224h320v222.812c-100.9 51.362-170.666 161.54-170.666 289.188 0 176.732 133.718 320 298.666 320s298.666-143.268 298.666-320c0-127.648-69.766-237.826-170.666-289.188v-222.812h320v224l-64-96h-192z" />
<glyph unicode="&#xe021;" glyph-name="emoticons" d="M512 820c99.366 0 192.782-38.694 263.042-108.956s108.958-163.678 108.958-263.044-38.696-192.782-108.958-263.042-163.676-108.958-263.042-108.958-192.782 38.696-263.044 108.958-108.956 163.676-108.956 263.042 38.694 192.782 108.956 263.044 163.678 108.956 263.044 108.956zM512 896c-247.424 0-448-200.576-448-448s200.576-448 448-448 448 200.576 448 448-200.576 448-448 448v0zM320 576c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM576 576c0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64s-64-28.654-64-64zM512 304c-101.84 0-192.56 36.874-251.166 94.328 23.126-117.608 126.778-206.328 251.166-206.328s228.040 88.72 251.168 206.328c-58.608-57.454-149.328-94.328-251.168-94.328z" />
<glyph unicode="&#xe022;" glyph-name="print" d="M256 832h512v-128h-512v128zM896 640h-768c-35.2 0-64-28.8-64-64v-256c0-35.2 28.796-64 64-64h128v-192h512v192h128c35.2 0 64 28.8 64 64v256c0 35.2-28.8 64-64 64zM704 128h-384v256h384v-256zM910.4 544c0-25.626-20.774-46.4-46.398-46.4s-46.402 20.774-46.402 46.4 20.778 46.4 46.402 46.4c25.626 0 46.398-20.774 46.398-46.4z" />
<glyph unicode="&#xe023;" glyph-name="fullscreen" d="M480 576l-192 192 128 128h-352v-352l128 128 192-192zM640 480l192 192 128-128v352h-352l128-128-192-192zM544 320l192-192-128-128h352v352l-128-128-192 192zM384 416l-192-192-128 128v-352h352l-128 128 192 192z" />
<glyph unicode="&#xe024;" glyph-name="spellcheck" d="M960 832v64h-192c-35.202 0-64-28.8-64-64v-320c0-15.856 5.858-30.402 15.496-41.614l-303.496-260.386-142 148-82-70 224-288 416 448h128v64h-192v320h192zM256 448h64v384c0 35.2-28.8 64-64 64h-128c-35.2 0-64-28.8-64-64v-384h64v192h128v-192zM128 704v128h128v-128h-128zM640 512v96c0 35.2-8.8 64-44 64 35.2 0 44 28.8 44 64v96c0 35.2-28.8 64-64 64h-192v-448h192c35.2 0 64 28.8 64 64zM448 832h128v-128h-128v128zM448 640h128v-128h-128v128z" />
<glyph unicode="&#xe025;" glyph-name="nonbreaking" d="M448 448h-128v128h128v128h128v-128h128v-128h-128v-128h-128v128zM960 384v-320h-896v320h128v-192h640v192h128z" />
<glyph unicode="&#xe026;" glyph-name="template" d="M512 576h128v-64h-128zM512 192h128v-64h-128zM576 384h128v-64h-128zM768 384v-192h-64v-64h128v256zM384 384h128v-64h-128zM320 192h128v-64h-128zM320 576h128v-64h-128zM192 768v-256h64v192h64v64zM704 512h128v256h-64v-192h-64zM64 896v-896h896v896h-896zM896 64h-768v768h768v-768zM192 384v-256h64v192h64v64zM576 768h128v-64h-128zM384 768h128v-64h-128z" />
<glyph unicode="&#xe027;" glyph-name="pagebreak" d="M816 896l16-384h-640l16 384h32l16-320h512l16 320h32zM208 0l-16 320h640l-16-320h-32l-16 256h-512l-16-256h-32zM64 448h128v-64h-128zM256 448h128v-64h-128zM448 448h128v-64h-128zM640 448h128v-64h-128zM832 448h128v-64h-128z" />
<glyph unicode="&#xe028;" glyph-name="restoredraft" d="M576 896c247.424 0 448-200.576 448-448s-200.576-448-448-448v96c94.024 0 182.418 36.614 248.902 103.098s103.098 154.878 103.098 248.902c0 94.022-36.614 182.418-103.098 248.902s-154.878 103.098-248.902 103.098c-94.022 0-182.418-36.614-248.902-103.098-51.14-51.138-84.582-115.246-97.306-184.902h186.208l-224-256-224 256h164.57c31.060 217.102 217.738 384 443.43 384zM768 512v-128h-256v320h128v-192z" />
<glyph unicode="&#xe02a;" glyph-name="bold" d="M625.442 465.818c48.074 38.15 78.558 94.856 78.558 158.182 0 114.876-100.29 208-224 208h-224v-768h288c123.712 0 224 93.124 224 208 0 88.196-59.118 163.562-142.558 193.818zM384 656c0 26.51 21.49 48 48 48h67.204c42.414 0 76.796-42.98 76.796-96s-34.382-96-76.796-96h-115.204v144zM547.2 192h-115.2c-26.51 0-48 21.49-48 48v144h163.2c42.418 0 76.8-42.98 76.8-96s-34.382-96-76.8-96z" />
<glyph unicode="&#xe02b;" glyph-name="italic" d="M832 832v-64h-144l-256-640h144v-64h-448v64h144l256 640h-144v64h448z" />
<glyph unicode="&#xe02c;" glyph-name="underline" d="M192 128h576v-64h-576v64zM640 832v-384c0-31.312-14.7-61.624-41.39-85.352-30.942-27.502-73.068-42.648-118.61-42.648-45.544 0-87.668 15.146-118.608 42.648-26.692 23.728-41.392 54.040-41.392 85.352v384h-128v-384c0-141.382 128.942-256 288-256s288 114.618 288 256v384h-128z" />
<glyph unicode="&#xe02d;" glyph-name="strikethrough" d="M960 448h-265.876c-50.078 35.42-114.43 54.86-182.124 54.86-89.206 0-164.572 50.242-164.572 109.712s75.366 109.714 164.572 109.714c75.058 0 140.308-35.576 159.12-82.286h113.016c-7.93 50.644-37.58 97.968-84.058 132.826-50.88 38.16-117.676 59.174-188.078 59.174-70.404 0-137.196-21.014-188.074-59.174-54.788-41.090-86.212-99.502-86.212-160.254s31.424-119.164 86.212-160.254c1.956-1.466 3.942-2.898 5.946-4.316h-265.872v-64h512.532c58.208-17.106 100.042-56.27 100.042-100.572 0-59.468-75.368-109.71-164.572-109.71-75.060 0-140.308 35.574-159.118 82.286h-113.016c7.93-50.64 37.582-97.968 84.060-132.826 50.876-38.164 117.668-59.18 188.072-59.18 70.402 0 137.198 21.016 188.074 59.174 54.79 41.090 86.208 99.502 86.208 160.254 0 35.298-10.654 69.792-30.294 100.572h204.012v64z" />
<glyph unicode="&#xe02e;" glyph-name="visualchars" d="M384 832c-123.712 0-224-100.288-224-224s100.288-224 224-224v-320h128v640h64v-640h128v640h128v128h-448z" />
<glyph unicode="&#xe02f;" glyph-name="ltr" d="M448 832c-123.712 0-224-100.288-224-224s100.288-224 224-224v-320h128v640h64v-640h128v640h128v128h-448zM64 64l224 192-224 192z" />
<glyph unicode="&#xe030;" glyph-name="rtl" d="M320 832c-123.712 0-224-100.288-224-224s100.288-224 224-224v-320h128v640h64v-640h128v640h128v128h-448zM960 448l-224-192 224-192z" />
<glyph unicode="&#xe031;" glyph-name="copy" d="M832 640h-192v64l-192 192h-384v-704h384v-192h576v448l-192 192zM832 549.49l101.49-101.49h-101.49v101.49zM448 805.49l101.49-101.49h-101.49v101.49zM128 832h256v-192h192v-384h-448v576zM960 64h-448v128h128v384h128v-192h192v-320z" />
<glyph unicode="&#xe032;" glyph-name="resize" d="M768 704h64v-64h-64zM640 576h64v-64h-64zM640 448h64v-64h-64zM640 320h64v-64h-64zM512 448h64v-64h-64zM512 320h64v-64h-64zM384 320h64v-64h-64zM768 576h64v-64h-64zM768 448h64v-64h-64zM768 320h64v-64h-64zM768 192h64v-64h-64zM640 192h64v-64h-64zM512 192h64v-64h-64zM384 192h64v-64h-64zM256 192h64v-64h-64z" />
<glyph unicode="&#xe034;" glyph-name="browse" d="M928 832h-416l-32 64h-352l-64-128h896zM840.34 256h87.66l32 448h-896l64-640h356.080c-104.882 37.776-180.080 138.266-180.080 256 0 149.982 122.018 272 272 272 149.98 0 272-122.018 272-272 0-21.678-2.622-43.15-7.66-64zM874.996 110.25l-134.496 110.692c17.454 28.922 27.5 62.814 27.5 99.058 0 106.040-85.96 192-192 192s-192-85.96-192-192 85.96-192 192-192c36.244 0 70.138 10.046 99.058 27.5l110.692-134.496c22.962-26.678 62.118-28.14 87.006-3.252l5.492 5.492c24.888 24.888 23.426 64.044-3.252 87.006zM576 196c-68.484 0-124 55.516-124 124s55.516 124 124 124 124-55.516 124-124-55.516-124-124-124z" />
<glyph unicode="&#xe035;" glyph-name="pastetext" d="M704 576v160c0 17.6-14.4 32-32 32h-160v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-160c-17.602 0-32-14.4-32-32v-512c0-17.6 14.398-32 32-32h224v-192h576v576h-192zM320 831.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 640v64h384v-64h-384zM832 64h-448v448h448v-448zM448 448v-128h32l32 64h64v-192h-48v-64h160v64h-48v192h64l32-64h32v128z" />
<glyph unicode="&#xe603;" glyph-name="codesample" d="M200.015 577.994v103.994c0 43.077 34.919 77.997 77.997 77.997h26v103.994h-26c-100.51 0-181.991-81.481-181.991-181.991v-103.994c0-43.077-34.919-77.997-77.997-77.997h-26v-103.994h26c43.077 0 77.997-34.919 77.997-77.997v-103.994c0-100.509 81.481-181.991 181.991-181.991h26v103.994h-26c-43.077 0-77.997 34.919-77.997 77.997v103.994c0 50.927-20.928 96.961-54.642 129.994 33.714 33.032 54.642 79.065 54.642 129.994zM823.985 577.994v103.994c0 43.077-34.919 77.997-77.997 77.997h-26v103.994h26c100.509 0 181.991-81.481 181.991-181.991v-103.994c0-43.077 34.919-77.997 77.997-77.997h26v-103.994h-26c-43.077 0-77.997-34.919-77.997-77.997v-103.994c0-100.509-81.482-181.991-181.991-181.991h-26v103.994h26c43.077 0 77.997 34.919 77.997 77.997v103.994c0 50.927 20.928 96.961 54.642 129.994-33.714 33.032-54.642 79.065-54.642 129.994zM615.997 603.277c0-57.435-46.56-103.994-103.994-103.994s-103.994 46.56-103.994 103.994c0 57.435 46.56 103.994 103.994 103.994s103.994-46.56 103.994-103.994zM512 448.717c-57.435 0-103.994-46.56-103.994-103.994 0-55.841 26-100.107 105.747-103.875-23.715-33.413-59.437-46.608-105.747-50.94v-61.747c0 0 207.991-18.144 207.991 216.561-0.202 57.437-46.56 103.996-103.994 103.996z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -0,0 +1,132 @@
<?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>Generated by IcoMoon</metadata>
<defs>
<font id="tinymce" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe000;" glyph-name="save" d="M896 960h-896v-1024h1024v896l-128 128zM512 832h128v-256h-128v256zM896 64h-768v768h64v-320h576v320h74.978l53.022-53.018v-714.982z" />
<glyph unicode="&#xe001;" glyph-name="newdocument" d="M903.432 760.57l-142.864 142.862c-31.112 31.112-92.568 56.568-136.568 56.568h-480c-44 0-80-36-80-80v-864c0-44 36-80 80-80h736c44 0 80 36 80 80v608c0 44-25.456 105.458-56.568 136.57zM858.178 715.314c3.13-3.13 6.25-6.974 9.28-11.314h-163.458v163.456c4.34-3.030 8.184-6.15 11.314-9.28l142.864-142.862zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16h480c4.832 0 10.254-0.61 16-1.704v-254.296h254.296c1.094-5.746 1.704-11.166 1.704-16v-608z" />
<glyph unicode="&#xe002;" glyph-name="fullpage" d="M1024 367.542v160.916l-159.144 15.914c-8.186 30.042-20.088 58.548-35.21 84.98l104.596 127.838-113.052 113.050-127.836-104.596c-26.434 15.124-54.942 27.026-84.982 35.208l-15.914 159.148h-160.916l-15.914-159.146c-30.042-8.186-58.548-20.086-84.98-35.208l-127.838 104.594-113.050-113.050 104.596-127.836c-15.124-26.432-27.026-54.94-35.21-84.98l-159.146-15.916v-160.916l159.146-15.914c8.186-30.042 20.086-58.548 35.21-84.982l-104.596-127.836 113.048-113.048 127.838 104.596c26.432-15.124 54.94-27.028 84.98-35.21l15.916-159.148h160.916l15.914 159.144c30.042 8.186 58.548 20.088 84.982 35.21l127.836-104.596 113.048 113.048-104.596 127.836c15.124 26.434 27.028 54.942 35.21 84.98l159.148 15.92zM704 384l-128-128h-128l-128 128v128l128 128h128l128-128v-128z" />
<glyph unicode="&#xe003;" glyph-name="alignleft" d="M0 896h1024v-128h-1024zM0 704h640v-128h-640zM0 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe004;" glyph-name="aligncenter" d="M0 896h1024v-128h-1024zM192 704h640v-128h-640zM192 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe005;" glyph-name="alignright" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 320h640v-128h-640zM0 512h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe006;" glyph-name="alignjustify" d="M0 896h1024v-128h-1024zM0 704h1024v-128h-1024zM0 512h1024v-128h-1024zM0 320h1024v-128h-1024zM0 128h1024v-128h-1024z" />
<glyph unicode="&#xe007;" glyph-name="cut" d="M890.774 250.846c-45.654 45.556-103.728 69.072-157.946 69.072h-29.112l-63.904 64.008 255.62 256.038c63.904 64.010 63.904 192.028 0 256.038l-383.43-384.056-383.432 384.054c-63.904-64.008-63.904-192.028 0-256.038l255.622-256.034-63.906-64.008h-29.114c-54.22 0-112.292-23.518-157.948-69.076-81.622-81.442-92.65-202.484-24.63-270.35 29.97-29.902 70.288-44.494 112.996-44.494 54.216 0 112.29 23.514 157.946 69.072 53.584 53.464 76.742 124 67.084 185.348l65.384 65.488 65.376-65.488c-9.656-61.348 13.506-131.882 67.084-185.348 45.662-45.558 103.732-69.072 157.948-69.072 42.708 0 83.024 14.592 112.994 44.496 68.020 67.866 56.988 188.908-24.632 270.35zM353.024 114.462c-7.698-17.882-19.010-34.346-33.626-48.926-14.636-14.604-31.172-25.918-49.148-33.624-16.132-6.916-32.96-10.568-48.662-10.568-15.146 0-36.612 3.402-52.862 19.612-16.136 16.104-19.52 37.318-19.52 52.288 0 15.542 3.642 32.21 10.526 48.212 7.7 17.884 19.014 34.346 33.626 48.926 14.634 14.606 31.172 25.914 49.15 33.624 16.134 6.914 32.96 10.568 48.664 10.568 15.146 0 36.612-3.4 52.858-19.614 16.134-16.098 19.522-37.316 19.522-52.284 0.002-15.542-3.638-32.216-10.528-48.214zM512.004 293.404c-49.914 0-90.376 40.532-90.376 90.526 0 49.992 40.462 90.52 90.376 90.52s90.372-40.528 90.372-90.52c0-49.998-40.46-90.526-90.372-90.526zM855.272 40.958c-16.248-16.208-37.712-19.612-52.86-19.612-15.704 0-32.53 3.652-48.666 10.568-17.972 7.706-34.508 19.020-49.142 33.624-14.614 14.58-25.926 31.042-33.626 48.926-6.886 15.998-10.526 32.672-10.526 48.212 0 14.966 3.384 36.188 19.52 52.286 16.246 16.208 37.712 19.614 52.86 19.614 15.7 0 32.53-3.654 48.66-10.568 17.978-7.708 34.516-19.018 49.15-33.624 14.61-14.58 25.924-31.042 33.626-48.926 6.884-15.998 10.526-32.67 10.526-48.212-0.002-14.97-3.39-36.186-19.522-52.288z" />
<glyph unicode="&#xe008;" glyph-name="paste" d="M832 640v160c0 17.6-14.4 32-32 32h-224v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-224c-17.602 0-32-14.4-32-32v-640c0-17.6 14.398-32 32-32h288v-192h448l192 192v512h-192zM384 895.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 704v64h512v-64h-512zM832 26.51v101.49h101.49l-101.49-101.49zM960 192h-192v-192h-320v576h512v-384z" />
<glyph unicode="&#xe009;" glyph-name="searchreplace" d="M64 960h384v-64h-384zM576 960h384v-64h-384zM952 640h-56v256h-256v-256h-256v256h-256v-256h-56c-39.6 0-72-32.4-72-72v-560c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v376h128v-376c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v560c0 39.6-32.4 72-72 72zM348 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM924 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
<glyph unicode="&#xe00a;" glyph-name="bullist" d="M384 896h640v-128h-640v128zM384 512h640v-128h-640v128zM384 128h640v-128h-640v128zM0 832c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 448c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM0 64c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128z" />
<glyph unicode="&#xe00b;" glyph-name="numlist" d="M384 128h640v-128h-640zM384 512h640v-128h-640zM384 896h640v-128h-640zM192 960v-256h-64v192h-64v64zM128 434v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM256 256v-320h-192v64h128v64h-128v64h128v64h-128v64z" />
<glyph unicode="&#xe00c;" glyph-name="indent" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 512h640v-128h-640zM384 320h640v-128h-640zM0 128h1024v-128h-1024zM0 256v384l256-192z" />
<glyph unicode="&#xe00d;" glyph-name="outdent" d="M0 896h1024v-128h-1024zM384 704h640v-128h-640zM384 512h640v-128h-640zM384 320h640v-128h-640zM0 128h1024v-128h-1024zM256 640v-384l-256 192z" />
<glyph unicode="&#xe00e;" glyph-name="blockquote" d="M225 512c123.712 0 224-100.29 224-224 0-123.712-100.288-224-224-224s-224 100.288-224 224l-1 32c0 247.424 200.576 448 448 448v-128c-85.474 0-165.834-33.286-226.274-93.726-11.634-11.636-22.252-24.016-31.83-37.020 11.438 1.8 23.16 2.746 35.104 2.746zM801 512c123.71 0 224-100.29 224-224 0-123.712-100.29-224-224-224s-224 100.288-224 224l-1 32c0 247.424 200.576 448 448 448v-128c-85.474 0-165.834-33.286-226.274-93.726-11.636-11.636-22.254-24.016-31.832-37.020 11.44 1.8 23.16 2.746 35.106 2.746z" />
<glyph unicode="&#xe00f;" glyph-name="undo" d="M761.862-64c113.726 206.032 132.888 520.306-313.862 509.824v-253.824l-384 384 384 384v-248.372c534.962 13.942 594.57-472.214 313.862-775.628z" />
<glyph unicode="&#xe010;" glyph-name="redo" d="M576 711.628v248.372l384-384-384-384v253.824c-446.75 10.482-427.588-303.792-313.86-509.824-280.712 303.414-221.1 789.57 313.86 775.628z" />
<glyph unicode="&#xe011;" glyph-name="link" d="M320 256c17.6-17.6 47.274-16.726 65.942 1.942l316.118 316.116c18.668 18.668 19.54 48.342 1.94 65.942s-47.274 16.726-65.942-1.942l-316.116-316.116c-18.668-18.668-19.542-48.342-1.942-65.942zM476.888 284.888c4.56-9.050 6.99-19.16 6.99-29.696 0-17.616-6.744-34.060-18.992-46.308l-163.382-163.382c-12.248-12.248-28.694-18.992-46.308-18.992s-34.060 6.744-46.308 18.992l-99.382 99.382c-12.248 12.248-18.992 28.694-18.992 46.308s6.744 34.060 18.992 46.308l163.382 163.382c12.248 12.248 28.694 18.994 46.308 18.994 10.536 0 20.644-2.43 29.696-6.99l65.338 65.338c-27.87 21.41-61.44 32.16-95.034 32.16-39.986 0-79.972-15.166-110.308-45.502l-163.382-163.382c-60.67-60.67-60.67-159.948 0-220.618l99.382-99.382c30.334-30.332 70.32-45.5 110.306-45.5 39.988 0 79.974 15.168 110.308 45.502l163.382 163.382c55.82 55.82 60.238 144.298 13.344 205.344l-65.34-65.34zM978.498 815.116l-99.382 99.382c-30.334 30.336-70.32 45.502-110.308 45.502-39.986 0-79.972-15.166-110.308-45.502l-163.382-163.382c-55.82-55.82-60.238-144.298-13.342-205.342l65.338 65.34c-4.558 9.050-6.988 19.16-6.988 29.694 0 17.616 6.744 34.060 18.992 46.308l163.382 163.382c12.248 12.248 28.694 18.994 46.308 18.994s34.060-6.746 46.308-18.994l99.382-99.382c12.248-12.248 18.992-28.694 18.992-46.308s-6.744-34.060-18.992-46.308l-163.382-163.382c-12.248-12.248-28.694-18.992-46.308-18.992-10.536 0-20.644 2.43-29.696 6.99l-65.338-65.338c27.872-21.41 61.44-32.16 95.034-32.16 39.988 0 79.974 15.168 110.308 45.502l163.382 163.382c60.67 60.666 60.67 159.944 0 220.614z" />
<glyph unicode="&#xe012;" glyph-name="unlink" d="M476.888 284.886c4.56-9.048 6.99-19.158 6.99-29.696 0-17.616-6.744-34.058-18.992-46.308l-163.38-163.38c-12.248-12.248-28.696-18.992-46.308-18.992s-34.060 6.744-46.308 18.992l-99.38 99.38c-12.248 12.25-18.992 28.696-18.992 46.308s6.744 34.060 18.992 46.308l163.38 163.382c12.248 12.246 28.696 18.992 46.308 18.992 10.538 0 20.644-2.43 29.696-6.988l65.338 65.336c-27.87 21.41-61.44 32.16-95.034 32.16-39.986 0-79.972-15.166-110.308-45.502l-163.38-163.382c-60.67-60.67-60.67-159.95 0-220.618l99.38-99.382c30.334-30.332 70.32-45.5 110.306-45.5 39.988 0 79.974 15.168 110.308 45.502l163.38 163.38c55.82 55.82 60.238 144.298 13.344 205.346l-65.34-65.338zM978.496 815.116l-99.38 99.382c-30.334 30.336-70.32 45.502-110.308 45.502-39.986 0-79.97-15.166-110.306-45.502l-163.382-163.382c-55.82-55.82-60.238-144.298-13.342-205.342l65.338 65.34c-4.558 9.050-6.988 19.16-6.988 29.694 0 17.616 6.744 34.060 18.992 46.308l163.382 163.382c12.246 12.248 28.694 18.994 46.306 18.994 17.616 0 34.060-6.746 46.308-18.994l99.38-99.382c12.248-12.248 18.992-28.694 18.992-46.308s-6.744-34.060-18.992-46.308l-163.38-163.382c-12.248-12.248-28.694-18.992-46.308-18.992-10.536 0-20.644 2.43-29.696 6.99l-65.338-65.338c27.872-21.41 61.44-32.16 95.034-32.16 39.988 0 79.974 15.168 110.308 45.504l163.38 163.38c60.672 60.666 60.672 159.944 0 220.614zM233.368 681.376l-191.994 191.994 45.256 45.256 191.994-191.994zM384 960h64v-192h-64zM0 576h192v-64h-192zM790.632 214.624l191.996-191.996-45.256-45.256-191.996 191.996zM576 128h64v-192h-64zM832 384h192v-64h-192z" />
<glyph unicode="&#xe013;" glyph-name="anchor" d="M192 960v-1024l320 320 320-320v1024h-640zM768 90.51l-256 256-256-256v805.49h512v-805.49z" />
<glyph unicode="&#xe014;" glyph-name="image" d="M0 832v-832h1024v832h-1024zM960 64h-896v704h896v-704zM704 608c0 53.019 42.981 96 96 96s96-42.981 96-96c0-53.019-42.981-96-96-96s-96 42.981-96 96zM896 128h-768l192 512 256-320 128 96z" />
<glyph unicode="&#xe015;" glyph-name="media" d="M0 832v-768h1024v768h-1024zM192 128h-128v128h128v-128zM192 384h-128v128h128v-128zM192 640h-128v128h128v-128zM768 128h-512v640h512v-640zM960 128h-128v128h128v-128zM960 384h-128v128h128v-128zM960 640h-128v128h128v-128zM384 640v-384l256 192z" />
<glyph unicode="&#xe016;" glyph-name="help" d="M448 256h128v-128h-128zM704 704c35.346 0 64-28.654 64-64v-192l-192-128h-128v64l192 128v64h-320v128h384zM512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512z" />
<glyph unicode="&#xe017;" glyph-name="code" d="M320 704l-256-256 256-256h128l-256 256 256 256zM704 704h-128l256-256-256-256h128l256 256z" />
<glyph unicode="&#xe018;" glyph-name="inserttime" d="M512 768c-212.076 0-384-171.922-384-384s171.922-384 384-384c212.074 0 384 171.922 384 384s-171.926 384-384 384zM715.644 180.354c-54.392-54.396-126.716-84.354-203.644-84.354s-149.25 29.958-203.646 84.354c-54.396 54.394-84.354 126.718-84.354 203.646s29.958 149.25 84.354 203.646c54.396 54.396 126.718 84.354 203.646 84.354s149.252-29.958 203.642-84.354c54.402-54.396 84.358-126.718 84.358-203.646s-29.958-149.252-84.356-203.646zM325.93 756.138l-42.94 85.878c-98.874-49.536-179.47-130.132-229.006-229.008l85.876-42.94c40.248 80.336 105.732 145.822 186.070 186.070zM884.134 570.070l85.878 42.938c-49.532 98.876-130.126 179.472-229.004 229.008l-42.944-85.878c80.338-40.248 145.824-105.732 186.070-186.068zM512 576h-64v-192c0-10.11 4.7-19.11 12.022-24.972l-0.012-0.016 160-128 39.976 49.976-147.986 118.39v176.622z" />
<glyph unicode="&#xe019;" glyph-name="preview" d="M512 640c-209.368 0-395.244-100.556-512-256 116.756-155.446 302.632-256 512-256s395.244 100.554 512 256c-116.756 155.444-302.632 256-512 256zM448 512c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64 28.654 64 64 64zM773.616 254.704c-39.648-20.258-81.652-35.862-124.846-46.376-44.488-10.836-90.502-16.328-136.77-16.328-46.266 0-92.282 5.492-136.768 16.324-43.194 10.518-85.198 26.122-124.846 46.376-63.020 32.202-120.222 76.41-167.64 129.298 47.418 52.888 104.62 97.1 167.64 129.298 32.336 16.522 66.242 29.946 101.082 40.040-19.888-30.242-31.468-66.434-31.468-105.336 0-106.040 85.962-192 192-192s192 85.96 192 192c0 38.902-11.582 75.094-31.466 105.34 34.838-10.096 68.744-23.52 101.082-40.042 63.022-32.198 120.218-76.408 167.638-129.298-47.42-52.886-104.618-97.1-167.638-129.296zM860.918 716.278c-108.72 55.554-226.112 83.722-348.918 83.722s-240.198-28.168-348.918-83.722c-58.772-30.032-113.732-67.904-163.082-112.076v-109.206c55.338 58.566 120.694 107.754 192.194 144.29 99.62 50.904 207.218 76.714 319.806 76.714s220.186-25.81 319.804-76.716c71.502-36.536 136.858-85.724 192.196-144.29v109.206c-49.35 44.174-104.308 82.046-163.082 112.078z" />
<glyph unicode="&#xe01a;" glyph-name="forecolor" d="M322.018 128l57.6 192h264.764l57.6-192h113.632l-191.996 640h-223.236l-192-640h113.636zM475.618 640h72.764l57.6-192h-187.964l57.6 192z" />
<glyph unicode="&#xe01b;" glyph-name="table" d="M0 896v-896h1024v896h-1024zM384 320v192h256v-192h-256zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
<glyph unicode="&#xe01c;" glyph-name="hr" d="M0 512h1024v-128h-1024z" />
<glyph unicode="&#xe01d;" glyph-name="removeformat" d="M0 64h576v-128h-576zM192 960h704v-128h-704zM277.388 128l204.688 784.164 123.85-32.328-196.25-751.836zM929.774-64l-129.774 129.774-129.774-129.774-62.226 62.226 129.774 129.774-129.774 129.774 62.226 62.226 129.774-129.774 129.774 129.774 62.226-62.226-129.774-129.774 129.774-129.774z" />
<glyph unicode="&#xe01e;" glyph-name="sub" d="M768 50v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe01f;" glyph-name="sup" d="M768 754v-50h128v-64h-192v146l128 60v50h-128v64h192v-146zM676 704h-136l-188-188-188 188h-136l256-256-256-256h136l188 188 188-188h136l-256 256z" />
<glyph unicode="&#xe020;" glyph-name="charmap" d="M704 64h256l64 128v-256h-384v214.214c131.112 56.484 224 197.162 224 361.786 0 214.432-157.598 382.266-352 382.266-194.406 0-352-167.832-352-382.266 0-164.624 92.886-305.302 224-361.786v-214.214h-384v256l64-128h256v32.59c-187.63 66.46-320 227.402-320 415.41 0 247.424 229.23 448 512 448s512-200.576 512-448c0-188.008-132.37-348.95-320-415.41v-32.59z" />
<glyph unicode="&#xe021;" glyph-name="emoticons" d="M512 960c-282.77 0-512-229.228-512-512 0-282.77 229.228-512 512-512 282.77 0 512 229.23 512 512 0 282.772-229.23 512-512 512zM512 16c-238.586 0-432 193.412-432 432 0 238.586 193.414 432 432 432 238.59 0 432-193.414 432-432 0-238.588-193.41-432-432-432zM384 640c0-35.346-28.654-64-64-64s-64 28.654-64 64 28.654 64 64 64 64-28.654 64-64zM768 640c0-35.346-28.652-64-64-64s-64 28.654-64 64 28.652 64 64 64 64-28.654 64-64zM512 308c141.074 0 262.688 57.532 318.462 123.192-20.872-171.22-156.288-303.192-318.462-303.192-162.118 0-297.498 132.026-318.444 303.168 55.786-65.646 177.386-123.168 318.444-123.168z" />
<glyph unicode="&#xe022;" glyph-name="print" d="M256 896h512v-128h-512zM960 704h-896c-35.2 0-64-28.8-64-64v-320c0-35.2 28.796-64 64-64h192v-256h512v256h192c35.2 0 64 28.8 64 64v320c0 35.2-28.8 64-64 64zM704 64h-384v320h384v-320zM974.4 608c0-25.626-20.774-46.4-46.398-46.4-25.626 0-46.402 20.774-46.402 46.4s20.776 46.4 46.402 46.4c25.626 0 46.398-20.774 46.398-46.4z" />
<glyph unicode="&#xe023;" glyph-name="fullscreen" d="M1024 960v-384l-138.26 138.26-212-212-107.48 107.48 212 212-138.26 138.26zM245.74 821.74l212-212-107.48-107.48-212 212-138.26-138.26v384h384zM885.74 181.74l138.26 138.26v-384h-384l138.26 138.26-212 212 107.48 107.48zM457.74 286.26l-212-212 138.26-138.26h-384v384l138.26-138.26 212 212z" />
<glyph unicode="&#xe024;" glyph-name="spellchecker" d="M128 704h128v-192h64v384c0 35.2-28.8 64-64 64h-128c-35.2 0-64-28.8-64-64v-384h64v192zM128 896h128v-128h-128v128zM960 896v64h-192c-35.202 0-64-28.8-64-64v-320c0-35.2 28.798-64 64-64h192v64h-192v320h192zM640 800v96c0 35.2-28.8 64-64 64h-192v-448h192c35.2 0 64 28.8 64 64v96c0 35.2-8.8 64-44 64 35.2 0 44 28.8 44 64zM576 576h-128v128h128v-128zM576 768h-128v128h128v-128zM832 384l-416-448-224 288 82 70 142-148 352 302z" />
<glyph unicode="&#xe025;" glyph-name="nonbreaking" d="M448 384h-192v128h192v192h128v-192h192v-128h-192v-192h-128zM1024 320v-384h-1024v384h128v-256h768v256z" />
<glyph unicode="&#xe026;" glyph-name="template" d="M384 768h128v-64h-128zM576 768h128v-64h-128zM896 768v-256h-192v64h128v128h-64v64zM320 576h128v-64h-128zM512 576h128v-64h-128zM192 704v-128h64v-64h-128v256h192v-64zM384 384h128v-64h-128zM576 384h128v-64h-128zM896 384v-256h-192v64h128v128h-64v64zM320 192h128v-64h-128zM512 192h128v-64h-128zM192 320v-128h64v-64h-128v256h192v-64zM960 896h-896v-896h896v896zM1024 960v0-1024h-1024v1024h1024z" />
<glyph unicode="&#xe027;" glyph-name="pagebreak" d="M0 448h128v-64h-128zM192 448h192v-64h-192zM448 448h128v-64h-128zM640 448h192v-64h-192zM896 448h128v-64h-128zM880 960l16-448h-768l16 448h32l16-384h640l16 384zM144-64l-16 384h768l-16-384h-32l-16 320h-640l-16-320z" />
<glyph unicode="&#xe028;" glyph-name="restoredraft" d="M576 896c247.424 0 448-200.576 448-448s-200.576-448-448-448v96c94.024 0 182.418 36.614 248.902 103.098s103.098 154.878 103.098 248.902c0 94.022-36.614 182.418-103.098 248.902s-154.878 103.098-248.902 103.098c-94.022 0-182.418-36.614-248.902-103.098-51.14-51.138-84.582-115.246-97.306-184.902h186.208l-224-256-224 256h164.57c31.060 217.102 217.738 384 443.43 384zM768 512v-128h-256v320h128v-192z" />
<glyph unicode="&#xe02a;" glyph-name="bold" d="M707.88 475.348c37.498 44.542 60.12 102.008 60.12 164.652 0 141.16-114.842 256-256 256h-320v-896h384c141.158 0 256 114.842 256 256 0 92.956-49.798 174.496-124.12 219.348zM384 768h101.5c55.968 0 101.5-57.42 101.5-128s-45.532-128-101.5-128h-101.5v256zM543 128h-159v256h159c58.45 0 106-57.42 106-128s-47.55-128-106-128z" />
<glyph unicode="&#xe02b;" glyph-name="italic" d="M896 896v-64h-128l-320-768h128v-64h-448v64h128l320 768h-128v64z" />
<glyph unicode="&#xe02c;" glyph-name="underline" d="M704 896h128v-416c0-159.058-143.268-288-320-288-176.73 0-320 128.942-320 288v416h128v-416c0-40.166 18.238-78.704 51.354-108.506 36.896-33.204 86.846-51.494 140.646-51.494s103.75 18.29 140.646 51.494c33.116 29.802 51.354 68.34 51.354 108.506v416zM192 128h640v-128h-640z" />
<glyph unicode="&#xe02d;" glyph-name="strikethrough" d="M731.42 442.964c63.92-47.938 100.58-116.086 100.58-186.964s-36.66-139.026-100.58-186.964c-59.358-44.518-137.284-69.036-219.42-69.036-82.138 0-160.062 24.518-219.42 69.036-63.92 47.938-100.58 116.086-100.58 186.964h128c0-69.382 87.926-128 192-128s192 58.618 192 128c0 69.382-87.926 128-192 128-82.138 0-160.062 24.518-219.42 69.036-63.92 47.94-100.58 116.086-100.58 186.964s36.66 139.024 100.58 186.964c59.358 44.518 137.282 69.036 219.42 69.036 82.136 0 160.062-24.518 219.42-69.036 63.92-47.94 100.58-116.086 100.58-186.964h-128c0 69.382-87.926 128-192 128s-192-58.618-192-128c0-69.382 87.926-128 192-128 82.136 0 160.062-24.518 219.42-69.036zM0 448h1024v-64h-1024z" />
<glyph unicode="&#xe02e;" glyph-name="visualchars" d="M384 896h512v-128h-128v-768h-128v768h-128v-768h-128v448c-123.712 0-224 100.288-224 224s100.288 224 224 224z" />
<glyph unicode="&#xe02f;" glyph-name="ltr" d="M448 896h512v-128h-128v-768h-128v768h-128v-768h-128v448c-123.712 0-224 100.288-224 224s100.288 224 224 224zM64 512l256-224-256-224z" />
<glyph unicode="&#xe030;" glyph-name="rtl" d="M256 896h512v-128h-128v-768h-128v768h-128v-768h-128v448c-123.712 0-224 100.288-224 224s100.288 224 224 224zM960 64l-256 224 256 224z" />
<glyph unicode="&#xe031;" glyph-name="copy" d="M832 704h-192v64l-192 192h-448v-768h384v-256h640v576l-192 192zM832 613.49l101.49-101.49h-101.49v101.49zM448 869.49l101.49-101.49h-101.49v101.49zM64 896h320v-192h192v-448h-512v640zM960 0h-512v192h192v448h128v-192h192v-448z" />
<glyph unicode="&#xe032;" glyph-name="resize" d="M768 704h64v-64h-64zM640 576h64v-64h-64zM640 448h64v-64h-64zM640 320h64v-64h-64zM512 448h64v-64h-64zM512 320h64v-64h-64zM384 320h64v-64h-64zM768 576h64v-64h-64zM768 448h64v-64h-64zM768 320h64v-64h-64zM768 192h64v-64h-64zM640 192h64v-64h-64zM512 192h64v-64h-64zM384 192h64v-64h-64zM256 192h64v-64h-64z" />
<glyph unicode="&#xe033;" glyph-name="checkbox" d="M128 416l288-288 480 480-128 128-352-352-160 160z" />
<glyph unicode="&#xe034;" glyph-name="browse" d="M928 832h-416l-32 64h-352l-64-128h896zM904.34 256h74.86l44.8 448h-1024l64-640h484.080c-104.882 37.776-180.080 138.266-180.080 256 0 149.982 122.018 272 272 272 149.98 0 272-122.018 272-272 0-21.678-2.622-43.15-7.66-64zM1002.996 46.25l-198.496 174.692c17.454 28.92 27.5 62.814 27.5 99.058 0 106.040-85.96 192-192 192s-192-85.96-192-192 85.96-192 192-192c36.244 0 70.138 10.046 99.058 27.5l174.692-198.496c22.962-26.678 62.118-28.14 87.006-3.252l5.492 5.492c24.888 24.888 23.426 64.044-3.252 87.006zM640 196c-68.484 0-124 55.516-124 124s55.516 124 124 124 124-55.516 124-124-55.516-124-124-124z" />
<glyph unicode="&#xe035;" glyph-name="pastetext" d="M512 448v-128h32l32 64h64v-256h-48v-64h224v64h-48v256h64l32-64h32v128zM832 640v160c0 17.6-14.4 32-32 32h-224v64c0 35.2-28.8 64-64 64h-128c-35.204 0-64-28.8-64-64v-64h-224c-17.602 0-32-14.4-32-32v-640c0-17.6 14.398-32 32-32h288v-192h640v704h-192zM384 895.886c0.034 0.038 0.072 0.078 0.114 0.114h127.768c0.042-0.036 0.082-0.076 0.118-0.114v-63.886h-128v63.886zM192 704v64h512v-64h-512zM960 0h-512v576h512v-576z" />
<glyph unicode="&#xe600;" glyph-name="gamma" d="M483.2 320l-147.2 336c-9.6 25.6-19.2 44.8-25.6 54.4s-16 12.8-25.6 12.8c-16 0-25.6-3.2-28.8-3.2v70.4c9.6 6.4 25.6 6.4 38.4 9.6 32 0 57.6-6.4 73.6-22.4 6.4-6.4 12.8-16 19.2-25.6 6.4-12.8 12.8-25.6 16-41.6l121.6-291.2 150.4 371.2h92.8l-198.4-470.4v-224h-86.4v224zM0 960v-1024h1024v1024h-1024zM960 0h-896v896h896v-896z" />
<glyph unicode="&#xe601;" glyph-name="orientation" d="M627.2 80h-579.2v396.8h579.2v-396.8zM553.6 406.4h-435.2v-256h435.2v256zM259.2 732.8c176 176 457.6 176 633.6 0s176-457.6 0-633.6c-121.6-121.6-297.6-160-454.4-108.8 121.6-28.8 262.4 9.6 361.6 108.8 150.4 150.4 160 384 22.4 521.6-121.6 121.6-320 128-470.4 19.2l86.4-86.4-294.4-22.4 22.4 294.4 92.8-92.8z" />
<glyph unicode="&#xe602;" glyph-name="invert" d="M892.8-22.4l-89.6 89.6c-70.4-80-172.8-131.2-288-131.2-208 0-380.8 166.4-384 377.6 0 0 0 0 0 0 0 3.2 0 3.2 0 6.4s0 3.2 0 6.4v0c0 0 0 0 0 3.2 0 0 0 3.2 0 3.2 3.2 105.6 48 211.2 105.6 304l-192 192 44.8 44.8 182.4-182.4c0 0 0 0 0 0l569.6-569.6c0 0 0 0 0 0l99.2-99.2-48-44.8zM896 326.4c0 0 0 0 0 0 0 3.2 0 6.4 0 6.4-9.6 316.8-384 627.2-384 627.2s-108.8-89.6-208-220.8l70.4-70.4c6.4 9.6 16 22.4 22.4 32 41.6 51.2 83.2 96 115.2 128v0c32-32 73.6-76.8 115.2-128 108.8-137.6 169.6-265.6 172.8-371.2 0 0 0-3.2 0-3.2v0 0c0-3.2 0-3.2 0-6.4s0-3.2 0-3.2v0 0c0-22.4-3.2-41.6-9.6-64l76.8-76.8c16 41.6 28.8 89.6 28.8 137.6 0 0 0 0 0 0 0 3.2 0 3.2 0 6.4s0 3.2 0 6.4z" />
<glyph unicode="&#xe603;" glyph-name="codesample" d="M199.995 578.002v104.002c0 43.078 34.923 78.001 78.001 78.001h26v104.002h-26c-100.518 0-182.003-81.485-182.003-182.003v-104.002c0-43.078-34.923-78.001-78.001-78.001h-26v-104.002h26c43.078 0 78.001-34.923 78.001-78.001v-104.002c0-100.515 81.485-182.003 182.003-182.003h26v104.002h-26c-43.078 0-78.001 34.923-78.001 78.001v104.002c0 50.931-20.928 96.966-54.646 130.002 33.716 33.036 54.646 79.072 54.646 130.002zM824.005 578.002v104.002c0 43.078-34.923 78.001-78.001 78.001h-26v104.002h26c100.515 0 182.003-81.485 182.003-182.003v-104.002c0-43.078 34.923-78.001 78.001-78.001h26v-104.002h-26c-43.078 0-78.001-34.923-78.001-78.001v-104.002c0-100.515-81.488-182.003-182.003-182.003h-26v104.002h26c43.078 0 78.001 34.923 78.001 78.001v104.002c0 50.931 20.928 96.966 54.646 130.002-33.716 33.036-54.646 79.072-54.646 130.002zM616.002 603.285c0-57.439-46.562-104.002-104.002-104.002s-104.002 46.562-104.002 104.002c0 57.439 46.562 104.002 104.002 104.002s104.002-46.562 104.002-104.002zM512 448.717c-57.439 0-104.002-46.562-104.002-104.002 0-55.845 26-100.115 105.752-103.88-23.719-33.417-59.441-46.612-105.752-50.944v-61.751c0 0 208.003-18.144 208.003 216.577-0.202 57.441-46.56 104.004-104.002 104.004z" />
<glyph unicode="&#xe604;" glyph-name="tablerowprops" d="M0 896v-896h1024v896h-1024zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
<glyph unicode="&#xe605;" glyph-name="tablecellprops" d="M0 896v-896h1024v896h-1024zM640 256v-192h-256v192h256zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192zM704 64v192h256v-192h-256z" />
<glyph unicode="&#xe606;" glyph-name="table2" d="M0 896v-832h1024v832h-1024zM320 128h-256v192h256v-192zM320 384h-256v192h256v-192zM640 128h-256v192h256v-192zM640 384h-256v192h256v-192zM960 128h-256v192h256v-192zM960 384h-256v192h256v-192zM960 640h-896v192h896v-192z" />
<glyph unicode="&#xe607;" glyph-name="tablemergecells" d="M0 896v-896h1024v896h-1024zM384 64v448h576v-448h-576zM640 768v-192h-256v192h256zM320 768v-192h-256v192h256zM64 512h256v-192h-256v192zM704 576v192h256v-192h-256zM64 256h256v-192h-256v192z" />
<glyph unicode="&#xe608;" glyph-name="tableinsertcolbefore" d="M320 188.8v182.4h-182.4v89.6h182.4v182.4h86.4v-182.4h185.6v-89.6h-185.6v-182.4zM0 896v-896h1024v896h-1024zM640 64h-576v704h576v-704zM960 64h-256v192h256v-192zM960 320h-256v192h256v-192zM960 576h-256v192h256v-192z" />
<glyph unicode="&#xe609;" glyph-name="tableinsertcolafter" d="M704 643.2v-182.4h182.4v-89.6h-182.4v-182.4h-86.4v182.4h-185.6v89.6h185.6v182.4zM0 896v-896h1024v896h-1024zM320 64h-256v192h256v-192zM320 320h-256v192h256v-192zM320 576h-256v192h256v-192zM960 64h-576v704h576v-704z" />
<glyph unicode="&#xe60a;" glyph-name="tableinsertrowbefore" d="M691.2 508.8h-144v-144h-70.4v144h-144v67.2h144v144h70.4v-144h144zM0 896v-896h1024v896h-1024zM320 64h-256v192h256v-192zM640 64h-256v192h256v-192zM960 64h-256v192h256v-192zM960 316.8h-896v451.2h896v-451.2z" />
<glyph unicode="&#xe60b;" glyph-name="tableinsertrowafter" d="M332.8 323.2h144v144h70.4v-144h144v-67.2h-144v-144h-70.4v144h-144zM0 896v-896h1024v896h-1024zM384 768h256v-192h-256v192zM64 768h256v-192h-256v192zM960 64h-896v451.2h896v-451.2zM960 576h-256v192h256v-192z" />
<glyph unicode="&#xe60d;" glyph-name="tablesplitcells" d="M0 896v-896h1024v896h-1024zM384 768h256v-192h-256v192zM320 64h-256v192h256v-192zM320 320h-256v192h256v-192zM320 576h-256v192h256v-192zM960 64h-576v448h576v-448zM960 576h-256v192h256v-192zM864 156.8l-60.8-60.8-131.2 131.2-131.2-131.2-60.8 60.8 131.2 131.2-131.2 131.2 60.8 60.8 131.2-131.2 131.2 131.2 60.8-60.8-131.2-131.2z" />
<glyph unicode="&#xe60e;" glyph-name="tabledelete" d="M0 896h1024v-896h-1024v896zM60.8 768v-704h899.2v704h-899.2zM809.6 211.2l-96-96-204.8 204.8-204.8-204.8-96 96 204.8 204.8-204.8 204.8 96 96 204.8-204.8 204.8 204.8 96-96-204.8-204.8z" />
<glyph unicode="&#xe62a;" glyph-name="tableleftheader" d="M0 896v-832h1024v832h-1024zM640 128h-256v192h256v-192zM640 384h-256v192h256v-192zM640 640h-256v192h256v-192zM960 128h-256v192h256v-192zM960 384h-256v192h256v-192zM960 640h-256v192h256v-192z" />
<glyph unicode="&#xe62b;" glyph-name="tabletopheader" d="M0 896v-832h1024v832h-1024zM320 128h-256v192h256v-192zM320 384h-256v192h256v-192zM640 128h-256v192h256v-192zM640 384h-256v192h256v-192zM960 128h-256v192h256v-192zM960 384h-256v192h256v-192z" />
<glyph unicode="&#xe800;" glyph-name="tabledeleterow" d="M886.4 572.8l-156.8-156.8 160-160-76.8-76.8-160 160-156.8-156.8-76.8 73.6 160 160-163.2 163.2 76.8 76.8 163.2-163.2 156.8 156.8 73.6-76.8zM0 896v-896h1024v896h-1024zM960 576h-22.4l-64-64h86.4v-192h-89.6l64-64h25.6v-192h-896v192h310.4l64 64h-374.4v192h371.2l-64 64h-307.2v192h896v-192z" />
<glyph unicode="&#xe801;" glyph-name="tabledeletecol" d="M320 499.2l64-64v-12.8l-64-64v140.8zM640 422.4l64-64v137.6l-64-64v-9.6zM1024 896v-896h-1024v896h1024zM960 768h-256v-51.2l-12.8 12.8-51.2-51.2v89.6h-256v-89.6l-51.2 51.2-12.8-12.8v51.2h-256v-704h256v118.4l35.2-35.2 28.8 28.8v-115.2h256v115.2l48-48 16 16v-83.2h256v707.2zM672 662.4l-156.8-156.8-163.2 163.2-76.8-76.8 163.2-163.2-156.8-156.8 76.8-76.8 156.8 156.8 160-160 76.8 76.8-160 160 156.8 156.8-76.8 76.8z" />
<glyph unicode="&#xe900;" glyph-name="a11y" d="M960 704v64l-448-128-448 128v-64l320-128v-256l-128-448h64l192 448 192-448h64l-128 448v256zM416 800q0 40 28 68t68 28 68-28 28-68-28-68-68-28-68 28-28 68z" />
<glyph unicode="&#xe901;" glyph-name="toc" d="M0 896h128v-128h-128v128zM192 896h832v-128h-832v128zM0 512h128v-128h-128v128zM192 512h832v-128h-832v128zM0 128h128v-128h-128v128zM192 128h832v-128h-832v128zM192 704h128v-128h-128v128zM384 704h640v-128h-640v128zM192 320h128v-128h-128v128zM384 320h640v-128h-640v128z" />
<glyph unicode="&#xe902;" glyph-name="fill" d="M521.6 915.2l-67.2-67.2-86.4 86.4-86.4-86.4 86.4-86.4-368-368 432-432 518.4 518.4-428.8 435.2zM435.2 134.4l-262.4 262.4 35.2 35.2 576 51.2-348.8-348.8zM953.6 409.6c-6.4-6.4-16-16-28.8-32-28.8-32-41.6-64-41.6-89.6v0 0 0 0 0 0 0c0-16 6.4-35.2 22.4-48 12.8-12.8 32-22.4 48-22.4s35.2 6.4 48 22.4 22.4 32 22.4 48v0 0 0 0 0 0 0c0 25.6-12.8 54.4-41.6 89.6-9.6 16-22.4 25.6-28.8 32v0z" />
<glyph unicode="&#xe903;" glyph-name="borderwidth" d="M0 265.6h1024v-128h-1024v128zM0 32h1024v-64h-1024v64zM0 566.4h1024v-192h-1024v192zM0 928h1024v-256h-1024v256z" />
<glyph unicode="&#xe904;" glyph-name="line" d="M739.2 627.2l-502.4-502.4h-185.6v185.6l502.4 502.4 185.6-185.6zM803.2 688l-185.6 185.6 67.2 67.2c22.4 22.4 54.4 22.4 76.8 0l108.8-108.8c22.4-22.4 22.4-54.4 0-76.8l-67.2-67.2zM41.6 48h940.8v-112h-940.8v112z" />
<glyph unicode="&#xe905;" glyph-name="count" d="M0 480h1024v-64h-1024v64zM304 912v-339.2h-67.2v272h-67.2v67.2zM444.8 694.4v-54.4h134.4v-67.2h-201.6v153.6l134.4 64v54.4h-134.4v67.2h201.6v-153.6zM854.4 912v-339.2h-204.8v67.2h137.6v67.2h-137.6v70.4h137.6v67.2h-137.6v67.2zM115.2 166.4c3.2 57.6 38.4 83.2 108.8 83.2 38.4 0 67.2-9.6 86.4-25.6s25.6-35.2 25.6-70.4v-112c0-25.6 0-28.8 9.6-41.6h-73.6c-3.2 9.6-3.2 9.6-6.4 19.2-22.4-19.2-41.6-25.6-70.4-25.6-54.4 0-89.6 32-89.6 76.8s28.8 70.4 99.2 80l38.4 6.4c16 3.2 22.4 6.4 22.4 16 0 12.8-12.8 22.4-38.4 22.4s-41.6-9.6-44.8-28.8h-67.2zM262.4 115.2c-6.4-3.2-12.8-6.4-25.6-6.4l-25.6-6.4c-25.6-6.4-38.4-16-38.4-28.8 0-16 12.8-25.6 35.2-25.6s41.6 9.6 54.4 32v35.2zM390.4 336h73.6v-112c22.4 16 41.6 22.4 67.2 22.4 64 0 105.6-51.2 105.6-124.8 0-76.8-44.8-134.4-108.8-134.4-32 0-48 9.6-67.2 35.2v-28.8h-70.4v342.4zM460.8 121.6c0-41.6 22.4-70.4 51.2-70.4s51.2 28.8 51.2 70.4c0 44.8-19.2 70.4-51.2 70.4-28.8 0-51.2-28.8-51.2-70.4zM851.2 153.6c-3.2 22.4-19.2 35.2-44.8 35.2-32 0-51.2-25.6-51.2-70.4 0-48 19.2-73.6 51.2-73.6 25.6 0 41.6 12.8 44.8 41.6l70.4-3.2c-9.6-60.8-54.4-96-118.4-96-73.6 0-121.6 51.2-121.6 128 0 80 48 131.2 124.8 131.2 64 0 108.8-35.2 112-96h-67.2z" />
<glyph unicode="&#xe906;" glyph-name="reload" d="M889.68 793.68c-93.608 102.216-228.154 166.32-377.68 166.32-282.77 0-512-229.23-512-512h96c0 229.75 186.25 416 416 416 123.020 0 233.542-53.418 309.696-138.306l-149.696-149.694h352v352l-134.32-134.32zM928 448c0-229.75-186.25-416-416-416-123.020 0-233.542 53.418-309.694 138.306l149.694 149.694h-352v-352l134.32 134.32c93.608-102.216 228.154-166.32 377.68-166.32 282.77 0 512 229.23 512 512h-96z" />
<glyph unicode="&#xe907;" glyph-name="translate" d="M553.6 304l-118.4 118.4c80 89.6 137.6 195.2 172.8 304h137.6v92.8h-326.4v92.8h-92.8v-92.8h-326.4v-92.8h518.4c-32-89.6-80-176-147.2-249.6-44.8 48-80 99.2-108.8 156.8h-92.8c35.2-76.8 80-147.2 137.6-211.2l-236.8-233.6 67.2-67.2 233.6 233.6 144-144c3.2 0 38.4 92.8 38.4 92.8zM816 540.8h-92.8l-208-560h92.8l51.2 140.8h220.8l51.2-140.8h92.8l-208 560zM691.2 214.4l76.8 201.6 76.8-201.6h-153.6z" />
<glyph unicode="&#xe908;" glyph-name="drag" d="M576 896h128v-128h-128v128zM576 640h128v-128h-128v128zM320 640h128v-128h-128v128zM576 384h128v-128h-128v128zM320 384h128v-128h-128v128zM320 128h128v-128h-128v128zM576 128h128v-128h-128v128zM320 896h128v-128h-128v128z" />
<glyph unicode="&#xe909;" glyph-name="format-painter" d="M768 746.667v42.667c0 23.467-19.2 42.667-42.667 42.667h-512c-23.467 0-42.667-19.2-42.667-42.667v-170.667c0-23.467 19.2-42.667 42.667-42.667h512c23.467 0 42.667 19.2 42.667 42.667v42.667h42.667v-170.667h-426.667v-384c0-23.467 19.2-42.667 42.667-42.667h85.333c23.467 0 42.667 19.2 42.667 42.667v298.667h341.333v341.333h-128z" />
<glyph unicode="&#xe90b;" glyph-name="home" d="M1024 369.556l-512 397.426-512-397.428v162.038l512 397.426 512-397.428zM896 384v-384h-256v256h-256v-256h-256v384l384 288z" />
<glyph unicode="&#xe911;" glyph-name="books" d="M576.234 670.73l242.712 81.432 203.584-606.784-242.712-81.432zM0 64h256v704h-256v-704zM64 640h128v-64h-128v64zM320 64h256v704h-256v-704zM384 640h128v-64h-128v64z" />
<glyph unicode="&#xe914;" glyph-name="upload" d="M839.432 760.57c27.492-27.492 50.554-78.672 55.552-120.57h-318.984v318.984c41.898-4.998 93.076-28.060 120.568-55.552l142.864-142.862zM512 576v384h-368c-44 0-80-36-80-80v-864c0-44 36-80 80-80h672c44 0 80 36 80 80v560h-384zM576 192v-192h-192v192h-160l256 256 256-256h-160z" />
<glyph unicode="&#xe915;" glyph-name="editimage" d="M768 416v-352h-640v640h352l128 128h-512c-52.8 0-96-43.2-96-96v-704c0-52.8 43.2-96 96-96h704c52.798 0 96 43.2 96 96v512l-128-128zM864 960l-608-608v-160h160l608 608c0 96-64 160-160 160zM416 320l-48 48 480 480 48-48-480-480z" />
<glyph unicode="&#xe91c;" glyph-name="bubble" d="M928 896h-832c-52.8 0-96-43.2-96-96v-512c0-52.8 43.2-96 96-96h160v-256l307.2 256h364.8c52.8 0 96 43.2 96 96v512c0 52.8-43.2 96-96 96zM896 320h-379.142l-196.858-174.714v174.714h-192v448h768v-448z" />
<glyph unicode="&#xe91d;" glyph-name="user" d="M622.826 257.264c-22.11 3.518-22.614 64.314-22.614 64.314s64.968 64.316 79.128 150.802c38.090 0 61.618 91.946 23.522 124.296 1.59 34.054 48.96 267.324-190.862 267.324s-192.45-233.27-190.864-267.324c-38.094-32.35-14.57-124.296 23.522-124.296 14.158-86.486 79.128-150.802 79.128-150.802s-0.504-60.796-22.614-64.314c-71.22-11.332-337.172-128.634-337.172-257.264h896c0 128.63-265.952 245.932-337.174 257.264z" />
<glyph unicode="&#xe926;" glyph-name="lock" d="M592 512h-16v192c0 105.87-86.13 192-192 192h-128c-105.87 0-192-86.13-192-192v-192h-16c-26.4 0-48-21.6-48-48v-480c0-26.4 21.6-48 48-48h544c26.4 0 48 21.6 48 48v480c0 26.4-21.6 48-48 48zM192 704c0 35.29 28.71 64 64 64h128c35.29 0 64-28.71 64-64v-192h-256v192z" />
<glyph unicode="&#xe927;" glyph-name="unlock" d="M768 896c105.87 0 192-86.13 192-192v-192h-128v192c0 35.29-28.71 64-64 64h-128c-35.29 0-64-28.71-64-64v-192h16c26.4 0 48-21.6 48-48v-480c0-26.4-21.6-48-48-48h-544c-26.4 0-48 21.6-48 48v480c0 26.4 21.6 48 48 48h400v192c0 105.87 86.13 192 192 192h128z" />
<glyph unicode="&#xe928;" glyph-name="settings" d="M448 832v16c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576zM256 704v128h128v-128h-128zM832 528c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-576v-128h576v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h192v128h-192v16zM640 384v128h128v-128h-128zM448 208c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576v16zM256 64v128h128v-128h-128z" />
<glyph unicode="&#xe92a;" glyph-name="remove2" d="M192-64h640l64 704h-768zM640 832v128h-256v-128h-320v-192l64 64h768l64-64v192h-320zM576 832h-128v64h128v-64z" />
<glyph unicode="&#xe92d;" glyph-name="menu" d="M384 896h256v-256h-256zM384 576h256v-256h-256zM384 256h256v-256h-256z" />
<glyph unicode="&#xe930;" glyph-name="warning" d="M1009.956 44.24l-437.074 871.112c-16.742 29.766-38.812 44.648-60.882 44.648s-44.14-14.882-60.884-44.648l-437.074-871.112c-33.486-59.532-5-108.24 63.304-108.24h869.308c68.302 0 96.792 48.708 63.302 108.24zM512 64c-35.346 0-64 28.654-64 64 0 35.348 28.654 64 64 64 35.348 0 64-28.652 64-64 0-35.346-28.652-64-64-64zM556 256h-88l-20 256c0 35.346 28.654 64 64 64s64-28.654 64-64l-20-256z" />
<glyph unicode="&#xe931;" glyph-name="question" d="M448 256h128v-128h-128zM704 704c35.346 0 64-28.654 64-64v-192l-192-128h-128v64l192 128v64h-320v128h384zM512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512z" />
<glyph unicode="&#xe932;" glyph-name="pluscircle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 64c-212.078 0-384 171.922-384 384s171.922 384 384 384c212.078 0 384-171.922 384-384s-171.922-384-384-384zM768 384h-192v-192h-128v192h-192v128h192v192h128v-192h192z" />
<glyph unicode="&#xe933;" glyph-name="info" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM448 768h128v-128h-128v128zM640 128h-256v64h64v256h-64v64h192v-320h64v-64z" />
<glyph unicode="&#xe934;" glyph-name="notice" d="M1024 224l-288 736h-448l-288-288v-448l288-288h448l288 288v448l-288 288zM576 128h-128v128h128v-128zM576 384h-128v384h128v-384z" />
<glyph unicode="&#xe935;" glyph-name="drop" d="M864.626 486.838c-65.754 183.44-205.11 348.15-352.626 473.162-147.516-125.012-286.87-289.722-352.626-473.162-40.664-113.436-44.682-236.562 12.584-345.4 65.846-125.14 198.632-205.438 340.042-205.438s274.196 80.298 340.040 205.44c57.27 108.838 53.25 231.962 12.586 345.398zM738.764 201.044c-43.802-83.252-132.812-137.044-226.764-137.044-55.12 0-108.524 18.536-152.112 50.652 13.242-1.724 26.632-2.652 40.112-2.652 117.426 0 228.668 67.214 283.402 171.242 44.878 85.292 40.978 173.848 23.882 244.338 14.558-28.15 26.906-56.198 36.848-83.932 22.606-63.062 40.024-156.34-5.368-242.604z" />
<glyph unicode="&#xe939;" glyph-name="minus" d="M0 544v-192c0-17.672 14.328-32 32-32h960c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32h-960c-17.672 0-32-14.328-32-32z" />
<glyph unicode="&#xe93a;" glyph-name="plus" d="M992 576h-352v352c0 17.672-14.328 32-32 32h-192c-17.672 0-32-14.328-32-32v-352h-352c-17.672 0-32-14.328-32-32v-192c0-17.672 14.328-32 32-32h352v-352c0-17.672 14.328-32 32-32h192c17.672 0 32 14.328 32 32v352h352c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32z" />
<glyph unicode="&#xe93b;" glyph-name="arrowup" d="M0 320l192-192 320 320 320-320 192 192-511.998 512z" />
<glyph unicode="&#xe93c;" glyph-name="arrowright" d="M384 960l-192-192 320-320-320-320 192-192 512 512z" />
<glyph unicode="&#xe93d;" glyph-name="arrowdown" d="M1024 576l-192 192-320-320-320 320-192-192 512-511.998z" />
<glyph unicode="&#xe93f;" glyph-name="arrowup2" d="M768 320l-256 256-256-256z" />
<glyph unicode="&#xe940;" glyph-name="arrowdown2" d="M256 576l256-256 256 256z" />
<glyph unicode="&#xe941;" glyph-name="menu2" d="M256 704l256-256 256 256zM255.996 384.004l256-256 256 256z" />
<glyph unicode="&#xe961;" glyph-name="newtab" d="M704 384l128 128v-512h-768v768h512l-128-128h-256v-512h512zM960 896v-352l-130.744 130.744-354.746-354.744h-90.51v90.512l354.744 354.744-130.744 130.744z" />
<glyph unicode="&#xeaa8;" glyph-name="rotateleft" d="M607.998 831.986c-212.070 0-383.986-171.916-383.986-383.986h-191.994l246.848-246.848 246.848 246.848h-191.994c0 151.478 122.798 274.276 274.276 274.276 151.48 0 274.276-122.798 274.276-274.276 0-151.48-122.796-274.276-274.276-274.276v-109.71c212.070 0 383.986 171.916 383.986 383.986s-171.916 383.986-383.986 383.986z" />
<glyph unicode="&#xeaa9;" glyph-name="rotateright" d="M416.002 831.986c212.070 0 383.986-171.916 383.986-383.986h191.994l-246.848-246.848-246.848 246.848h191.994c0 151.478-122.798 274.276-274.276 274.276-151.48 0-274.276-122.798-274.276-274.276 0-151.48 122.796-274.276 274.276-274.276v-109.71c-212.070 0-383.986 171.916-383.986 383.986s171.916 383.986 383.986 383.986z" />
<glyph unicode="&#xeaaa;" glyph-name="flipv" d="M0 576h1024v384zM1024 0v384h-1024z" />
<glyph unicode="&#xeaac;" glyph-name="fliph" d="M576 960v-1024h384zM0-64h384v1024z" />
<glyph unicode="&#xeb35;" glyph-name="zoomin" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM448 768h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" />
<glyph unicode="&#xeb36;" glyph-name="zoomout" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM192 640h384v-128h-384z" />
<glyph unicode="&#xeba7;" glyph-name="sharpen" d="M768 832h-512l-256-256 512-576 512 576-256 256zM512 181.334v2.666h-2.37l-14.222 16h16.592v16h-30.814l-14.222 16h45.036v16h-59.258l-14.222 16h73.48v16h-87.704l-14.222 16h101.926v16h-116.148l-14.222 16h130.37v16h-144.592l-14.222 16h158.814v16h-173.038l-14.222 16h187.26v16h-201.482l-14.222 16h215.704v16h-229.926l-14.222 16h244.148v16h-258.372l-14.222 16h272.594v16h-286.816l-14.222 16h301.038v16h-315.26l-14.222 16h329.482v16h-343.706l-7.344 8.262 139.072 139.072h211.978v-3.334h215.314l16-16h-231.314v-16h247.314l16-16h-263.314v-16h279.314l16-16h-295.314v-16h311.314l16-16h-327.314v-16h343.312l7.738-7.738-351.050-394.928z" />
<glyph unicode="&#xec6a;" glyph-name="options" d="M64 768h896v-192h-896zM64 512h896v-192h-896zM64 256h896v-192h-896z" />
<glyph unicode="&#xeccc;" glyph-name="sun" d="M512 128c35.346 0 64-28.654 64-64v-64c0-35.346-28.654-64-64-64s-64 28.654-64 64v64c0 35.346 28.654 64 64 64zM512 768c-35.346 0-64 28.654-64 64v64c0 35.346 28.654 64 64 64s64-28.654 64-64v-64c0-35.346-28.654-64-64-64zM960 512c35.346 0 64-28.654 64-64s-28.654-64-64-64h-64c-35.348 0-64 28.654-64 64s28.652 64 64 64h64zM192 448c0-35.346-28.654-64-64-64h-64c-35.346 0-64 28.654-64 64s28.654 64 64 64h64c35.346 0 64-28.654 64-64zM828.784 221.726l45.256-45.258c24.992-24.99 24.992-65.516 0-90.508-24.994-24.992-65.518-24.992-90.51 0l-45.256 45.256c-24.992 24.99-24.992 65.516 0 90.51 24.994 24.992 65.518 24.992 90.51 0zM195.216 674.274l-45.256 45.256c-24.994 24.994-24.994 65.516 0 90.51s65.516 24.994 90.51 0l45.256-45.256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0zM828.784 674.274c-24.992-24.992-65.516-24.992-90.51 0-24.992 24.994-24.992 65.516 0 90.51l45.256 45.254c24.992 24.994 65.516 24.994 90.51 0 24.992-24.994 24.992-65.516 0-90.51l-45.256-45.254zM195.216 221.726c24.992 24.992 65.518 24.992 90.508 0 24.994-24.994 24.994-65.52 0-90.51l-45.254-45.256c-24.994-24.992-65.516-24.992-90.51 0s-24.994 65.518 0 90.508l45.256 45.258zM512 704c-141.384 0-256-114.616-256-256 0-141.382 114.616-256 256-256 141.382 0 256 114.618 256 256 0 141.384-114.616 256-256 256zM512 288c-88.366 0-160 71.634-160 160s71.634 160 160 160 160-71.634 160-160-71.634-160-160-160z" />
<glyph unicode="&#xeccd;" glyph-name="moon" d="M715.812 895.52c-60.25 34.784-124.618 55.904-189.572 64.48 122.936-160.082 144.768-384.762 37.574-570.42-107.2-185.67-312.688-279.112-512.788-252.68 39.898-51.958 90.376-97.146 150.628-131.934 245.908-141.974 560.37-57.72 702.344 188.198 141.988 245.924 57.732 560.372-188.186 702.356z" />
<glyph unicode="&#xecd4;" glyph-name="contrast" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM128 448c0 212.078 171.922 384 384 384v-768c-212.078 0-384 171.922-384 384z" />
<glyph unicode="&#xed6a;" glyph-name="remove22" d="M893.254 738.746l-90.508 90.508-290.746-290.744-290.746 290.744-90.508-90.506 290.746-290.748-290.746-290.746 90.508-90.508 290.746 290.746 290.746-290.746 90.508 90.51-290.744 290.744z" />
<glyph unicode="&#xedc0;" glyph-name="arrowleft" d="M672-64l192 192-320 320 320 320-192 192-512-512z" />
<glyph unicode="&#xedf9;" glyph-name="resize2" d="M0 896v-384c0-35.346 28.654-64 64-64s64 28.654 64 64v229.488l677.488-677.488h-229.488c-35.346 0-64-28.652-64-64 0-35.346 28.654-64 64-64h384c35.346 0 64 28.654 64 64v384c0 35.348-28.654 64-64 64s-64-28.652-64-64v-229.488l-677.488 677.488h229.488c35.346 0 64 28.654 64 64s-28.652 64-64 64h-384c-35.346 0-64-28.654-64-64z" />
<glyph unicode="&#xee78;" glyph-name="crop" d="M832 704l192 192-64 64-192-192h-448v192h-128v-192h-192v-128h192v-512h512v-192h128v192h192v128h-192v448zM320 640h320l-320-320v320zM384 256l320 320v-320h-320z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,495 @@
/* Additional default styles for the editor */
html {
cursor: text;
}
html.ios {
width: 100px;
min-width: 100%;
}
body {
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-size: 16px;
line-height: 1.5;
color: #333;
margin: 9px 10px;
max-width: 100%;
-webkit-font-smoothing: antialiased !important;
overflow-wrap: break-word;
word-wrap: break-word; /* Old syntax */
}
body.rtl {
font-family: Tahoma, "Times New Roman", "Bitstream Charter", Times, serif;
}
body.locale-he-il,
body.locale-vi {
font-family: Arial, "Times New Roman", "Bitstream Charter", Times, serif;
}
body.wp-autoresize {
overflow: visible !important;
/* The padding ensures margins of the children are contained in the body. */
padding-top: 1px !important;
padding-bottom: 1px !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
/* When font-weight is different than the default browser style,
Chrome and Safari replace <strong> and <b> with spans with inline styles on pasting?! */
body.webkit strong,
body.webkit b {
font-weight: bold !important;
}
pre {
font-family: Consolas, Monaco, monospace;
}
td,
th {
font-family: inherit;
font-size: inherit;
}
/* For emoji replacement images */
img.emoji {
display: inline !important;
border: none !important;
height: 1em !important;
width: 1em !important;
margin: 0 .07em !important;
vertical-align: -0.1em !important;
background: none !important;
padding: 0 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.mceIEcenter {
text-align: center;
}
img {
height: auto;
max-width: 100%;
}
.wp-caption {
margin: 0; /* browser reset */
max-width: 100%;
}
/* iOS does not obey max-width if width is set. */
.ios .wp-caption {
width: auto !important;
}
dl.wp-caption dt.wp-caption-dt img {
display: inline-block;
margin-bottom: -1ex;
}
div.mceTemp {
-ms-user-select: element;
}
dl.wp-caption,
dl.wp-caption * {
-webkit-user-drag: none;
}
.wp-caption-dd {
font-size: 14px;
padding-top: 0.5em;
margin: 0; /* browser reset */
}
.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.alignleft {
float: left;
margin: 0.5em 1em 0.5em 0;
}
.alignright {
float: right;
margin: 0.5em 0 0.5em 1em;
}
/* Remove blue highlighting of selected images in WebKit */
img[data-mce-selected]::selection {
background-color: transparent;
}
/* Styles for the WordPress plugins */
.mce-content-body img[data-mce-placeholder] {
border-radius: 0;
padding: 0;
}
.mce-content-body img[data-wp-more] {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
width: 96%;
height: 16px;
display: block;
margin: 15px auto 0;
outline: 0;
cursor: default;
}
.mce-content-body img[data-mce-placeholder][data-mce-selected] {
outline: 1px dotted #888;
}
.mce-content-body img[data-wp-more="more"] {
background: transparent url( images/more.png ) repeat-y scroll center center;
}
.mce-content-body img[data-wp-more="nextpage"] {
background: transparent url( images/pagebreak.png ) repeat-y scroll center center;
}
/* Styles for formatting the boundaries of anchors and code elements */
.mce-content-body a[data-mce-selected] {
padding: 0 2px;
margin: 0 -2px;
border-radius: 2px;
box-shadow: 0 0 0 1px #bfe6ff;
background: #bfe6ff;
}
.mce-content-body .wp-caption-dt a[data-mce-selected] {
outline: none;
padding: 0;
margin: 0;
box-shadow: none;
background: transparent;
}
.mce-content-body code {
padding: 2px 4px;
margin: 0;
border-radius: 2px;
color: #222;
background: #f2f4f5;
}
.mce-content-body code[data-mce-selected] {
background: #e9ebec;
}
/* Gallery, audio, video placeholders */
.mce-content-body img.wp-media {
border: 1px solid #aaa;
background-color: #f2f2f2;
background-repeat: no-repeat;
background-position: center center;
width: 99%;
height: 250px;
outline: 0;
cursor: pointer;
}
.mce-content-body img.wp-media:hover {
background-color: #ededed;
border-color: #72777c;
}
.mce-content-body img.wp-media.wp-media-selected {
background-color: #d8d8d8;
border-color: #72777c;
}
.mce-content-body img.wp-media.wp-gallery {
background-image: url(images/gallery.png);
}
/* Image resize handles */
.mce-content-body div.mce-resizehandle {
border-color: #72777c;
width: 7px;
height: 7px;
}
.mce-content-body img[data-mce-selected] {
outline: 1px solid #72777c;
}
.mce-content-body img[data-mce-resize="false"] {
outline: 0;
}
audio,
video,
embed {
display: -moz-inline-stack;
display: inline-block;
}
audio {
visibility: hidden;
}
/* Fix for proprietary Mozilla display attribute, see #38757 */
[_moz_abspos] {
outline: none;
}
a[data-wplink-url-error],
a[data-wplink-url-error]:hover,
a[data-wplink-url-error]:focus {
outline: 2px dotted #dc3232;
position: relative;
}
a[data-wplink-url-error]:before {
content: "";
display: block;
position: absolute;
top: -2px;
right: -2px;
bottom: -2px;
left: -2px;
outline: 2px dotted #fff;
z-index: -1;
}
/**
* WP Views
*/
.wpview {
width: 99.99%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */
position: relative;
clear: both;
margin-bottom: 16px;
border: 1px solid transparent;
}
.mce-shim {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.wpview[data-mce-selected="2"] .mce-shim {
display: none;
}
.wpview .loading-placeholder {
border: 1px dashed #ccc;
padding: 10px;
}
.wpview[data-mce-selected] .loading-placeholder {
border-color: transparent;
}
/* A little "loading" animation, not showing in IE < 10 */
.wpview .wpview-loading {
width: 60px;
height: 5px;
overflow: hidden;
background-color: transparent;
margin: 10px auto 0;
}
.wpview .wpview-loading ins {
background-color: #333;
margin: 0 0 0 -60px;
width: 36px;
height: 5px;
display: block;
-webkit-animation: wpview-loading 1.3s infinite 1s steps(36);
animation: wpview-loading 1.3s infinite 1s steps(36);
}
@-webkit-keyframes wpview-loading {
0% {
margin-left: -60px;
}
100% {
margin-left: 60px;
}
}
@keyframes wpview-loading {
0% {
margin-left: -60px;
}
100% {
margin-left: 60px;
}
}
.wpview .wpview-content > iframe {
max-width: 100%;
background: transparent;
}
.wpview-error {
border: 1px solid #ddd;
padding: 1em 0;
margin: 0;
word-wrap: break-word;
}
.wpview[data-mce-selected] .wpview-error {
border-color: transparent;
}
.wpview-error .dashicons,
.loading-placeholder .dashicons {
display: block;
margin: 0 auto;
width: 32px;
height: 32px;
font-size: 32px;
}
.wpview-error p {
margin: 0;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.wpview-type-gallery:after {
content: "";
display: table;
clear: both;
}
.gallery img[data-mce-selected]:focus {
outline: none;
}
.gallery a {
cursor: default;
}
.gallery {
margin: auto -6px;
padding: 6px 0;
line-height: 1;
overflow-x: hidden;
}
.ie7 .gallery,
.ie8 .gallery {
margin: auto;
}
.gallery .gallery-item {
float: left;
margin: 0;
text-align: center;
padding: 6px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.ie7 .gallery .gallery-item,
.ie8 .gallery .gallery-item {
padding: 6px 0;
}
.gallery .gallery-caption,
.gallery .gallery-icon {
margin: 0;
}
.gallery .gallery-caption {
font-size: 13px;
margin: 4px 0;
}
.gallery-columns-1 .gallery-item {
width: 100%;
}
.gallery-columns-2 .gallery-item {
width: 50%;
}
.gallery-columns-3 .gallery-item {
width: 33.333%;
}
.ie8 .gallery-columns-3 .gallery-item,
.ie7 .gallery-columns-3 .gallery-item {
width: 33%;
}
.gallery-columns-4 .gallery-item {
width: 25%;
}
.gallery-columns-5 .gallery-item {
width: 20%;
}
.gallery-columns-6 .gallery-item {
width: 16.665%;
}
.gallery-columns-7 .gallery-item {
width: 14.285%;
}
.gallery-columns-8 .gallery-item {
width: 12.5%;
}
.gallery-columns-9 .gallery-item {
width: 11.111%;
}
.gallery img {
max-width: 100%;
height: auto;
border: none;
padding: 0;
}
img.wp-oembed {
border: 1px dashed #888;
background: #f7f5f2 url(images/embedded.png) no-repeat scroll center center;
width: 300px;
height: 250px;
outline: 0;
}
/* rtl */
.rtl .gallery .gallery-item {
float: right;
}
@media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
.mce-content-body img.mce-wp-more {
background-image: url( images/more-2x.png );
background-size: 1900px 20px;
}
.mce-content-body img.mce-wp-nextpage {
background-image: url( images/pagebreak-2x.png );
background-size: 1900px 20px;
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

542
wp-includes/js/tinymce/tiny_mce_popup.js vendored Normal file
View file

@ -0,0 +1,542 @@
/**
* tinymce_mce_popup.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
var tinymce, tinyMCE;
/**
* TinyMCE popup/dialog helper class. This gives you easy access to the
* parent editor instance and a bunch of other things. It's higly recommended
* that you load this script into your dialogs.
*
* @static
* @class tinyMCEPopup
*/
var tinyMCEPopup = {
/**
* Initializes the popup this will be called automatically.
*
* @method init
*/
init: function () {
var self = this, parentWin, settings, uiWindow;
// Find window & API
parentWin = self.getWin();
tinymce = tinyMCE = parentWin.tinymce;
self.editor = tinymce.EditorManager.activeEditor;
self.params = self.editor.windowManager.getParams();
uiWindow = self.editor.windowManager.windows[self.editor.windowManager.windows.length - 1];
self.features = uiWindow.features;
self.uiWindow = uiWindow;
settings = self.editor.settings;
// Setup popup CSS path(s)
if (settings.popup_css !== false) {
if (settings.popup_css) {
settings.popup_css = self.editor.documentBaseURI.toAbsolute(settings.popup_css);
} else {
settings.popup_css = self.editor.baseURI.toAbsolute("plugins/compat3x/css/dialog.css");
}
}
if (settings.popup_css_add) {
settings.popup_css += ',' + self.editor.documentBaseURI.toAbsolute(settings.popup_css_add);
}
// Setup local DOM
self.dom = self.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document, {
ownEvents: true,
proxy: tinyMCEPopup._eventProxy
});
self.dom.bind(window, 'ready', self._onDOMLoaded, self);
// Enables you to skip loading the default css
if (self.features.popup_css !== false) {
self.dom.loadCSS(self.features.popup_css || self.editor.settings.popup_css);
}
// Setup on init listeners
self.listeners = [];
/**
* Fires when the popup is initialized.
*
* @event onInit
* @param {tinymce.Editor} editor Editor instance.
* @example
* // Alerts the selected contents when the dialog is loaded
* tinyMCEPopup.onInit.add(function(ed) {
* alert(ed.selection.getContent());
* });
*
* // Executes the init method on page load in some object using the SomeObject scope
* tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
*/
self.onInit = {
add: function (func, scope) {
self.listeners.push({ func: func, scope: scope });
}
};
self.isWindow = !self.getWindowArg('mce_inline');
self.id = self.getWindowArg('mce_window_id');
},
/**
* Returns the reference to the parent window that opened the dialog.
*
* @method getWin
* @return {Window} Reference to the parent window that opened the dialog.
*/
getWin: function () {
// Added frameElement check to fix bug: #2817583
return (!window.frameElement && window.dialogArguments) || opener || parent || top;
},
/**
* Returns a window argument/parameter by name.
*
* @method getWindowArg
* @param {String} name Name of the window argument to retrieve.
* @param {String} defaultValue Optional default value to return.
* @return {String} Argument value or default value if it wasn't found.
*/
getWindowArg: function (name, defaultValue) {
var value = this.params[name];
return tinymce.is(value) ? value : defaultValue;
},
/**
* Returns a editor parameter/config option value.
*
* @method getParam
* @param {String} name Name of the editor config option to retrieve.
* @param {String} defaultValue Optional default value to return.
* @return {String} Parameter value or default value if it wasn't found.
*/
getParam: function (name, defaultValue) {
return this.editor.getParam(name, defaultValue);
},
/**
* Returns a language item by key.
*
* @method getLang
* @param {String} name Language item like mydialog.something.
* @param {String} defaultValue Optional default value to return.
* @return {String} Language value for the item like "my string" or the default value if it wasn't found.
*/
getLang: function (name, defaultValue) {
return this.editor.getLang(name, defaultValue);
},
/**
* Executed a command on editor that opened the dialog/popup.
*
* @method execCommand
* @param {String} cmd Command to execute.
* @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
* @param {Object} val Optional value to pass with the comman like an URL.
* @param {Object} a Optional arguments object.
*/
execCommand: function (cmd, ui, val, args) {
args = args || {};
args.skip_focus = 1;
this.restoreSelection();
return this.editor.execCommand(cmd, ui, val, args);
},
/**
* Resizes the dialog to the inner size of the window. This is needed since various browsers
* have different border sizes on windows.
*
* @method resizeToInnerSize
*/
resizeToInnerSize: function () {
/*var self = this;
// Detach it to workaround a Chrome specific bug
// https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281
setTimeout(function() {
var vp = self.dom.getViewPort(window);
self.editor.windowManager.resizeBy(
self.getWindowArg('mce_width') - vp.w,
self.getWindowArg('mce_height') - vp.h,
self.id || window
);
}, 10);*/
},
/**
* Will executed the specified string when the page has been loaded. This function
* was added for compatibility with the 2.x branch.
*
* @method executeOnLoad
* @param {String} evil String to evalutate on init.
*/
executeOnLoad: function (evil) {
this.onInit.add(function () {
eval(evil);
});
},
/**
* Stores the current editor selection for later restoration. This can be useful since some browsers
* looses it's selection if a control element is selected/focused inside the dialogs.
*
* @method storeSelection
*/
storeSelection: function () {
this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
},
/**
* Restores any stored selection. This can be useful since some browsers
* looses it's selection if a control element is selected/focused inside the dialogs.
*
* @method restoreSelection
*/
restoreSelection: function () {
var self = tinyMCEPopup;
if (!self.isWindow && tinymce.isIE) {
self.editor.selection.moveToBookmark(self.editor.windowManager.bookmark);
}
},
/**
* Loads a specific dialog language pack. If you pass in plugin_url as a argument
* when you open the window it will load the <plugin url>/langs/<code>_dlg.js lang pack file.
*
* @method requireLangPack
*/
requireLangPack: function () {
var self = this, url = self.getWindowArg('plugin_url') || self.getWindowArg('theme_url'), settings = self.editor.settings, lang;
if (settings.language !== false) {
lang = settings.language || "en";
}
if (url && lang && self.features.translate_i18n !== false && settings.language_load !== false) {
url += '/langs/' + lang + '_dlg.js';
if (!tinymce.ScriptLoader.isDone(url)) {
document.write('<script type="text/javascript" src="' + url + '"></script>');
tinymce.ScriptLoader.markDone(url);
}
}
},
/**
* Executes a color picker on the specified element id. When the user
* then selects a color it will be set as the value of the specified element.
*
* @method pickColor
* @param {DOMEvent} e DOM event object.
* @param {string} element_id Element id to be filled with the color value from the picker.
*/
pickColor: function (e, element_id) {
var el = document.getElementById(element_id), colorPickerCallback = this.editor.settings.color_picker_callback;
if (colorPickerCallback) {
colorPickerCallback.call(
this.editor,
function (value) {
el.value = value;
try {
el.onchange();
} catch (ex) {
// Try fire event, ignore errors
}
},
el.value
);
}
},
/**
* Opens a filebrowser/imagebrowser this will set the output value from
* the browser as a value on the specified element.
*
* @method openBrowser
* @param {string} element_id Id of the element to set value in.
* @param {string} type Type of browser to open image/file/flash.
* @param {string} option Option name to get the file_broswer_callback function name from.
*/
openBrowser: function (element_id, type) {
tinyMCEPopup.restoreSelection();
this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
},
/**
* Creates a confirm dialog. Please don't use the blocking behavior of this
* native version use the callback method instead then it can be extended.
*
* @method confirm
* @param {String} t Title for the new confirm dialog.
* @param {function} cb Callback function to be executed after the user has selected ok or cancel.
* @param {Object} s Optional scope to execute the callback in.
*/
confirm: function (t, cb, s) {
this.editor.windowManager.confirm(t, cb, s, window);
},
/**
* Creates a alert dialog. Please don't use the blocking behavior of this
* native version use the callback method instead then it can be extended.
*
* @method alert
* @param {String} tx Title for the new alert dialog.
* @param {function} cb Callback function to be executed after the user has selected ok.
* @param {Object} s Optional scope to execute the callback in.
*/
alert: function (tx, cb, s) {
this.editor.windowManager.alert(tx, cb, s, window);
},
/**
* Closes the current window.
*
* @method close
*/
close: function () {
var t = this;
// To avoid domain relaxing issue in Opera
function close() {
t.editor.windowManager.close(window);
tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
}
if (tinymce.isOpera) {
t.getWin().setTimeout(close, 0);
} else {
close();
}
},
// Internal functions
_restoreSelection: function () {
var e = window.event.srcElement;
if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button')) {
tinyMCEPopup.restoreSelection();
}
},
/* _restoreSelection : function() {
var e = window.event.srcElement;
// If user focus a non text input or textarea
if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
tinyMCEPopup.restoreSelection();
},*/
_onDOMLoaded: function () {
var t = tinyMCEPopup, ti = document.title, h, nv;
// Translate page
if (t.features.translate_i18n !== false) {
var map = {
"update": "Ok",
"insert": "Ok",
"cancel": "Cancel",
"not_set": "--",
"class_name": "Class name",
"browse": "Browse"
};
var langCode = (tinymce.settings ? tinymce.settings : t.editor.settings).language || 'en';
for (var key in map) {
tinymce.i18n.data[langCode + "." + key] = tinymce.i18n.translate(map[key]);
}
h = document.body.innerHTML;
// Replace a=x with a="x" in IE
if (tinymce.isIE) {
h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"');
}
document.dir = t.editor.getParam('directionality', '');
if ((nv = t.editor.translate(h)) && nv != h) {
document.body.innerHTML = nv;
}
if ((nv = t.editor.translate(ti)) && nv != ti) {
document.title = ti = nv;
}
}
if (!t.editor.getParam('browser_preferred_colors', false) || !t.isWindow) {
t.dom.addClass(document.body, 'forceColors');
}
document.body.style.display = '';
// Restore selection in IE when focus is placed on a non textarea or input element of the type text
if (tinymce.Env.ie) {
if (tinymce.Env.ie < 11) {
document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
// Add base target element for it since it would fail with modal dialogs
t.dom.add(t.dom.select('head')[0], 'base', { target: '_self' });
} else {
document.addEventListener('mouseup', tinyMCEPopup._restoreSelection, false);
}
}
t.restoreSelection();
t.resizeToInnerSize();
// Set inline title
if (!t.isWindow) {
t.editor.windowManager.setTitle(window, ti);
} else {
window.focus();
}
if (!tinymce.isIE && !t.isWindow) {
t.dom.bind(document, 'focus', function () {
t.editor.windowManager.focus(t.id);
});
}
// Patch for accessibility
tinymce.each(t.dom.select('select'), function (e) {
e.onkeydown = tinyMCEPopup._accessHandler;
});
// Call onInit
// Init must be called before focus so the selection won't get lost by the focus call
tinymce.each(t.listeners, function (o) {
o.func.call(o.scope, t.editor);
});
// Move focus to window
if (t.getWindowArg('mce_auto_focus', true)) {
window.focus();
// Focus element with mceFocus class
tinymce.each(document.forms, function (f) {
tinymce.each(f.elements, function (e) {
if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
e.focus();
return false; // Break loop
}
});
});
}
document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
if ('textContent' in document) {
t.uiWindow.getEl('head').firstChild.textContent = document.title;
} else {
t.uiWindow.getEl('head').firstChild.innerText = document.title;
}
},
_accessHandler: function (e) {
e = e || window.event;
if (e.keyCode == 13 || e.keyCode == 32) {
var elm = e.target || e.srcElement;
if (elm.onchange) {
elm.onchange();
}
return tinymce.dom.Event.cancel(e);
}
},
_closeWinKeyHandler: function (e) {
e = e || window.event;
if (e.keyCode == 27) {
tinyMCEPopup.close();
}
},
_eventProxy: function (id) {
return function (evt) {
tinyMCEPopup.dom.events.callNativeHandler(id, evt);
};
}
};
tinyMCEPopup.init();
tinymce.util.Dispatcher = function (scope) {
this.scope = scope || this;
this.listeners = [];
this.add = function (callback, scope) {
this.listeners.push({ cb: callback, scope: scope || this.scope });
return callback;
};
this.addToTop = function (callback, scope) {
var self = this, listener = { cb: callback, scope: scope || self.scope };
// Create new listeners if addToTop is executed in a dispatch loop
if (self.inDispatch) {
self.listeners = [listener].concat(self.listeners);
} else {
self.listeners.unshift(listener);
}
return callback;
};
this.remove = function (callback) {
var listeners = this.listeners, output = null;
tinymce.each(listeners, function (listener, i) {
if (callback == listener.cb) {
output = listener;
listeners.splice(i, 1);
return false;
}
});
return output;
};
this.dispatch = function () {
var self = this, returnValue, args = arguments, i, listeners = self.listeners, listener;
self.inDispatch = true;
// Needs to be a real loop since the listener count might change while looping
// And this is also more efficient
for (i = 0; i < listeners.length; i++) {
listener = listeners[i];
returnValue = listener.cb.apply(listener.scope, args.length > 0 ? args : [listener.scope]);
if (returnValue === false) {
break;
}
}
self.inDispatch = false;
return returnValue;
};
};

2
wp-includes/js/tinymce/tinymce.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,72 @@
/**
* editable_selects.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
var TinyMCE_EditableSelects = {
editSelectElm : null,
init : function () {
var nl = document.getElementsByTagName("select"), i, d = document, o;
for (i = 0; i < nl.length; i++) {
if (nl[i].className.indexOf('mceEditableSelect') != -1) {
o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
o.className = 'mceAddSelectValue';
nl[i].options[nl[i].options.length] = o;
nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
}
}
},
onChangeEditableSelect : function (e) {
var d = document, ne, se = window.event ? window.event.srcElement : e.target;
if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
ne = d.createElement("input");
ne.id = se.id + "_custom";
ne.name = se.name + "_custom";
ne.type = "text";
ne.style.width = se.offsetWidth + 'px';
se.parentNode.insertBefore(ne, se);
se.style.display = 'none';
ne.focus();
ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
TinyMCE_EditableSelects.editSelectElm = se;
}
},
onBlurEditableSelectInput : function () {
var se = TinyMCE_EditableSelects.editSelectElm;
if (se) {
if (se.previousSibling.value != '') {
addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
selectByValue(document.forms[0], se.id, se.previousSibling.value);
} else {
selectByValue(document.forms[0], se.id, '');
}
se.style.display = 'inline';
se.parentNode.removeChild(se.previousSibling);
TinyMCE_EditableSelects.editSelectElm = null;
}
},
onKeyDown : function (e) {
e = e || window.event;
if (e.keyCode == 13) {
TinyMCE_EditableSelects.onBlurEditableSelectInput();
}
}
};

View file

@ -0,0 +1,222 @@
/**
* form_utils.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
function getColorPickerHTML(id, target_form_element) {
var h = "", dom = tinyMCEPopup.dom;
if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
label.id = label.id || dom.uniqueId();
}
h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element + '\');" onmousedown="return false;" class="pickcolor">';
h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
return h;
}
function updateColor(img_id, form_element_id) {
document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
}
function setBrowserDisabled(id, state) {
var img = document.getElementById(id);
var lnk = document.getElementById(id + "_link");
if (lnk) {
if (state) {
lnk.setAttribute("realhref", lnk.getAttribute("href"));
lnk.removeAttribute("href");
tinyMCEPopup.dom.addClass(img, 'disabled');
} else {
if (lnk.getAttribute("realhref")) {
lnk.setAttribute("href", lnk.getAttribute("realhref"));
}
tinyMCEPopup.dom.removeClass(img, 'disabled');
}
}
}
function getBrowserHTML(id, target_form_element, type, prefix) {
var option = prefix + "_" + type + "_browser_callback", cb, html;
cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
if (!cb) {
return "";
}
html = "";
html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
return html;
}
function openBrowser(img_id, target_form_element, type, option) {
var img = document.getElementById(img_id);
if (img.className != "mceButtonDisabled") {
tinyMCEPopup.openBrowser(target_form_element, type, option);
}
}
function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
if (!form_obj || !form_obj.elements[field_name]) {
return;
}
if (!value) {
value = "";
}
var sel = form_obj.elements[field_name];
var found = false;
for (var i = 0; i < sel.options.length; i++) {
var option = sel.options[i];
if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
option.selected = true;
found = true;
} else {
option.selected = false;
}
}
if (!found && add_custom && value != '') {
var option = new Option(value, value);
option.selected = true;
sel.options[sel.options.length] = option;
sel.selectedIndex = sel.options.length - 1;
}
return found;
}
function getSelectValue(form_obj, field_name) {
var elm = form_obj.elements[field_name];
if (elm == null || elm.options == null || elm.selectedIndex === -1) {
return "";
}
return elm.options[elm.selectedIndex].value;
}
function addSelectValue(form_obj, field_name, name, value) {
var s = form_obj.elements[field_name];
var o = new Option(name, value);
s.options[s.options.length] = o;
}
function addClassesToList(list_id, specific_option) {
// Setup class droplist
var styleSelectElm = document.getElementById(list_id);
var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
styles = tinyMCEPopup.getParam(specific_option, styles);
if (styles) {
var stylesAr = styles.split(';');
for (var i = 0; i < stylesAr.length; i++) {
if (stylesAr != "") {
var key, value;
key = stylesAr[i].split('=')[0];
value = stylesAr[i].split('=')[1];
styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
}
}
} else {
/*tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
});*/
}
}
function isVisible(element_id) {
var elm = document.getElementById(element_id);
return elm && elm.style.display != "none";
}
function convertRGBToHex(col) {
var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
var rgb = col.replace(re, "$1,$2,$3").split(',');
if (rgb.length == 3) {
r = parseInt(rgb[0]).toString(16);
g = parseInt(rgb[1]).toString(16);
b = parseInt(rgb[2]).toString(16);
r = r.length == 1 ? '0' + r : r;
g = g.length == 1 ? '0' + g : g;
b = b.length == 1 ? '0' + b : b;
return "#" + r + g + b;
}
return col;
}
function convertHexToRGB(col) {
if (col.indexOf('#') != -1) {
col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
r = parseInt(col.substring(0, 2), 16);
g = parseInt(col.substring(2, 4), 16);
b = parseInt(col.substring(4, 6), 16);
return "rgb(" + r + "," + g + "," + b + ")";
}
return col;
}
function trimSize(size) {
return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
}
function getCSSSize(size) {
size = trimSize(size);
if (size == "") {
return "";
}
// Add px
if (/^[0-9]+$/.test(size)) {
size += 'px';
}
// Sanity check, IE doesn't like broken values
else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size))) {
return "";
}
return size;
}
function getStyle(elm, attrib, style) {
var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
if (val != '') {
return '' + val;
}
if (typeof (style) == 'undefined') {
style = attrib;
}
return tinyMCEPopup.dom.getStyle(elm, style);
}

View file

@ -0,0 +1,168 @@
/**
* mctabs.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/*jshint globals: tinyMCEPopup */
function MCTabs() {
this.settings = [];
this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
}
MCTabs.prototype.init = function (settings) {
this.settings = settings;
};
MCTabs.prototype.getParam = function (name, default_value) {
var value = null;
value = (typeof (this.settings[name]) == "undefined") ? default_value : this.settings[name];
// Fix bool values
if (value == "true" || value == "false") {
return (value == "true");
}
return value;
};
MCTabs.prototype.showTab = function (tab) {
tab.className = 'current';
tab.setAttribute("aria-selected", true);
tab.setAttribute("aria-expanded", true);
tab.tabIndex = 0;
};
MCTabs.prototype.hideTab = function (tab) {
var t = this;
tab.className = '';
tab.setAttribute("aria-selected", false);
tab.setAttribute("aria-expanded", false);
tab.tabIndex = -1;
};
MCTabs.prototype.showPanel = function (panel) {
panel.className = 'current';
panel.setAttribute("aria-hidden", false);
};
MCTabs.prototype.hidePanel = function (panel) {
panel.className = 'panel';
panel.setAttribute("aria-hidden", true);
};
MCTabs.prototype.getPanelForTab = function (tabElm) {
return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
};
MCTabs.prototype.displayTab = function (tab_id, panel_id, avoid_focus) {
var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
tabElm = document.getElementById(tab_id);
if (panel_id === undefined) {
panel_id = t.getPanelForTab(tabElm);
}
panelElm = document.getElementById(panel_id);
panelContainerElm = panelElm ? panelElm.parentNode : null;
tabContainerElm = tabElm ? tabElm.parentNode : null;
selectionClass = t.getParam('selection_class', 'current');
if (tabElm && tabContainerElm) {
nodes = tabContainerElm.childNodes;
// Hide all other tabs
for (i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName == "LI") {
t.hideTab(nodes[i]);
}
}
// Show selected tab
t.showTab(tabElm);
}
if (panelElm && panelContainerElm) {
nodes = panelContainerElm.childNodes;
// Hide all other panels
for (i = 0; i < nodes.length; i++) {
if (nodes[i].nodeName == "DIV") {
t.hidePanel(nodes[i]);
}
}
if (!avoid_focus) {
tabElm.focus();
}
// Show selected panel
t.showPanel(panelElm);
}
};
MCTabs.prototype.getAnchor = function () {
var pos, url = document.location.href;
if ((pos = url.lastIndexOf('#')) != -1) {
return url.substring(pos + 1);
}
return "";
};
//Global instance
var mcTabs = new MCTabs();
tinyMCEPopup.onInit.add(function () {
var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
each(dom.select('div.tabs'), function (tabContainerElm) {
//var keyNav;
dom.setAttrib(tabContainerElm, "role", "tablist");
var items = tinyMCEPopup.dom.select('li', tabContainerElm);
var action = function (id) {
mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
mcTabs.onChange.dispatch(id);
};
each(items, function (item) {
dom.setAttrib(item, 'role', 'tab');
dom.bind(item, 'click', function (evt) {
action(item.id);
});
});
dom.bind(dom.getRoot(), 'keydown', function (evt) {
if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
//keyNav.moveFocus(evt.shiftKey ? -1 : 1);
tinymce.dom.Event.cancel(evt);
}
});
each(dom.select('a', tabContainerElm), function (a) {
dom.setAttrib(a, 'tabindex', '-1');
});
/*keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
root: tabContainerElm,
items: items,
onAction: action,
actOnFocus: true,
enableLeftRight: true,
enableUpDown: true
}, tinyMCEPopup.dom);*/
}
);
});

View file

@ -0,0 +1,267 @@
/**
* validate.js
*
* Released under LGPL License.
* Copyright (c) 1999-2017 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/**
// String validation:
if (!Validator.isEmail('myemail'))
alert('Invalid email.');
// Form validation:
var f = document.forms['myform'];
if (!Validator.isEmail(f.myemail))
alert('Invalid email.');
*/
var Validator = {
isEmail : function (s) {
return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
},
isAbsUrl : function (s) {
return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
},
isSize : function (s) {
return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
},
isId : function (s) {
return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
},
isEmpty : function (s) {
var nl, i;
if (s.nodeName == 'SELECT' && s.selectedIndex < 1) {
return true;
}
if (s.type == 'checkbox' && !s.checked) {
return true;
}
if (s.type == 'radio') {
for (i = 0, nl = s.form.elements; i < nl.length; i++) {
if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked) {
return false;
}
}
return true;
}
return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
},
isNumber : function (s, d) {
return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
},
test : function (s, p) {
s = s.nodeType == 1 ? s.value : s;
return s == '' || new RegExp(p).test(s);
}
};
var AutoValidator = {
settings : {
id_cls : 'id',
int_cls : 'int',
url_cls : 'url',
number_cls : 'number',
email_cls : 'email',
size_cls : 'size',
required_cls : 'required',
invalid_cls : 'invalid',
min_cls : 'min',
max_cls : 'max'
},
init : function (s) {
var n;
for (n in s) {
this.settings[n] = s[n];
}
},
validate : function (f) {
var i, nl, s = this.settings, c = 0;
nl = this.tags(f, 'label');
for (i = 0; i < nl.length; i++) {
this.removeClass(nl[i], s.invalid_cls);
nl[i].setAttribute('aria-invalid', false);
}
c += this.validateElms(f, 'input');
c += this.validateElms(f, 'select');
c += this.validateElms(f, 'textarea');
return c == 3;
},
invalidate : function (n) {
this.mark(n.form, n);
},
getErrorMessages : function (f) {
var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
nl = this.tags(f, "label");
for (i = 0; i < nl.length; i++) {
if (this.hasClass(nl[i], s.invalid_cls)) {
field = document.getElementById(nl[i].getAttribute("for"));
values = { field: nl[i].textContent };
if (this.hasClass(field, s.min_cls, true)) {
message = ed.getLang('invalid_data_min');
values.min = this.getNum(field, s.min_cls);
} else if (this.hasClass(field, s.number_cls)) {
message = ed.getLang('invalid_data_number');
} else if (this.hasClass(field, s.size_cls)) {
message = ed.getLang('invalid_data_size');
} else {
message = ed.getLang('invalid_data');
}
message = message.replace(/{\#([^}]+)\}/g, function (a, b) {
return values[b] || '{#' + b + '}';
});
messages.push(message);
}
}
return messages;
},
reset : function (e) {
var t = ['label', 'input', 'select', 'textarea'];
var i, j, nl, s = this.settings;
if (e == null) {
return;
}
for (i = 0; i < t.length; i++) {
nl = this.tags(e.form ? e.form : e, t[i]);
for (j = 0; j < nl.length; j++) {
this.removeClass(nl[j], s.invalid_cls);
nl[j].setAttribute('aria-invalid', false);
}
}
},
validateElms : function (f, e) {
var nl, i, n, s = this.settings, st = true, va = Validator, v;
nl = this.tags(f, e);
for (i = 0; i < nl.length; i++) {
n = nl[i];
this.removeClass(n, s.invalid_cls);
if (this.hasClass(n, s.required_cls) && va.isEmpty(n)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.number_cls) && !va.isNumber(n)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.email_cls) && !va.isEmail(n)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.size_cls) && !va.isSize(n)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.id_cls) && !va.isId(n)) {
st = this.mark(f, n);
}
if (this.hasClass(n, s.min_cls, true)) {
v = this.getNum(n, s.min_cls);
if (isNaN(v) || parseInt(n.value) < parseInt(v)) {
st = this.mark(f, n);
}
}
if (this.hasClass(n, s.max_cls, true)) {
v = this.getNum(n, s.max_cls);
if (isNaN(v) || parseInt(n.value) > parseInt(v)) {
st = this.mark(f, n);
}
}
}
return st;
},
hasClass : function (n, c, d) {
return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
},
getNum : function (n, c) {
c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
c = c.replace(/[^0-9]/g, '');
return c;
},
addClass : function (n, c, b) {
var o = this.removeClass(n, c);
n.className = b ? c + (o !== '' ? (' ' + o) : '') : (o !== '' ? (o + ' ') : '') + c;
},
removeClass : function (n, c) {
c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
return n.className = c !== ' ' ? c : '';
},
tags : function (f, s) {
return f.getElementsByTagName(s);
},
mark : function (f, n) {
var s = this.settings;
this.addClass(n, s.invalid_cls);
n.setAttribute('aria-invalid', 'true');
this.markLabels(f, n, s.invalid_cls);
return false;
},
markLabels : function (f, n, ic) {
var nl, i;
nl = this.tags(f, "label");
for (i = 0; i < nl.length; i++) {
if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id) {
this.addClass(nl[i], ic);
}
}
return null;
}
};

File diff suppressed because one or more lines are too long