@richscripts/richtexteditor 2.15.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/angular/build-manifest.json +4 -4
- package/angular/index.mjs +1 -1
- package/index.d.ts +42 -33
- package/integrations/shared.js +10 -0
- package/package.json +1 -1
- package/richtexteditor/all_plugins.js +2062 -1542
- package/richtexteditor/all_plugins.min.js +76 -61
- package/richtexteditor/lang/rte-lang-de.js +33 -0
- package/richtexteditor/lang/rte-lang-es.js +33 -0
- package/richtexteditor/lang/rte-lang-fr.js +33 -0
- package/richtexteditor/lang/rte-lang-it.js +33 -0
- package/richtexteditor/lang/rte-lang-ja.js +33 -0
- package/richtexteditor/lang/rte-lang-ko.js +33 -0
- package/richtexteditor/lang/rte-lang-nl.js +33 -0
- package/richtexteditor/lang/rte-lang-pt-pt.js +33 -0
- package/richtexteditor/lang/rte-lang-pt.js +33 -0
- package/richtexteditor/lang/rte-lang-ru.js +33 -0
- package/richtexteditor/lang/rte-lang-zh-Hans.js +33 -0
- package/richtexteditor/lang/rte-lang-zh-Hant.js +33 -0
- package/richtexteditor/plugins/a11yenhance.js +3 -1
- package/richtexteditor/plugins/a11yenhance.min.js +1 -1
- package/richtexteditor/plugins/accessibilitychecker.js +7 -7
- package/richtexteditor/plugins/accessibilitychecker.min.js +1 -1
- package/richtexteditor/plugins/aitoolkit.js +91 -83
- package/richtexteditor/plugins/aitoolkit.min.js +4 -4
- package/richtexteditor/plugins/all_plugins.js +2062 -1542
- package/richtexteditor/plugins/all_plugins.min.js +76 -61
- package/richtexteditor/plugins/autoembed.js +1 -1
- package/richtexteditor/plugins/autoembed.min.js +1 -1
- package/richtexteditor/plugins/charlimit.js +2 -2
- package/richtexteditor/plugins/charlimit.min.js +2 -2
- package/richtexteditor/plugins/comments.js +2 -2
- package/richtexteditor/plugins/comments.min.js +2 -2
- package/richtexteditor/plugins/contentminimap.js +3 -3
- package/richtexteditor/plugins/contentminimap.min.js +1 -1
- package/richtexteditor/plugins/crdt-engine.js +27 -1
- package/richtexteditor/plugins/documentimport.js +30 -8
- package/richtexteditor/plugins/documentimport.min.js +4 -4
- package/richtexteditor/plugins/docxexport.js +30 -1
- package/richtexteditor/plugins/docxexport.min.js +2 -2
- package/richtexteditor/plugins/emojiautocomplete.js +1 -1
- package/richtexteditor/plugins/emojiautocomplete.min.js +1 -1
- package/richtexteditor/plugins/html2pdf.js +7 -7
- package/richtexteditor/plugins/html2pdf.min.js +1 -1
- package/richtexteditor/plugins/imageeditor.js +19 -6
- package/richtexteditor/plugins/imageeditor.min.js +1 -1
- package/richtexteditor/plugins/insertcode.js +8 -8
- package/richtexteditor/plugins/insertcode.min.js +4 -4
- package/richtexteditor/plugins/insertemoji.js +4 -4
- package/richtexteditor/plugins/insertemoji.min.js +1 -1
- package/richtexteditor/plugins/insertgallery.js +4 -4
- package/richtexteditor/plugins/insertgallery.min.js +1 -1
- package/richtexteditor/plugins/inserttemplate.js +10 -2
- package/richtexteditor/plugins/inserttemplate.min.js +1 -1
- package/richtexteditor/plugins/markdownexport.js +1 -1
- package/richtexteditor/plugins/markdownexport.min.js +2 -2
- package/richtexteditor/plugins/mentionplugin.js +2 -2
- package/richtexteditor/plugins/mentionplugin.min.js +1 -1
- package/richtexteditor/plugins/mermaiddiagram.js +5 -5
- package/richtexteditor/plugins/mermaiddiagram.min.js +2 -2
- package/richtexteditor/plugins/nodetypes.js +1 -1
- package/richtexteditor/plugins/nodetypes.min.js +1 -1
- package/richtexteditor/plugins/pagination.js +2 -2
- package/richtexteditor/plugins/pagination.min.js +1 -1
- package/richtexteditor/plugins/pdfexport.js +1751 -1366
- package/richtexteditor/plugins/pdfexport.min.js +28 -13
- package/richtexteditor/plugins/readaloud.js +1 -1
- package/richtexteditor/plugins/readaloud.min.js +1 -1
- package/richtexteditor/plugins/revisionhistory.js +4 -4
- package/richtexteditor/plugins/revisionhistory.min.js +2 -2
- package/richtexteditor/plugins/rubyannotation.js +2 -2
- package/richtexteditor/plugins/rubyannotation.min.js +1 -1
- package/richtexteditor/plugins/sanitizer.js +57 -4
- package/richtexteditor/plugins/sanitizer.min.js +1 -1
- package/richtexteditor/plugins/slashcommand.js +2 -2
- package/richtexteditor/plugins/slashcommand.min.js +2 -2
- package/richtexteditor/plugins/smartchips.js +3 -3
- package/richtexteditor/plugins/smartchips.min.js +1 -1
- package/richtexteditor/plugins/spellcheck.js +3 -3
- package/richtexteditor/plugins/spellcheck.min.js +1 -1
- package/richtexteditor/plugins/stateinspector.js +2 -2
- package/richtexteditor/plugins/stateinspector.min.js +2 -2
- package/richtexteditor/plugins/structured-content-bridge.js +34 -8
- package/richtexteditor/plugins/structured-content-bridge.min.js +5 -5
- package/richtexteditor/plugins/textdirection.js +1 -1
- package/richtexteditor/plugins/textdirection.min.js +1 -1
- package/richtexteditor/plugins/trackedchanges.js +1 -1
- package/richtexteditor/plugins/trackedchanges.min.js +1 -1
- package/richtexteditor/plugins/yjscollab.js +2 -2
- package/richtexteditor/plugins/yjscollab.min.js +1 -1
- package/richtexteditor/rte-config.js +14 -36
- package/richtexteditor/rte-watchdog.js +3 -1
- package/richtexteditor/rte-webcomponent.js +3 -1
- package/richtexteditor/rte.js +16 -38
- package/richtexteditor/runtime/colorpicker_more_ns.htm +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_emojiautocomplete=RTE_Plugin_EmojiAutocomplete,RTE_DefaultConfig.emojiAutocompleteEnabled=typeof RTE_DefaultConfig.emojiAutocompleteEnabled>"u"?!0:RTE_DefaultConfig.emojiAutocompleteEnabled,RTE_DefaultConfig.emojiShortcodes=RTE_DefaultConfig.emojiShortcodes||{smile:"\u{1F604}",smiley:"\u{1F603}",grin:"\u{1F601}",laughing:"\u{1F606}",satisfied:"\u{1F606}",joy:"\u{1F602}",rofl:"\u{1F923}",sweat_smile:"\u{1F605}",wink:"\u{1F609}",blush:"\u{1F60A}",innocent:"\u{1F607}",heart_eyes:"\u{1F60D}",star_struck:"\u{1F929}",kissing_heart:"\u{1F618}",yum:"\u{1F60B}",stuck_out_tongue:"\u{1F61B}",zany:"\u{1F92A}",thinking:"\u{1F914}",shush:"\u{1F92B}",neutral_face:"\u{1F610}",expressionless:"\u{1F611}",no_mouth:"\u{1F636}",smirk:"\u{1F60F}",unamused:"\u{1F612}",roll_eyes:"\u{1F644}",grimacing:"\u{1F62C}",relieved:"\u{1F60C}",pensive:"\u{1F614}",sleepy:"\u{1F62A}",sleeping:"\u{1F634}",mask:"\u{1F637}",face_with_thermometer:"\u{1F912}",nauseated_face:"\u{1F922}",sneezing_face:"\u{1F927}",dizzy_face:"\u{1F635}",exploding_head:"\u{1F92F}",cowboy:"\u{1F920}",sunglasses:"\u{1F60E}",nerd:"\u{1F913}",monocle:"\u{1F9D0}",confused:"\u{1F615}",worried:"\u{1F61F}",slightly_frowning_face:"\u{1F641}",open_mouth:"\u{1F62E}",astonished:"\u{1F632}",flushed:"\u{1F633}",fearful:"\u{1F628}",cold_sweat:"\u{1F630}",cry:"\u{1F622}",sob:"\u{1F62D}",scream:"\u{1F631}",confounded:"\u{1F616}",persevere:"\u{1F623}",disappointed:"\u{1F61E}",sweat:"\u{1F613}",weary:"\u{1F629}",tired_face:"\u{1F62B}",triumph:"\u{1F624}",rage:"\u{1F621}",angry:"\u{1F620}",cursing_face:"\u{1F92C}",smiling_imp:"\u{1F608}",imp:"\u{1F47F}",skull:"\u{1F480}",poop:"\u{1F4A9}",hankey:"\u{1F4A9}",clown:"\u{1F921}",ghost:"\u{1F47B}",alien:"\u{1F47D}",robot:"\u{1F916}",heart_eyes_cat:"\u{1F63B}",see_no_evil:"\u{1F648}",hear_no_evil:"\u{1F649}",speak_no_evil:"\u{1F64A}",heart:"\u2764\uFE0F",orange_heart:"\u{1F9E1}",yellow_heart:"\u{1F49B}",green_heart:"\u{1F49A}",blue_heart:"\u{1F499}",purple_heart:"\u{1F49C}",black_heart:"\u{1F5A4}",broken_heart:"\u{1F494}",two_hearts:"\u{1F495}",sparkling_heart:"\u{1F496}",heartpulse:"\u{1F497}",cupid:"\u{1F498}",gift_heart:"\u{1F49D}",revolving_hearts:"\u{1F49E}",kiss:"\u{1F48B}","+1":"\u{1F44D}",thumbsup:"\u{1F44D}","-1":"\u{1F44E}",thumbsdown:"\u{1F44E}",ok_hand:"\u{1F44C}",punch:"\u{1F44A}",fist:"\u270A",facepunch:"\u{1F44A}",wave:"\u{1F44B}",raised_hand:"\u270B",raised_hands:"\u{1F64C}",pray:"\u{1F64F}",clap:"\u{1F44F}",muscle:"\u{1F4AA}",point_up:"\u261D\uFE0F",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",v:"\u270C\uFE0F",crossed_fingers:"\u{1F91E}",handshake:"\u{1F91D}",writing_hand:"\u270D\uFE0F",selfie:"\u{1F933}",nail_care:"\u{1F485}",eyes:"\u{1F440}",fire:"\u{1F525}",star:"\u2B50",star2:"\u{1F31F}",sparkles:"\u2728",zap:"\u26A1",boom:"\u{1F4A5}",collision:"\u{1F4A5}",dizzy:"\u{1F4AB}",sweat_drops:"\u{1F4A6}",droplet:"\u{1F4A7}",snowflake:"\u2744\uFE0F",sunny:"\u2600\uFE0F",cloud:"\u2601\uFE0F",rainbow:"\u{1F308}",umbrella:"\u2614",ocean:"\u{1F30A}",sun_with_face:"\u{1F31E}",full_moon:"\u{1F315}",crescent_moon:"\u{1F319}",tada:"\u{1F389}",confetti_ball:"\u{1F38A}",balloon:"\u{1F388}",gift:"\u{1F381}",trophy:"\u{1F3C6}",medal:"\u{1F3C5}",crown:"\u{1F451}",gem:"\u{1F48E}",rocket:"\u{1F680}",airplane:"\u2708\uFE0F",car:"\u{1F697}",rotating_light:"\u{1F6A8}",100:"\u{1F4AF}",white_check_mark:"\u2705",heavy_check_mark:"\u2714\uFE0F",ballot_box_with_check:"\u2611\uFE0F",x:"\u274C",warning:"\u26A0\uFE0F",no_entry:"\u26D4",question:"\u2753",exclamation:"\u2757",bulb:"\u{1F4A1}",lock:"\u{1F512}",key:"\u{1F511}",mag:"\u{1F50D}",bell:"\u{1F514}",recycle:"\u267B\uFE0F",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",coffee:"\u2615",tea:"\u{1F375}",beer:"\u{1F37A}",beers:"\u{1F37B}",wine_glass:"\u{1F377}",cocktail:"\u{1F378}",pizza:"\u{1F355}",hamburger:"\u{1F354}",fries:"\u{1F35F}",taco:"\u{1F32E}",cake:"\u{1F382}",birthday:"\u{1F382}",cookie:"\u{1F36A}",doughnut:"\u{1F369}",apple:"\u{1F34E}",banana:"\u{1F34C}",strawberry:"\u{1F353}",avocado:"\u{1F951}",bread:"\u{1F35E}",cheese:"\u{1F9C0}",dog:"\u{1F436}",cat:"\u{1F431}",mouse:"\u{1F42D}",rabbit:"\u{1F430}",bear:"\u{1F43B}",panda_face:"\u{1F43C}",koala:"\u{1F428}",tiger:"\u{1F42F}",lion:"\u{1F981}",cow:"\u{1F42E}",pig:"\u{1F437}",frog:"\u{1F438}",monkey_face:"\u{1F435}",chicken:"\u{1F414}",penguin:"\u{1F427}",bird:"\u{1F426}",unicorn:"\u{1F984}",bee:"\u{1F41D}",bug:"\u{1F41B}",butterfly:"\u{1F98B}",snail:"\u{1F40C}",book:"\u{1F4D6}",books:"\u{1F4DA}",memo:"\u{1F4DD}",pencil:"\u{1F4DD}",email:"\u2709\uFE0F",envelope:"\u2709\uFE0F",calendar:"\u{1F4C5}",chart:"\u{1F4CA}",bar_chart:"\u{1F4CA}",chart_with_upwards_trend:"\u{1F4C8}",clipboard:"\u{1F4CB}",pushpin:"\u{1F4CC}",paperclip:"\u{1F4CE}",scissors:"\u2702\uFE0F",hammer:"\u{1F528}",wrench:"\u{1F527}",gear:"\u2699\uFE0F",nut_and_bolt:"\u{1F529}",bomb:"\u{1F4A3}",hourglass:"\u231B",watch:"\u231A",alarm_clock:"\u23F0",moneybag:"\u{1F4B0}",dollar:"\u{1F4B5}",credit_card:"\u{1F4B3}",chart_increasing:"\u{1F4C8}",link:"\u{1F517}",mag_right:"\u{1F50E}",telescope:"\u{1F52D}",microscope:"\u{1F52C}",syringe:"\u{1F489}",pill:"\u{1F48A}",phone:"\u{1F4DE}",telephone:"\u{1F4DE}",iphone:"\u{1F4F1}",computer:"\u{1F4BB}",keyboard:"\u2328\uFE0F",printer:"\u{1F5A8}\uFE0F",camera:"\u{1F4F7}",movie_camera:"\u{1F3A5}",tv:"\u{1F4FA}",seedling:"\u{1F331}",evergreen_tree:"\u{1F332}",deciduous_tree:"\u{1F333}",palm_tree:"\u{1F334}",cactus:"\u{1F335}",four_leaf_clover:"\u{1F340}",rose:"\u{1F339}",sunflower:"\u{1F33B}",tulip:"\u{1F337}",blossom:"\u{1F33C}",herb:"\u{1F33F}",musical_note:"\u{1F3B5}",notes:"\u{1F3B6}",microphone:"\u{1F3A4}",headphones:"\u{1F3A7}",guitar:"\u{1F3B8}",trumpet:"\u{1F3BA}",soccer:"\u26BD",basketball:"\u{1F3C0}",football:"\u{1F3C8}",baseball:"\u26BE",tennis:"\u{1F3BE}","8ball":"\u{1F3B1}",dart:"\u{1F3AF}",video_game:"\u{1F3AE}",game_die:"\u{1F3B2}",trophy2:"\u{1F3C6}",sos:"\u{1F198}",new:"\u{1F195}",ok:"\u{1F197}",up:"\u{1F199}",cool:"\u{1F192}",free:"\u{1F193}",arrow_up:"\u2B06\uFE0F",arrow_down:"\u2B07\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_forward:"\u25B6\uFE0F",bangbang:"\u203C\uFE0F",interrobang:"\u2049\uFE0F",grey_question:"\u2754",grey_exclamation:"\u2755"};function RTE_Plugin_EmojiAutocomplete(){var D=this,y,c,E,g,n=null,m=[],f=0,x=-1,k=null,C=null;D.PluginName="EmojiAutocomplete",D.InitConfig=function(d){y=d},D.InitEditor=function(d){if(c=d,E=c.getEditable(),g=c.getDocument(),!(!E||!g)){var e=function(u,t,a){c.bindDocumentEvent?c.bindDocumentEvent(u,t,a):c.getDocument().addEventListener(u,t,a)};e("input",P,!1),e("keydown",O,!0),e("blur",function(){setTimeout(b,150)},!0),c.attachEvent("documentreplaced",function(){E=c.getEditable(),g=c.getDocument()})}};function T(){return y.emojiShortcodes||{}}function z(){var d=c.getSelection();if(!d||d.rangeCount===0||!d.isCollapsed)return null;var e=d.getRangeAt(0);if(e.startContainer.nodeType!==3)return null;for(var u=e.startContainer.parentNode;u&&u!==E;){if(u.nodeName==="CODE"||u.nodeName==="PRE")return null;u=u.parentNode}return e}function P(){if(y.emojiAutocompleteEnabled){var d=z();if(!d){b();return}var e=d.startContainer,u=d.startOffset,t=e.data.slice(0,u),a=/(^|[^a-z0-9_])(:[a-z0-9_+\-]{1,30}:)$/i.exec(t);if(a){var r=a[2].slice(1,-1).toLowerCase(),o=T()[r];if(o){S(e,u-a[2].length,u,o),b();return}}var i=/(^|[^a-z0-9_])(:)([a-z0-9_+\-]{1,30})$/i.exec(t);if(i){var l=i[3].toLowerCase();k=e,x=u-l.length-1,M(l,d)}else b()}}function M(d,e){for(var u=T(),t=Object.keys(u),a=[],r=[],o=0;o<t.length;o++){var i=t[o];i.indexOf(d)===0?a.push(i):i.indexOf(d)!==-1&&r.push(i)}for(var l=a.concat(r),_={},p=[],h=0;h<l.length&&p.length<8;h++){var s=u[l[h]];_[s]||(_[s]=1,p.push({code:l[h],emo:s}))}if(!p.length){b();return}m=p,f=0,L(e)}function L(d){var e=document;n||(n=e.createElement("div"),n.className="rte-emoji-pop",n.setAttribute("role","listbox"),n.setAttribute("aria-label",typeof y<"u"&&y&&y.text_emoji_suggest||"Emoji suggestions"),n.style.cssText="position:fixed;z-index:2147483600;",e.body.appendChild(n));var u=!1;try{var t=c.container&&c.container.classList;u=!!t&&(t.contains("rte-dark")||t.contains("rte-auto-dark")&&!t.contains("rte-light")&&!!(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches))}catch{u=!1}n.className="rte-emoji-pop"+(u?" rte-emoji-pop-dark":""),n.innerHTML="",m.forEach(function(s,w){var v=e.createElement("div");v.className="rte-emoji-pop-row"+(w===f?" is-active":""),v.setAttribute("role","option"),v.setAttribute("aria-selected",w===f?"true":"false");var A=e.createElement("span");A.className="rte-emoji-pop-glyph",A.textContent=s.emo;var j=e.createElement("span");j.className="rte-emoji-pop-code",j.textContent=":"+s.code+":",v.appendChild(A),v.appendChild(j),v.onmousedown=function(F){F.preventDefault(),f=w,N()},v.onmouseenter=function(){f=w,R()},n.appendChild(v)});try{var a=d.getBoundingClientRect(),r=g.defaultView&&g.defaultView.frameElement,o=r?r.getBoundingClientRect():{left:0,top:0,width:0},i=r&&r.offsetWidth&&o.width>0?o.width/r.offsetWidth:1,l=o.left+a.left*i,_=o.top+a.bottom*i+4,p=e.documentElement.clientWidth,h=e.documentElement.clientHeight;n.style.left=Math.max(4,Math.min(l,p-290))+"px",n.style.top=Math.max(4,Math.min(_,h-20))+"px",n.style.display="block"}catch{}}function R(){if(n)for(var d=n.childNodes,e=0;e<d.length;e++)d[e].classList.toggle("is-active",e===f),d[e].setAttribute("aria-selected",e===f?"true":"false")}function O(d){if(C){var e=(d.ctrlKey||d.metaKey)&&!d.shiftKey&&!d.altKey&&(d.code==="KeyZ"||d.key==="z"||d.key==="Z");if(e&&K()){d.preventDefault(),d.stopPropagation();return}/^(Control|Meta|Shift|Alt|CapsLock)$/.test(d.key)||(C=null)}if(!(!n||n.style.display==="none"||!m.length))switch(d.key){case"ArrowDown":d.preventDefault(),d.stopPropagation(),f=(f+1)%m.length,R();break;case"ArrowUp":d.preventDefault(),d.stopPropagation(),f=(f-1+m.length)%m.length,R();break;case"Enter":case"Tab":d.preventDefault(),d.stopPropagation(),N();break;case"Escape":d.preventDefault(),d.stopPropagation(),b();break}}function K(){var d=C;if(C=null,!d||!d.node.parentNode||d.node.data!==d.emo)return!1;var e=c.getSelection();if(!e||!e.rangeCount||!e.isCollapsed)return!1;var u=e.getRangeAt(0),t=u.startContainer,a=u.startOffset,r=t===d.node&&a===d.node.data.length||t.nodeType===3&&a===0&&t.previousSibling===d.node||t===d.node.parentNode&&t.childNodes[a-1]===d.node;if(!r)return!1;d.node.data=d.typed;var o=c.getDocument().createRange();if(o.setStart(d.node,d.typed.length),o.collapse(!0),e.removeAllRanges(),e.addRange(o),typeof c.fireChange=="function")try{c.fireChange()}catch{}return!0}function N(){if(!m.length||!k||x<0){b();return}var d=m[f]||m[0],e=z();if(!e||e.startContainer!==k){b();return}S(k,x,e.startOffset,d.emo),b()}function S(d,e,u,t){try{var a=d.data,r=a.slice(0,e),o=a.slice(u),i=d.parentNode;if(!i)return;var l=g.createDocumentFragment();r&&l.appendChild(g.createTextNode(r));var _=g.createTextNode(t);l.appendChild(_);var p=o?g.createTextNode(o):null;p&&l.appendChild(p),i.replaceChild(l,d),C={node:_,emo:t,typed:a.slice(e,u)};var h=g.createRange();p?h.setStart(p,0):h.setStartAfter(_),h.collapse(!0);var s=c.getSelection();if(s&&(s.removeAllRanges(),s.addRange(h)),typeof c.fireChange=="function")try{c.fireChange()}catch{}}catch{}}function b(){n&&(n.style.display="none"),m=[],f=0,x=-1,k=null}}
|
|
1
|
+
window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_emojiautocomplete=RTE_Plugin_EmojiAutocomplete,RTE_DefaultConfig.emojiAutocompleteEnabled=typeof RTE_DefaultConfig.emojiAutocompleteEnabled>"u"?!0:RTE_DefaultConfig.emojiAutocompleteEnabled,RTE_DefaultConfig.emojiShortcodes=RTE_DefaultConfig.emojiShortcodes||{smile:"\u{1F604}",smiley:"\u{1F603}",grin:"\u{1F601}",laughing:"\u{1F606}",satisfied:"\u{1F606}",joy:"\u{1F602}",rofl:"\u{1F923}",sweat_smile:"\u{1F605}",wink:"\u{1F609}",blush:"\u{1F60A}",innocent:"\u{1F607}",heart_eyes:"\u{1F60D}",star_struck:"\u{1F929}",kissing_heart:"\u{1F618}",yum:"\u{1F60B}",stuck_out_tongue:"\u{1F61B}",zany:"\u{1F92A}",thinking:"\u{1F914}",shush:"\u{1F92B}",neutral_face:"\u{1F610}",expressionless:"\u{1F611}",no_mouth:"\u{1F636}",smirk:"\u{1F60F}",unamused:"\u{1F612}",roll_eyes:"\u{1F644}",grimacing:"\u{1F62C}",relieved:"\u{1F60C}",pensive:"\u{1F614}",sleepy:"\u{1F62A}",sleeping:"\u{1F634}",mask:"\u{1F637}",face_with_thermometer:"\u{1F912}",nauseated_face:"\u{1F922}",sneezing_face:"\u{1F927}",dizzy_face:"\u{1F635}",exploding_head:"\u{1F92F}",cowboy:"\u{1F920}",sunglasses:"\u{1F60E}",nerd:"\u{1F913}",monocle:"\u{1F9D0}",confused:"\u{1F615}",worried:"\u{1F61F}",slightly_frowning_face:"\u{1F641}",open_mouth:"\u{1F62E}",astonished:"\u{1F632}",flushed:"\u{1F633}",fearful:"\u{1F628}",cold_sweat:"\u{1F630}",cry:"\u{1F622}",sob:"\u{1F62D}",scream:"\u{1F631}",confounded:"\u{1F616}",persevere:"\u{1F623}",disappointed:"\u{1F61E}",sweat:"\u{1F613}",weary:"\u{1F629}",tired_face:"\u{1F62B}",triumph:"\u{1F624}",rage:"\u{1F621}",angry:"\u{1F620}",cursing_face:"\u{1F92C}",smiling_imp:"\u{1F608}",imp:"\u{1F47F}",skull:"\u{1F480}",poop:"\u{1F4A9}",hankey:"\u{1F4A9}",clown:"\u{1F921}",ghost:"\u{1F47B}",alien:"\u{1F47D}",robot:"\u{1F916}",heart_eyes_cat:"\u{1F63B}",see_no_evil:"\u{1F648}",hear_no_evil:"\u{1F649}",speak_no_evil:"\u{1F64A}",heart:"\u2764\uFE0F",orange_heart:"\u{1F9E1}",yellow_heart:"\u{1F49B}",green_heart:"\u{1F49A}",blue_heart:"\u{1F499}",purple_heart:"\u{1F49C}",black_heart:"\u{1F5A4}",broken_heart:"\u{1F494}",two_hearts:"\u{1F495}",sparkling_heart:"\u{1F496}",heartpulse:"\u{1F497}",cupid:"\u{1F498}",gift_heart:"\u{1F49D}",revolving_hearts:"\u{1F49E}",kiss:"\u{1F48B}","+1":"\u{1F44D}",thumbsup:"\u{1F44D}","-1":"\u{1F44E}",thumbsdown:"\u{1F44E}",ok_hand:"\u{1F44C}",punch:"\u{1F44A}",fist:"\u270A",facepunch:"\u{1F44A}",wave:"\u{1F44B}",raised_hand:"\u270B",raised_hands:"\u{1F64C}",pray:"\u{1F64F}",clap:"\u{1F44F}",muscle:"\u{1F4AA}",point_up:"\u261D\uFE0F",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",v:"\u270C\uFE0F",crossed_fingers:"\u{1F91E}",handshake:"\u{1F91D}",writing_hand:"\u270D\uFE0F",selfie:"\u{1F933}",nail_care:"\u{1F485}",eyes:"\u{1F440}",fire:"\u{1F525}",star:"\u2B50",star2:"\u{1F31F}",sparkles:"\u2728",zap:"\u26A1",boom:"\u{1F4A5}",collision:"\u{1F4A5}",dizzy:"\u{1F4AB}",sweat_drops:"\u{1F4A6}",droplet:"\u{1F4A7}",snowflake:"\u2744\uFE0F",sunny:"\u2600\uFE0F",cloud:"\u2601\uFE0F",rainbow:"\u{1F308}",umbrella:"\u2614",ocean:"\u{1F30A}",sun_with_face:"\u{1F31E}",full_moon:"\u{1F315}",crescent_moon:"\u{1F319}",tada:"\u{1F389}",confetti_ball:"\u{1F38A}",balloon:"\u{1F388}",gift:"\u{1F381}",trophy:"\u{1F3C6}",medal:"\u{1F3C5}",crown:"\u{1F451}",gem:"\u{1F48E}",rocket:"\u{1F680}",airplane:"\u2708\uFE0F",car:"\u{1F697}",rotating_light:"\u{1F6A8}",100:"\u{1F4AF}",white_check_mark:"\u2705",heavy_check_mark:"\u2714\uFE0F",ballot_box_with_check:"\u2611\uFE0F",x:"\u274C",warning:"\u26A0\uFE0F",no_entry:"\u26D4",question:"\u2753",exclamation:"\u2757",bulb:"\u{1F4A1}",lock:"\u{1F512}",key:"\u{1F511}",mag:"\u{1F50D}",bell:"\u{1F514}",recycle:"\u267B\uFE0F",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",coffee:"\u2615",tea:"\u{1F375}",beer:"\u{1F37A}",beers:"\u{1F37B}",wine_glass:"\u{1F377}",cocktail:"\u{1F378}",pizza:"\u{1F355}",hamburger:"\u{1F354}",fries:"\u{1F35F}",taco:"\u{1F32E}",cake:"\u{1F382}",birthday:"\u{1F382}",cookie:"\u{1F36A}",doughnut:"\u{1F369}",apple:"\u{1F34E}",banana:"\u{1F34C}",strawberry:"\u{1F353}",avocado:"\u{1F951}",bread:"\u{1F35E}",cheese:"\u{1F9C0}",dog:"\u{1F436}",cat:"\u{1F431}",mouse:"\u{1F42D}",rabbit:"\u{1F430}",bear:"\u{1F43B}",panda_face:"\u{1F43C}",koala:"\u{1F428}",tiger:"\u{1F42F}",lion:"\u{1F981}",cow:"\u{1F42E}",pig:"\u{1F437}",frog:"\u{1F438}",monkey_face:"\u{1F435}",chicken:"\u{1F414}",penguin:"\u{1F427}",bird:"\u{1F426}",unicorn:"\u{1F984}",bee:"\u{1F41D}",bug:"\u{1F41B}",butterfly:"\u{1F98B}",snail:"\u{1F40C}",book:"\u{1F4D6}",books:"\u{1F4DA}",memo:"\u{1F4DD}",pencil:"\u{1F4DD}",email:"\u2709\uFE0F",envelope:"\u2709\uFE0F",calendar:"\u{1F4C5}",chart:"\u{1F4CA}",bar_chart:"\u{1F4CA}",chart_with_upwards_trend:"\u{1F4C8}",clipboard:"\u{1F4CB}",pushpin:"\u{1F4CC}",paperclip:"\u{1F4CE}",scissors:"\u2702\uFE0F",hammer:"\u{1F528}",wrench:"\u{1F527}",gear:"\u2699\uFE0F",nut_and_bolt:"\u{1F529}",bomb:"\u{1F4A3}",hourglass:"\u231B",watch:"\u231A",alarm_clock:"\u23F0",moneybag:"\u{1F4B0}",dollar:"\u{1F4B5}",credit_card:"\u{1F4B3}",chart_increasing:"\u{1F4C8}",link:"\u{1F517}",mag_right:"\u{1F50E}",telescope:"\u{1F52D}",microscope:"\u{1F52C}",syringe:"\u{1F489}",pill:"\u{1F48A}",phone:"\u{1F4DE}",telephone:"\u{1F4DE}",iphone:"\u{1F4F1}",computer:"\u{1F4BB}",keyboard:"\u2328\uFE0F",printer:"\u{1F5A8}\uFE0F",camera:"\u{1F4F7}",movie_camera:"\u{1F3A5}",tv:"\u{1F4FA}",seedling:"\u{1F331}",evergreen_tree:"\u{1F332}",deciduous_tree:"\u{1F333}",palm_tree:"\u{1F334}",cactus:"\u{1F335}",four_leaf_clover:"\u{1F340}",rose:"\u{1F339}",sunflower:"\u{1F33B}",tulip:"\u{1F337}",blossom:"\u{1F33C}",herb:"\u{1F33F}",musical_note:"\u{1F3B5}",notes:"\u{1F3B6}",microphone:"\u{1F3A4}",headphones:"\u{1F3A7}",guitar:"\u{1F3B8}",trumpet:"\u{1F3BA}",soccer:"\u26BD",basketball:"\u{1F3C0}",football:"\u{1F3C8}",baseball:"\u26BE",tennis:"\u{1F3BE}","8ball":"\u{1F3B1}",dart:"\u{1F3AF}",video_game:"\u{1F3AE}",game_die:"\u{1F3B2}",trophy2:"\u{1F3C6}",sos:"\u{1F198}",new:"\u{1F195}",ok:"\u{1F197}",up:"\u{1F199}",cool:"\u{1F192}",free:"\u{1F193}",arrow_up:"\u2B06\uFE0F",arrow_down:"\u2B07\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_forward:"\u25B6\uFE0F",bangbang:"\u203C\uFE0F",interrobang:"\u2049\uFE0F",grey_question:"\u2754",grey_exclamation:"\u2755"};function RTE_Plugin_EmojiAutocomplete(){var D=this,y,c,E,g,n=null,m=[],f=0,x=-1,k=null,C=null;D.PluginName="EmojiAutocomplete",D.InitConfig=function(d){y=d},D.InitEditor=function(d){if(c=d,E=c.getEditable(),g=c.getDocument(),!(!E||!g)){var e=function(u,t,a){c.bindDocumentEvent?c.bindDocumentEvent(u,t,a):c.getDocument().addEventListener(u,t,a)};e("input",P,!1),e("keydown",O,!0),e("blur",function(){setTimeout(b,150)},!0),c.attachEvent("documentreplaced",function(){E=c.getEditable(),g=c.getDocument()})}};function j(){return y.emojiShortcodes||{}}function z(){var d=c.getSelection();if(!d||d.rangeCount===0||!d.isCollapsed)return null;var e=d.getRangeAt(0);if(e.startContainer.nodeType!==3)return null;for(var u=e.startContainer.parentNode;u&&u!==E;){if(u.nodeName==="CODE"||u.nodeName==="PRE")return null;u=u.parentNode}return e}function P(){if(y.emojiAutocompleteEnabled){var d=z();if(!d){b();return}var e=d.startContainer,u=d.startOffset,t=e.data.slice(0,u),a=/(^|[^a-z0-9_])(:[a-z0-9_+\-]{1,30}:)$/i.exec(t);if(a){var r=a[2].slice(1,-1).toLowerCase(),o=j()[r];if(o){S(e,u-a[2].length,u,o),b();return}}var i=/(^|[^a-z0-9_])(:)([a-z0-9_+\-]{1,30})$/i.exec(t);if(i){var l=i[3].toLowerCase();k=e,x=u-l.length-1,M(l,d)}else b()}}function M(d,e){for(var u=j(),t=Object.keys(u),a=[],r=[],o=0;o<t.length;o++){var i=t[o];i.indexOf(d)===0?a.push(i):i.indexOf(d)!==-1&&r.push(i)}for(var l=a.concat(r),_={},p=[],h=0;h<l.length&&p.length<8;h++){var s=u[l[h]];_[s]||(_[s]=1,p.push({code:l[h],emo:s}))}if(!p.length){b();return}m=p,f=0,L(e)}function L(d){var e=document;n||(n=e.createElement("div"),n.className="rte-emoji-pop",n.setAttribute("role","listbox"),n.setAttribute("aria-label",typeof y<"u"&&y&&y.text_emoji_suggest||"Emoji suggestions"),n.style.cssText="position:fixed;z-index:2147483600;",e.body.appendChild(n));var u=!1;try{var t=c.container&&c.container.classList;u=!!t&&(t.contains("rte-dark")||t.contains("rte-auto-dark")&&!t.contains("rte-light")&&!!(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches))}catch{u=!1}n.className="rte-emoji-pop"+(u?" rte-emoji-pop-dark":""),n.innerHTML=__RTE_TT(""),m.forEach(function(s,w){var v=e.createElement("div");v.className="rte-emoji-pop-row"+(w===f?" is-active":""),v.setAttribute("role","option"),v.setAttribute("aria-selected",w===f?"true":"false");var T=e.createElement("span");T.className="rte-emoji-pop-glyph",T.textContent=s.emo;var A=e.createElement("span");A.className="rte-emoji-pop-code",A.textContent=":"+s.code+":",v.appendChild(T),v.appendChild(A),v.onmousedown=function(F){F.preventDefault(),f=w,N()},v.onmouseenter=function(){f=w,R()},n.appendChild(v)});try{var a=d.getBoundingClientRect(),r=g.defaultView&&g.defaultView.frameElement,o=r?r.getBoundingClientRect():{left:0,top:0,width:0},i=r&&r.offsetWidth&&o.width>0?o.width/r.offsetWidth:1,l=o.left+a.left*i,_=o.top+a.bottom*i+4,p=e.documentElement.clientWidth,h=e.documentElement.clientHeight;n.style.left=Math.max(4,Math.min(l,p-290))+"px",n.style.top=Math.max(4,Math.min(_,h-20))+"px",n.style.display="block"}catch{}}function R(){if(n)for(var d=n.childNodes,e=0;e<d.length;e++)d[e].classList.toggle("is-active",e===f),d[e].setAttribute("aria-selected",e===f?"true":"false")}function O(d){if(C){var e=(d.ctrlKey||d.metaKey)&&!d.shiftKey&&!d.altKey&&(d.code==="KeyZ"||d.key==="z"||d.key==="Z");if(e&&K()){d.preventDefault(),d.stopPropagation();return}/^(Control|Meta|Shift|Alt|CapsLock)$/.test(d.key)||(C=null)}if(!(!n||n.style.display==="none"||!m.length))switch(d.key){case"ArrowDown":d.preventDefault(),d.stopPropagation(),f=(f+1)%m.length,R();break;case"ArrowUp":d.preventDefault(),d.stopPropagation(),f=(f-1+m.length)%m.length,R();break;case"Enter":case"Tab":d.preventDefault(),d.stopPropagation(),N();break;case"Escape":d.preventDefault(),d.stopPropagation(),b();break}}function K(){var d=C;if(C=null,!d||!d.node.parentNode||d.node.data!==d.emo)return!1;var e=c.getSelection();if(!e||!e.rangeCount||!e.isCollapsed)return!1;var u=e.getRangeAt(0),t=u.startContainer,a=u.startOffset,r=t===d.node&&a===d.node.data.length||t.nodeType===3&&a===0&&t.previousSibling===d.node||t===d.node.parentNode&&t.childNodes[a-1]===d.node;if(!r)return!1;d.node.data=d.typed;var o=c.getDocument().createRange();if(o.setStart(d.node,d.typed.length),o.collapse(!0),e.removeAllRanges(),e.addRange(o),typeof c.fireChange=="function")try{c.fireChange()}catch{}return!0}function N(){if(!m.length||!k||x<0){b();return}var d=m[f]||m[0],e=z();if(!e||e.startContainer!==k){b();return}S(k,x,e.startOffset,d.emo),b()}function S(d,e,u,t){try{var a=d.data,r=a.slice(0,e),o=a.slice(u),i=d.parentNode;if(!i)return;var l=g.createDocumentFragment();r&&l.appendChild(g.createTextNode(r));var _=g.createTextNode(t);l.appendChild(_);var p=o?g.createTextNode(o):null;p&&l.appendChild(p),i.replaceChild(l,d),C={node:_,emo:t,typed:a.slice(e,u)};var h=g.createRange();p?h.setStart(p,0):h.setStartAfter(_),h.collapse(!0);var s=c.getSelection();if(s&&(s.removeAllRanges(),s.addRange(h)),typeof c.fireChange=="function")try{c.fireChange()}catch{}}catch{}}function b(){n&&(n.style.display="none"),m=[],f=0,x=-1,k=null}}
|
|
@@ -160,18 +160,18 @@ function RTE_Plugin_Html2PDF() {
|
|
|
160
160
|
|
|
161
161
|
var div2 = __Append(dialoginner, "div", "position:relative;text-align:center;");
|
|
162
162
|
|
|
163
|
-
div2.innerHTML = "Loading...";
|
|
163
|
+
div2.innerHTML = __RTE_TT("Loading...");
|
|
164
164
|
|
|
165
165
|
var imgrect = __Append(dialoginner, "div", "position:relative;text-align:center;")
|
|
166
166
|
|
|
167
167
|
window.html2pdf_callback = function (win) {
|
|
168
168
|
|
|
169
169
|
if (!win.html2pdf) {
|
|
170
|
-
div2.innerHTML = "Failed to load script.";
|
|
170
|
+
div2.innerHTML = __RTE_TT("Failed to load script.");
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
div2.innerHTML = "Exporting...";
|
|
174
|
+
div2.innerHTML = __RTE_TT("Exporting...");
|
|
175
175
|
|
|
176
176
|
// Honor the document's own page setup (paper size, orientation and
|
|
177
177
|
// margins) so the exported PDF matches the paginated page view and the
|
|
@@ -193,7 +193,7 @@ function RTE_Plugin_Html2PDF() {
|
|
|
193
193
|
|
|
194
194
|
var dataurl = img.getAttribute('src');
|
|
195
195
|
if (dataurl.indexOf("base64") == -1) {
|
|
196
|
-
div2.innerHTML = "Error, no data.";
|
|
196
|
+
div2.innerHTML = __RTE_TT("Error, no data.");
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
|
|
@@ -208,7 +208,7 @@ function RTE_Plugin_Html2PDF() {
|
|
|
208
208
|
bin[i] = str.charCodeAt(i);
|
|
209
209
|
var blob = new Blob([new Uint8Array(bin)], { type: "application/pdf" })
|
|
210
210
|
var url = URL.createObjectURL(blob);
|
|
211
|
-
div2.innerHTML = Math.ceil(str.length / 1024) + "KB Exported<br/><a href='" + url + "' target=_blank>Download PDF</a>";
|
|
211
|
+
div2.innerHTML = __RTE_TT(Math.ceil(str.length / 1024) + "KB Exported<br/><a href='" + url + "' target=_blank>Download PDF</a>");
|
|
212
212
|
|
|
213
213
|
var pdflink = div2.querySelector("a");
|
|
214
214
|
|
|
@@ -248,10 +248,10 @@ function RTE_Plugin_Html2PDF() {
|
|
|
248
248
|
|
|
249
249
|
iframe = __Append(div1, "iframe", "align-self:center;flex:99;width:100%;height:0px;border:0px;", "rte-editable");
|
|
250
250
|
iframe.contentDocument.open("text/html");
|
|
251
|
-
iframe.contentDocument.write("<html><head><link id='url-css-preview' rel='stylesheet' href='" + editor.htmlEncode(config.previewCssUrl) + "'/>"
|
|
251
|
+
iframe.contentDocument.write(__RTE_TT("<html><head><link id='url-css-preview' rel='stylesheet' href='" + editor.htmlEncode(config.previewCssUrl) + "'/>"
|
|
252
252
|
+ "<script src='" + editor.htmlEncode(resolveScriptUrl()) + "'></script></head><body style='padding:10px;margin:0px'>"
|
|
253
253
|
+ editor.getHTMLCode() + "</body>"
|
|
254
|
-
+ "<script>window.onload=function(){setTimeout(function(){parent.html2pdf_callback(window)},100)}</script></html>")
|
|
254
|
+
+ "<script>window.onload=function(){setTimeout(function(){parent.html2pdf_callback(window)},100)}</script></html>"))
|
|
255
255
|
iframe.contentDocument.close();
|
|
256
256
|
|
|
257
257
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
RTE_DefaultConfig.svgCode_html2pdf||(RTE_DefaultConfig.svgCode_html2pdf='<svg viewBox="-2 -2 36 36" fill="#5F6368"><polygon points="30 11 30 9 22 9 22 23 24 23 24 17 29 17 29 15 24 15 24 11 30 11"></polygon><path d="M8,9H2V23H4V18H8a2,2,0,0,0,2-2V11A2,2,0,0,0,8,9Zm0,7H4V11H8Z"></path><path d="M16,23H12V9h4a4,4,0,0,1,4,4v6A4,4,0,0,1,16,23Zm-2-2h2a2,2,0,0,0,2-2V13a2,2,0,0,0-2-2H14Z"></path><title>PDF</title></svg>'),RTE_DefaultConfig.plugin_html2pdf=RTE_Plugin_Html2PDF,typeof RTE_DefaultConfig.html2pdfScriptUrl>"u"&&(RTE_DefaultConfig.html2pdfScriptUrl=null);function RTE_Plugin_Html2PDF(){var
|
|
1
|
+
RTE_DefaultConfig.svgCode_html2pdf||(RTE_DefaultConfig.svgCode_html2pdf='<svg viewBox="-2 -2 36 36" fill="#5F6368"><polygon points="30 11 30 9 22 9 22 23 24 23 24 17 29 17 29 15 24 15 24 11 30 11"></polygon><path d="M8,9H2V23H4V18H8a2,2,0,0,0,2-2V11A2,2,0,0,0,8,9Zm0,7H4V11H8Z"></path><path d="M16,23H12V9h4a4,4,0,0,1,4,4v6A4,4,0,0,1,16,23Zm-2-2h2a2,2,0,0,0,2-2V13a2,2,0,0,0-2-2H14Z"></path><title>PDF</title></svg>'),RTE_DefaultConfig.plugin_html2pdf=RTE_Plugin_Html2PDF,typeof RTE_DefaultConfig.html2pdfScriptUrl>"u"&&(RTE_DefaultConfig.html2pdfScriptUrl=null);function RTE_Plugin_Html2PDF(){var y="/plugins/vendor/html2pdf.bundle.min.js";function T(t){try{return new URL(t,document.baseURI||location.href).href}catch{return t}}function H(){if(a&&a.html2pdfScriptUrl)return T(a.html2pdfScriptUrl);var t=a&&a.url_base?String(a.url_base).replace(/\/+$/,""):"";return T(t?t+y:"."+y)}var u=this,a,i;u.PluginName="Html2PDF",u.InitConfig=function(t){a=t},u.InitEditor=function(t){i=t,i.attachEvent("exec_command_html2pdf",function(e,r,o){u.DoHtml2PDF(),e.returnValue=!0}),i.toolbarFactoryMap.html2pdf=function(e){var r=i.createToolbarButton(e);return r.style.backgroundColor="",r}},u.GetPdfPageOptions=function(){var t={format:"letter",orientation:"portrait",margin:.5},e=null;try{i&&typeof i.getDocumentPageSetup=="function"&&(e=i.getDocumentPageSetup())}catch{e=null}if(!e||typeof e!="object")return t;var r={a3:1,a4:1,a5:1,letter:1,legal:1,tabloid:1},o=String(e.format||"").toLowerCase(),n=String(e.orientation||"").toLowerCase()==="landscape"?"landscape":t.orientation,l={format:r[o]?o:t.format,orientation:n,margin:t.margin},c=e.margins;if(c&&typeof c=="object"){var h=g(c.top),f=g(c.right),s=g(c.bottom),v=g(c.left);h!==null&&f!==null&&s!==null&&v!==null&&(l.margin=[h,f,s,v])}return l};function g(t){if(typeof t=="number"&&isFinite(t))return t;if(typeof t!="string")return null;var e=/^\s*(-?[\d.]+)\s*(mm|cm|in|px|pt)?\s*$/.exec(t);if(!e)return null;var r=parseFloat(e[1]);if(!isFinite(r))return null;switch(e[2]){case"mm":return r/25.4;case"cm":return r/2.54;case"pt":return r/72;case"px":return r/96;default:return r}}function p(t,e,r,o){var n=t.ownerDocument.createElement(e);return r&&(n.style.cssText=r),o&&(n.className=o),t.appendChild(n),n}function P(t){for(var e=t.split(","),r=e[0].match(/:(.*?);/)[1],o=atob(e[1]),n=o.length,l=new Uint8Array(n);n--;)l[n]=o.charCodeAt(n);return new Blob([l],{type:r})}u.DoHtml2PDF=function(){var t=i.createDialog("Html2PDF","rte-dialog-html2pdf"),e=p(t,"div","position:relative;text-align:center;");e.innerHTML=__RTE_TT("Loading...");var r=p(t,"div","position:relative;text-align:center;");window.html2pdf_callback=function(n){if(!n.html2pdf){e.innerHTML=__RTE_TT("Failed to load script.");return}e.innerHTML=__RTE_TT("Exporting...");var l=u.GetPdfPageOptions(),c={margin:l.margin,filename:"myfile.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2},jsPDF:{unit:"in",format:l.format,orientation:l.orientation}},h=n.html2pdf().set(c).from(n.document.body).outputImg();h.then(function(f){var s=f.getAttribute("src");if(s.indexOf("base64")==-1){e.innerHTML=__RTE_TT("Error, no data.");return}var v=P(s),x=URL.createObjectURL(v);f.setAttribute("src",x);var C=n.html2pdf().set(c).from(n.document.body).outputPdf();C.then(function(d){for(var D=new Array(d.length),b=0;b<d.length;b++)D[b]=d.charCodeAt(b);var U=new Blob([new Uint8Array(D)],{type:"application/pdf"}),F=URL.createObjectURL(U);e.innerHTML=__RTE_TT(Math.ceil(d.length/1024)+"KB Exported<br/><a href='"+F+"' target=_blank>Download PDF</a>");var w=e.querySelector("a"),m=new Date,E=String(m.getFullYear()*1e4+(m.getMonth()+1)*100+m.getDate()).substring(2),R=String(1e6+m.getHours()*1e4+m.getMinutes()*100+m.getSeconds()).substring(1);w.download="Export-"+E+"-"+R+".pdf",w.click(),f.style.cssText="max-width:300px;max-height:200px;margin:5px;padding:10px;border:solid 1px #eee;box-shadow:2px 2px 6px #eee",r.appendChild(f),p(r,"br");var _=p(r,"a");_.setAttribute("href",x),_.setAttribute("target","_blank"),_.download="Export-"+E+"-"+R+".jpg",_.innerText=typeof a<"u"&&a&&a.text_pdf_dlimg||"Download Img"}).catch(function(d){console.error(d)})}).catch(function(f){console.error(f)})};var o=p(t,"div","position:relative;text-align:center;");iframe=p(o,"iframe","align-self:center;flex:99;width:100%;height:0px;border:0px;","rte-editable"),iframe.contentDocument.open("text/html"),iframe.contentDocument.write(__RTE_TT("<html><head><link id='url-css-preview' rel='stylesheet' href='"+i.htmlEncode(a.previewCssUrl)+"'/><script src='"+i.htmlEncode(H())+"'><\/script></head><body style='padding:10px;margin:0px'>"+i.getHTMLCode()+"</body><script>window.onload=function(){setTimeout(function(){parent.html2pdf_callback(window)},100)}<\/script></html>")),iframe.contentDocument.close()}}
|
|
@@ -159,7 +159,7 @@ function RTE_Plugin_ImageEditor() {
|
|
|
159
159
|
var imgeditor = new win.tui.ImageEditor(win.document.querySelector('#tui-image-editor'), options);
|
|
160
160
|
|
|
161
161
|
var btns = win.document.querySelector('.tui-image-editor-header-buttons');
|
|
162
|
-
btns.innerHTML = '';
|
|
162
|
+
btns.innerHTML = __RTE_TT('');
|
|
163
163
|
var savebtn = __Append(btns, "button", "");
|
|
164
164
|
savebtn.innerText = pText("ie_save", "Save");
|
|
165
165
|
var status = __Append(btns, "div", "margin-left:10px;font-size:12px;color:#b42318;", "rte-imageeditor-upload-status");
|
|
@@ -181,7 +181,20 @@ function RTE_Plugin_ImageEditor() {
|
|
|
181
181
|
|
|
182
182
|
var file = dataURLToBlob(dataurl);
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
// A handler that throws would leave Save disabled with "Saving..." forever.
|
|
185
|
+
// Turn the exception into the same visible error the callback path shows.
|
|
186
|
+
var restoreSave = function (message) {
|
|
187
|
+
savebtn.disabled = false;
|
|
188
|
+
savebtn.innerText = pText("ie_save", "Save");
|
|
189
|
+
status.innerText = message;
|
|
190
|
+
};
|
|
191
|
+
try {
|
|
192
|
+
uploadHandler(file, onUploaded);
|
|
193
|
+
} catch (ex) {
|
|
194
|
+
restoreSave(pText("ie_uploadfailed", "Upload failed: {0}", ex && ex.message ? ex.message : "error"));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function onUploaded(url, error) {
|
|
185
198
|
if (url) {
|
|
186
199
|
img.src = url;
|
|
187
200
|
editor.notifySelectionChange();
|
|
@@ -196,16 +209,16 @@ function RTE_Plugin_ImageEditor() {
|
|
|
196
209
|
status.innerText = error
|
|
197
210
|
? pText("ie_uploadfailed", "Upload failed: {0}", error)
|
|
198
211
|
: pText("ie_nourl", "The upload did not return a file URL. Please try again.");
|
|
199
|
-
}
|
|
212
|
+
}
|
|
200
213
|
|
|
201
214
|
|
|
202
215
|
}
|
|
203
216
|
|
|
204
217
|
}
|
|
205
218
|
|
|
206
|
-
iframe = __Append(dialoginner, "iframe", "align-self:center;flex:99;width:100%;height:100
|
|
219
|
+
var iframe = __Append(dialoginner, "iframe", "align-self:center;flex:99;width:100%;height:100%;border:0px;", "rte-editable");
|
|
207
220
|
iframe.contentDocument.open("text/html");
|
|
208
|
-
iframe.contentDocument.write("<html><head><base href='" + editor.htmlEncode(location.href) + "'/>"
|
|
221
|
+
iframe.contentDocument.write(__RTE_TT("<html><head><base href='" + editor.htmlEncode(location.href) + "'/>"
|
|
209
222
|
+ "<link id='url-css-preview' rel='stylesheet' href='" + editor.htmlEncode(scriptbase + "tui-color-picker.min.css") + "'/>"
|
|
210
223
|
+ "<link id='url-css-preview' rel='stylesheet' href='" + editor.htmlEncode(scriptbase + "tui-image-editor.min.css") + "'/>"
|
|
211
224
|
+ "<script src='" + editor.htmlEncode(scriptbase + "fabric.min.js") + "'></script>"
|
|
@@ -213,7 +226,7 @@ function RTE_Plugin_ImageEditor() {
|
|
|
213
226
|
+ "<script src='" + editor.htmlEncode(scriptbase + "tui-code-snippet.min.js") + "'></script>"
|
|
214
227
|
+ "<script src='" + editor.htmlEncode(scriptbase + "tui-image-editor.min.js") + "'></script>"
|
|
215
228
|
+ "</head><body style='padding:10px;margin:0px'><div id='tui-image-editor'></div></body>"
|
|
216
|
-
+ "<script>window.onload=function(){setTimeout(function(){parent.rte_image_editor_callback(window)},100)}</script></html>")
|
|
229
|
+
+ "<script>window.onload=function(){setTimeout(function(){parent.rte_image_editor_callback(window)},100)}</script></html>"))
|
|
217
230
|
iframe.contentDocument.close();
|
|
218
231
|
}
|
|
219
232
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
RTE_DefaultConfig.svgCode_imageeditor||(RTE_DefaultConfig.svgCode_imageeditor='<svg viewBox="-2 -2 20 20" fill="#5F6368"><style>.st0{fill:#f6f6f6}.st1{fill:#424242}.st2{fill:none}.st3{fill:#f0eff1}</style><path class="st0" d="M1 0v6H0v10h10v-1h6V0z" id="outline"/><g id="icon_x5F_bg"><path class="st1" d="M2 5h1v1H2zM2 3h1v1H2zM2 1h1v1H2zM4 1h1.001v1H4zM6 1h1v1H6zM8 1h1v1H8zM10 1h1v1h-1zM12 1h1v1h-1zM14 1h1v1h-1zM14 3h1v1h-1zM14 5h1v1h-1zM14 7h1v1h-1zM14 9h1v1h-1zM14 10.999h1V12h-1zM14 13h1v1h-1zM12 13h1v1h-1zM11 11V5H5v1H4V4h8v7z"/><circle class="st1" cx="6.192" cy="9.807" r=".807"/><path class="st1" d="M1 7v8h8V7H1zm1 7.001v-.28l2.537-1.463L7.554 14l.001.001H2zm6-.93l-3.463-1.982L2 12.491v-4.49h6v5.07zM10 13h1v1h-1z"/></g><g id="icon_x5F_fg"><path class="st2" d="M2 14h5.554v.001H2z"/><path class="st3" d="M11 5v6h-1V6H5V5z"/><path class="st3" d="M2 12.491l2.537-1.402L8 13.071v-5.07H2v4.49zM6.192 9a.807.807 0 1 1 .001 1.615A.807.807 0 0 1 6.192 9z"/><path class="st3" d="M2 13.721V14h5.554l-3.017-1.742z"/></g></svg>'),RTE_DefaultConfig.plugin_imageeditor=RTE_Plugin_ImageEditor;function RTE_Plugin_ImageEditor(){var
|
|
1
|
+
RTE_DefaultConfig.svgCode_imageeditor||(RTE_DefaultConfig.svgCode_imageeditor='<svg viewBox="-2 -2 20 20" fill="#5F6368"><style>.st0{fill:#f6f6f6}.st1{fill:#424242}.st2{fill:none}.st3{fill:#f0eff1}</style><path class="st0" d="M1 0v6H0v10h10v-1h6V0z" id="outline"/><g id="icon_x5F_bg"><path class="st1" d="M2 5h1v1H2zM2 3h1v1H2zM2 1h1v1H2zM4 1h1.001v1H4zM6 1h1v1H6zM8 1h1v1H8zM10 1h1v1h-1zM12 1h1v1h-1zM14 1h1v1h-1zM14 3h1v1h-1zM14 5h1v1h-1zM14 7h1v1h-1zM14 9h1v1h-1zM14 10.999h1V12h-1zM14 13h1v1h-1zM12 13h1v1h-1zM11 11V5H5v1H4V4h8v7z"/><circle class="st1" cx="6.192" cy="9.807" r=".807"/><path class="st1" d="M1 7v8h8V7H1zm1 7.001v-.28l2.537-1.463L7.554 14l.001.001H2zm6-.93l-3.463-1.982L2 12.491v-4.49h6v5.07zM10 13h1v1h-1z"/></g><g id="icon_x5F_fg"><path class="st2" d="M2 14h5.554v.001H2z"/><path class="st3" d="M11 5v6h-1V6H5V5z"/><path class="st3" d="M2 12.491l2.537-1.402L8 13.071v-5.07H2v4.49zM6.192 9a.807.807 0 1 1 .001 1.615A.807.807 0 0 1 6.192 9z"/><path class="st3" d="M2 13.721V14h5.554l-3.017-1.742z"/></g></svg>'),RTE_DefaultConfig.plugin_imageeditor=RTE_Plugin_ImageEditor;function RTE_Plugin_ImageEditor(){var g=this,u,t;g.PluginName="ImageEditor";function s(i,a,e){var n=u&&u["text_"+i]||a;return e===void 0?n:n.split("{0}").join(String(e))}g.InitConfig=function(i){u=i},g.InitEditor=function(i){t=i,t.attachEvent("exec_command_imageeditor",function(a,e,n){g.DoImageEditor(),a.returnValue=!0}),t.toolbarFactoryMap.imageeditor=function(a){var e=t.createToolbarButton(a);return e.style.backgroundColor="",e}};function v(i,a,e,n){var o=i.ownerDocument.createElement(a);return e&&(o.style.cssText=e),n&&(o.className=n),i.appendChild(o),o}var b={"image/png":".png","image/jpeg":".jpg","image/jpg":".jpg","image/webp":".webp","image/gif":".gif","image/bmp":".bmp","image/avif":".avif"};function z(i,a){for(var e=i.split(","),n=e[0].match(/:(.*?);/)[1],o=atob(e[1]),c=o.length,h=new Uint8Array(c);c--;)h[c]=o.charCodeAt(c);var d=a||"image-"+new Date().getTime()+(b[n]||".png");try{return new File([h],d,{type:n})}catch{var r=new Blob([h],{type:n});return r.name=d,r}}g.DoImageEditor=function(){var i=t.getSelectedControl();if(i){var a=t.createDialog(s("ie_title","Image editor"),"rte-dialog-imageeditor");a.style.width="90%",a.style.height="90%";var e=u.url_base+"/plugins/tui.image-editor/";window.rte_image_editor_callback=function(o){try{o.tui=o.tui||{},o.tui.usageStatistics=!1}catch{}var c={usageStatistics:!1,includeUI:{loadImage:{path:i.src,name:"RteImage"},usageStatistics:!1,theme:{"common.bi.image":"","common.bisize.width":"0","common.bisize.height":"0","menu.normalIcon.path":e+"svg/icon-d.svg","menu.activeIcon.path":e+"svg/icon-b.svg","menu.disabledIcon.path":e+"svg/icon-a.svg","menu.hoverIcon.path":e+"svg/icon-c.svg","submenu.normalIcon.path":e+"svg/icon-d.svg","submenu.normalIcon.name":"icon-d","submenu.activeIcon.path":e+"svg/icon-c.svg","submenu.activeIcon.name":"icon-c"},menuBarPosition:"bottom"},cssMaxWidth:700,cssMaxHeight:500,selectionStyle:{cornerSize:20,rotatingPointOffset:70}},h=new o.tui.ImageEditor(o.document.querySelector("#tui-image-editor"),c),d=o.document.querySelector(".tui-image-editor-header-buttons");d.innerHTML=__RTE_TT("");var r=v(d,"button","");r.innerText=s("ie_save","Save");var m=v(d,"div","margin-left:10px;font-size:12px;color:#b42318;","rte-imageeditor-upload-status");m.setAttribute("role","status"),m.setAttribute("aria-live","polite"),r.onclick=function(){m.innerText="",r.disabled=!0,r.innerText=s("ie_saving","Saving...");var f=h.toDataURL(),p=u.file_upload_handler||window.rte_file_upload_handler;if(!p){i.src=f,t.notifySelectionChange(),a.close();return}var M=z(f),T=function(l){r.disabled=!1,r.innerText=s("ie_save","Save"),m.innerText=l};try{p(M,y)}catch(l){T(s("ie_uploadfailed","Upload failed: {0}",l&&l.message?l.message:"error"))}function y(l,_){if(l){i.src=l,t.notifySelectionChange(),a.close();return}r.disabled=!1,r.innerText=s("ie_save","Save"),m.innerText=_?s("ie_uploadfailed","Upload failed: {0}",_):s("ie_nourl","The upload did not return a file URL. Please try again.")}}};var n=v(a,"iframe","align-self:center;flex:99;width:100%;height:100%;border:0px;","rte-editable");n.contentDocument.open("text/html"),n.contentDocument.write(__RTE_TT("<html><head><base href='"+t.htmlEncode(location.href)+"'/><link id='url-css-preview' rel='stylesheet' href='"+t.htmlEncode(e+"tui-color-picker.min.css")+"'/><link id='url-css-preview' rel='stylesheet' href='"+t.htmlEncode(e+"tui-image-editor.min.css")+"'/><script src='"+t.htmlEncode(e+"fabric.min.js")+"'><\/script><script src='"+t.htmlEncode(e+"tui-color-picker.min.js")+"'><\/script><script src='"+t.htmlEncode(e+"tui-code-snippet.min.js")+"'><\/script><script src='"+t.htmlEncode(e+"tui-image-editor.min.js")+"'><\/script></head><body style='padding:10px;margin:0px'><div id='tui-image-editor'></div></body><script>window.onload=function(){setTimeout(function(){parent.rte_image_editor_callback(window)},100)}<\/script></html>")),n.contentDocument.close()}}}
|
|
@@ -15,7 +15,7 @@ function RTE_Plugin_InsertCode() {
|
|
|
15
15
|
dp.sh.Utils.CopyStyles = function (destDoc, sourceDoc) {
|
|
16
16
|
var links = sourceDoc.getElementsByTagName('link'); for (var i = 0; i < links.length; i++)
|
|
17
17
|
if (links[i].rel.toLowerCase() == 'stylesheet')
|
|
18
|
-
destDoc.write('<link type="text/css" rel="stylesheet" href="' + links[i].href + '"></link>');
|
|
18
|
+
destDoc.write(__RTE_TT('<link type="text/css" rel="stylesheet" href="' + links[i].href + '"></link>'));
|
|
19
19
|
}
|
|
20
20
|
dp.sh.Utils.FixForBlogger = function (str) { return (dp.sh.isBloggerMode == true) ? str.replace(/<br\s*\/?>|<br\s*\/?>/gi, '\n') : str; }
|
|
21
21
|
dp.sh.RegexLib = { MultiLineCComments: new RegExp('/\\*[\\s\\S]*?\\*/', 'gm'), SingleLineCComments: new RegExp('//.*$', 'gm'), SingleLinePerlComments: new RegExp('#.*$', 'gm'), DoubleQuotedString: new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"', 'g'), SingleQuotedString: new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'", 'g') }; dp.sh.Match = function (value, index, css) { this.value = value; this.index = index; this.length = value.length; this.css = css; }
|
|
@@ -40,13 +40,13 @@ function RTE_Plugin_InsertCode() {
|
|
|
40
40
|
return; var span = this.CreateElement('SPAN'); str = str.replace(/ /g, ' '); str = str.replace(/</g, '<'); str = str.replace(/\n/gm, ' <br>'); if (css != null) {
|
|
41
41
|
if ((/br/gi).test(str)) {
|
|
42
42
|
var lines = str.split(' <br>'); for (var i = 0; i < lines.length; i++) {
|
|
43
|
-
span = this.CreateElement('SPAN'); span.className = css; span.innerHTML = lines[i]; this.div.appendChild(span); if (i + 1 < lines.length)
|
|
43
|
+
span = this.CreateElement('SPAN'); span.className = css; span.innerHTML = __RTE_TT(lines[i]); this.div.appendChild(span); if (i + 1 < lines.length)
|
|
44
44
|
this.div.appendChild(this.CreateElement('BR'));
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
else { span.className = css; span.innerHTML = str; this.div.appendChild(span); }
|
|
47
|
+
else { span.className = css; span.innerHTML = __RTE_TT(str); this.div.appendChild(span); }
|
|
48
48
|
}
|
|
49
|
-
else { span.innerHTML = str; this.div.appendChild(span); }
|
|
49
|
+
else { span.innerHTML = __RTE_TT(str); this.div.appendChild(span); }
|
|
50
50
|
}
|
|
51
51
|
dp.sh.Highlighter.prototype.IsInside = function (match) {
|
|
52
52
|
if (match == null || match.length == 0)
|
|
@@ -83,8 +83,8 @@ function RTE_Plugin_InsertCode() {
|
|
|
83
83
|
}
|
|
84
84
|
columns.className = 'columns'; columns.appendChild(div); this.bar.appendChild(columns);
|
|
85
85
|
}
|
|
86
|
-
for (var i = 0, lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++) { var li = this.CreateElement('LI'); var span = this.CreateElement('SPAN'); li.className = (i % 2 == 0) ? 'alt' : ''; span.innerHTML = lines[i] + ' '; li.appendChild(span); this.ol.appendChild(li); }
|
|
87
|
-
this.div.innerHTML = '';
|
|
86
|
+
for (var i = 0, lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++) { var li = this.CreateElement('LI'); var span = this.CreateElement('SPAN'); li.className = (i % 2 == 0) ? 'alt' : ''; span.innerHTML = __RTE_TT(lines[i] + ' '); li.appendChild(span); this.ol.appendChild(li); }
|
|
87
|
+
this.div.innerHTML = __RTE_TT('');
|
|
88
88
|
}
|
|
89
89
|
dp.sh.Highlighter.prototype.Highlight = function (code) {
|
|
90
90
|
function Trim(str) { return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1'); }
|
|
@@ -301,7 +301,7 @@ function RTE_Plugin_InsertCode() {
|
|
|
301
301
|
n = n.parentNode;
|
|
302
302
|
}
|
|
303
303
|
var holder = edoc.createElement("div");
|
|
304
|
-
holder.innerHTML = html;
|
|
304
|
+
holder.innerHTML = __RTE_TT(html);
|
|
305
305
|
var node = holder.firstChild;
|
|
306
306
|
if (!node) return false;
|
|
307
307
|
// DIV/LI/TD/BLOCKQUOTE may legally contain the block: insert in place.
|
|
@@ -391,7 +391,7 @@ function RTE_Plugin_InsertCode() {
|
|
|
391
391
|
// placed at the caret, at block level
|
|
392
392
|
} else {
|
|
393
393
|
var p = editor.insertRootParagraph();
|
|
394
|
-
p.innerHTML = '<div class="dp-highlighter">' + tag.innerHTML + "</div>";
|
|
394
|
+
p.innerHTML = __RTE_TT('<div class="dp-highlighter">' + tag.innerHTML + "</div>");
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
else {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
RTE_DefaultConfig.svgCode_insertcode||(RTE_DefaultConfig.svgCode_insertcode='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 7 3 12 8 17"/><polyline points="16 7 21 12 16 17"/><line x1="14" y1="5" x2="10" y2="19"/></svg>'),RTE_DefaultConfig.plugin_insertcode=RTE_Plugin_InsertCode;function RTE_Plugin_InsertCode(){var e={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Version:"1.5.1"}};e.InsertCode=e.sh,e.sh.Utils.CopyStyles=function(t,s){for(var r=s.getElementsByTagName("link"),i=0;i<r.length;i++)r[i].rel.toLowerCase()=="stylesheet"&&t.write('<link type="text/css" rel="stylesheet" href="'+r[i].href+'"></link>')},e.sh.Utils.FixForBlogger=function(t){return e.sh.isBloggerMode==!0?t.replace(/<br\s*\/?>|<br\s*\/?>/gi,`
|
|
2
|
-
`):t},e.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")},e.sh.Match=function(t,s,r){this.value=t,this.index=s,this.length=t.length,this.css=r},e.sh.Highlighter=function(){this.noGutter=!1,this.addControls=!0,this.collapse=!1,this.tabsToSpaces=!0,this.wrapColumn=80,this.showColumns=!0},e.sh.Highlighter.SortCallback=function(t,s){return t.index<s.index?-1:t.index>s.index?1:t.length<s.length?-1:t.length>s.length?1:0},e.sh.Highlighter.prototype.CreateElement=function(t){var s=document.createElement(t);return s.highlighter=this,s},e.sh.Highlighter.prototype.GetMatches=function(t,s){for(var r=0,i=null;(i=t.exec(this.code))!=null;)this.matches[this.matches.length]=new e.sh.Match(i[0],i.index,s)},e.sh.Highlighter.prototype.AddBit=function(t,s){if(!(t==null||t.length==0)){var r=this.CreateElement("SPAN");if(t=t.replace(/ /g," "),t=t.replace(/</g,"<"),t=t.replace(/\n/gm," <br>"),s!=null)if(/br/gi.test(t))for(var i=t.split(" <br>"),l=0;l<i.length;l++)r=this.CreateElement("SPAN"),r.className=s,r.innerHTML=i[l],this.div.appendChild(r),l+1<i.length&&this.div.appendChild(this.CreateElement("BR"));else r.className=s,r.innerHTML=t,this.div.appendChild(r);else r.innerHTML=t,this.div.appendChild(r)}},e.sh.Highlighter.prototype.IsInside=function(t){if(t==null||t.length==0)return!1;for(var s=0;s<this.matches.length;s++){var r=this.matches[s];if(r!=null&&t.index>r.index&&t.index<r.index+r.length)return!0}return!1},e.sh.Highlighter.prototype.ProcessRegexList=function(){for(var t=0;t<this.regexList.length;t++)this.GetMatches(this.regexList[t].regex,this.regexList[t].css)},e.sh.Highlighter.prototype.ProcessSmartTabs=function(t){var s=t.split(`
|
|
1
|
+
RTE_DefaultConfig.svgCode_insertcode||(RTE_DefaultConfig.svgCode_insertcode='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 7 3 12 8 17"/><polyline points="16 7 21 12 16 17"/><line x1="14" y1="5" x2="10" y2="19"/></svg>'),RTE_DefaultConfig.plugin_insertcode=RTE_Plugin_InsertCode;function RTE_Plugin_InsertCode(){var e={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Version:"1.5.1"}};e.InsertCode=e.sh,e.sh.Utils.CopyStyles=function(t,s){for(var r=s.getElementsByTagName("link"),i=0;i<r.length;i++)r[i].rel.toLowerCase()=="stylesheet"&&t.write(__RTE_TT('<link type="text/css" rel="stylesheet" href="'+r[i].href+'"></link>'))},e.sh.Utils.FixForBlogger=function(t){return e.sh.isBloggerMode==!0?t.replace(/<br\s*\/?>|<br\s*\/?>/gi,`
|
|
2
|
+
`):t},e.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")},e.sh.Match=function(t,s,r){this.value=t,this.index=s,this.length=t.length,this.css=r},e.sh.Highlighter=function(){this.noGutter=!1,this.addControls=!0,this.collapse=!1,this.tabsToSpaces=!0,this.wrapColumn=80,this.showColumns=!0},e.sh.Highlighter.SortCallback=function(t,s){return t.index<s.index?-1:t.index>s.index?1:t.length<s.length?-1:t.length>s.length?1:0},e.sh.Highlighter.prototype.CreateElement=function(t){var s=document.createElement(t);return s.highlighter=this,s},e.sh.Highlighter.prototype.GetMatches=function(t,s){for(var r=0,i=null;(i=t.exec(this.code))!=null;)this.matches[this.matches.length]=new e.sh.Match(i[0],i.index,s)},e.sh.Highlighter.prototype.AddBit=function(t,s){if(!(t==null||t.length==0)){var r=this.CreateElement("SPAN");if(t=t.replace(/ /g," "),t=t.replace(/</g,"<"),t=t.replace(/\n/gm," <br>"),s!=null)if(/br/gi.test(t))for(var i=t.split(" <br>"),l=0;l<i.length;l++)r=this.CreateElement("SPAN"),r.className=s,r.innerHTML=__RTE_TT(i[l]),this.div.appendChild(r),l+1<i.length&&this.div.appendChild(this.CreateElement("BR"));else r.className=s,r.innerHTML=__RTE_TT(t),this.div.appendChild(r);else r.innerHTML=__RTE_TT(t),this.div.appendChild(r)}},e.sh.Highlighter.prototype.IsInside=function(t){if(t==null||t.length==0)return!1;for(var s=0;s<this.matches.length;s++){var r=this.matches[s];if(r!=null&&t.index>r.index&&t.index<r.index+r.length)return!0}return!1},e.sh.Highlighter.prototype.ProcessRegexList=function(){for(var t=0;t<this.regexList.length;t++)this.GetMatches(this.regexList[t].regex,this.regexList[t].css)},e.sh.Highlighter.prototype.ProcessSmartTabs=function(t){var s=t.split(`
|
|
3
3
|
`),r="",i=4,l=" ";function a(n,d,_){for(var h=n.substr(0,d),y=n.substr(d+1,n.length),o="",R=0;R<_;R++)o+=" ";return h+o+y}function f(n,d){if(n.indexOf(l)==-1)return n;for(var _=0;(_=n.indexOf(l))!=-1;){var h=d-_%d;n=a(n,_,h)}return n}for(var c=0;c<s.length;c++)r+=f(s[c],i)+`
|
|
4
4
|
`;return r},e.sh.Highlighter.prototype.SwitchToList=function(){var t=this.div.innerHTML.replace(/<(br)\/?>/gi,`
|
|
5
5
|
`),s=t.split(`
|
|
6
|
-
`);if(this.addControls==!0&&this.bar.appendChild(e.sh.Toolbar.Create(this)),this.showColumns){for(var r=this.CreateElement("div"),i=this.CreateElement("div"),l=10,a=1;a<=150;)a%l==0?(r.innerHTML+=a,a+=(a+"").length):(r.innerHTML+="·",a++);i.className="columns",i.appendChild(r),this.bar.appendChild(i)}for(var a=0,f=this.firstLine;a<s.length-1;a++,f++){var c=this.CreateElement("LI"),n=this.CreateElement("SPAN");c.className=a%2==0?"alt":"",n.innerHTML=s[a]+" ",c.appendChild(n),this.ol.appendChild(c)}this.div.innerHTML=""},e.sh.Highlighter.prototype.Highlight=function(t){function s(n){return n.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function r(n){return n.replace(/\n*$/,"").replace(/^\n*/,"")}function i(n){for(var d=e.sh.Utils.FixForBlogger(n).split(`
|
|
6
|
+
`);if(this.addControls==!0&&this.bar.appendChild(e.sh.Toolbar.Create(this)),this.showColumns){for(var r=this.CreateElement("div"),i=this.CreateElement("div"),l=10,a=1;a<=150;)a%l==0?(r.innerHTML+=a,a+=(a+"").length):(r.innerHTML+="·",a++);i.className="columns",i.appendChild(r),this.bar.appendChild(i)}for(var a=0,f=this.firstLine;a<s.length-1;a++,f++){var c=this.CreateElement("LI"),n=this.CreateElement("SPAN");c.className=a%2==0?"alt":"",n.innerHTML=__RTE_TT(s[a]+" "),c.appendChild(n),this.ol.appendChild(c)}this.div.innerHTML=__RTE_TT("")},e.sh.Highlighter.prototype.Highlight=function(t){function s(n){return n.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function r(n){return n.replace(/\n*$/,"").replace(/^\n*/,"")}function i(n){for(var d=e.sh.Utils.FixForBlogger(n).split(`
|
|
7
7
|
`),_=new Array,h=new RegExp("^\\s*","g"),y=1e3,o=0;o<d.length&&y>0;o++)if(s(d[o]).length!=0){var R=h.exec(d[o]);R!=null&&R.length>0&&(y=Math.min(R[0].length,y))}if(y>0)for(var o=0;o<d.length;o++)d[o]=d[o].substr(y);return d.join(`
|
|
8
|
-
`)}function l(n,d,_){return n.substr(d,_-d)}var a=0;if(t==null&&(t=""),this.originalCode=t,this.code=r(i(t)),this.div=this.CreateElement("DIV"),this.bar=this.CreateElement("DIV"),this.ol=this.CreateElement("OL"),this.matches=new Array,this.div.className="dp-highlighter",this.div.highlighter=this,this.bar.className="bar",this.ol.start=this.firstLine,this.CssClass!=null&&(this.ol.className=this.CssClass),this.collapse&&(this.div.className+=" collapsed"),this.noGutter&&(this.div.className+=" nogutter"),this.tabsToSpaces==!0&&(this.code=this.ProcessSmartTabs(this.code)),this.ProcessRegexList(),this.matches.length==0){this.AddBit(this.code,null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol);return}this.matches=this.matches.sort(e.sh.Highlighter.SortCallback);for(var f=0;f<this.matches.length;f++)this.IsInside(this.matches[f])&&(this.matches[f]=null);for(var f=0;f<this.matches.length;f++){var c=this.matches[f];c==null||c.length==0||(this.AddBit(l(this.code,a,c.index),null),this.AddBit(c.value,c.css),a=c.index+c.length)}this.AddBit(this.code.substr(a),null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol)},e.sh.Highlighter.prototype.GetKeywords=function(t){return"\\b"+t.replace(/ /g,"\\b|\\b")+"\\b"},e.sh.BloggerMode=function(){e.sh.isBloggerMode=!0},e.sh.HighlightAll=function(t,s,r,i,l,a){function f(){for(var m=arguments,g=0;g<m.length;g++)if(m[g]!=null){if(typeof m[g]=="string"&&m[g]!="")return m[g]+"";if(typeof m[g]=="object"&&m[g].value!="")return m[g].value+""}return null}function c(m,g){for(var L=0;L<g.length;L++)if(g[L]==m)return!0;return!1}function n(m,g,L){for(var E=new RegExp("^"+m+"\\[(\\w+)\\]$","gi"),C=null,k=0;k<g.length;k++)if((C=E.exec(g[k]))!=null)return C[1];return L}function d(m,g,L){for(var E=document.getElementsByTagName(L),C=0;C<E.length;C++)E[C].getAttribute("name")==g&&m.push(E[C])}var _=[t],h=null,y={},o="innerHTML";for(var R in e.sh.Brushes){var P=e.sh.Brushes[R].Aliases;if(P!=null)for(var b=0;b<P.length;b++)y[P[b]]=R}for(var b=0;b<_.length;b++){var t=_[b],u=f(t.attributes.class,t.className,t.attributes.language,t.language),w="";if(u!=null&&(u=u.split(":"),w=u[0].toLowerCase(),y[w]!=null)){h=new e.sh.Brushes[y[w]],t.style.display="none",h.noGutter=s==null?c("nogutter",u):!s,h.addControls=r??!c("nocontrols",u),h.collapse=i??c("collapse",u),h.showColumns=a??c("showcolumns",u);var S=document.getElementsByTagName("head")[0];if(h.Style&&S){var v=document.createElement("style");if(v.setAttribute("type","text/css"),v.styleSheet)v.styleSheet.cssText=h.Style;else{var x=document.createTextNode(h.Style);v.appendChild(x)}S.appendChild(v)}h.firstLine=l??parseInt(n("firstline",u,1)),h.Highlight(t[o]),h.source=t,t.parentNode.insertBefore(h.div,t)}}},e.sh.Brushes.JScript=function(){var t="abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-c"},e.sh.Brushes.JScript.prototype=new e.sh.Highlighter,e.sh.Brushes.JScript.Aliases=["js","jscript","javascript"],e.sh.Brushes.Java=function(){var t="abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws true transient try void volatile while";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-j",this.Style=".dp-j .annotation { color: #646464; }.dp-j .number { color: #C00000; }"},e.sh.Brushes.Java.prototype=new e.sh.Highlighter,e.sh.Brushes.Java.Aliases=["java"],e.sh.Brushes.Cpp=function(){var t="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t __wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler sig_atomic_t size_t _stat __stat64 _stati64 terminate_function time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf va_list wchar_t wctrans_t wctype_t wint_t signed",s="break case catch class const __finally __exception __try const_cast continue private public protected __declspec default delete deprecated dllexport dllimport do dynamic_cast else enum explicit extern if for friend goto inline mutable naked namespace new noinline noreturn nothrow register reinterpret_cast return selectany sizeof static static_cast struct switch template this thread throw true false try typedef typeid typename union using uuid virtual void volatile whcar_t while";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"keyword"}],this.CssClass="dp-cpp",this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"},e.sh.Brushes.Cpp.prototype=new e.sh.Highlighter,e.sh.Brushes.Cpp.Aliases=["cpp","c","c++"],e.sh.Brushes.CSharp=function(){var t="abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach get goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed set short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-c",this.Style=".dp-c .vars { color: #d00; }"},e.sh.Brushes.CSharp.prototype=new e.sh.Highlighter,e.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"],e.sh.Brushes.CSS=function(){var t="ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",s="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",r="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(t),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS(s),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(r),"g"),css:"value"}],this.CssClass="dp-css",this.Style=".dp-css .value { color: black; }.dp-css .important { color: red; }"},e.sh.Highlighter.prototype.GetKeywordsCSS=function(t){return"\\b([a-z_]|)"+t.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"},e.sh.Highlighter.prototype.GetValuesCSS=function(t){return"\\b"+t.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"},e.sh.Brushes.CSS.prototype=new e.sh.Highlighter,e.sh.Brushes.CSS.Aliases=["css"],e.sh.Brushes.Php=function(){var t="abs acos acosh addcslashes addslashes array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists closedir closelog copy cos cosh count count_chars date decbin dechex decoct deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime strtoupper strtr strval substr substr_compare",s="and or xor __FILE__ __LINE__ array as break case cfunction class const continue declare default die do else elseif empty enddeclare endfor endforeach endif endswitch endwhile extends for foreach function include include_once global if new old_function return static switch use require require_once var while __FUNCTION__ __CLASS__ __METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(t),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"keyword"}],this.CssClass="dp-c"},e.sh.Brushes.Php.prototype=new e.sh.Highlighter,e.sh.Brushes.Php.Aliases=["php"],e.sh.Brushes.Python=function(){var t="and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try yield while",s="None True False self cls class_";this.regexList=[{regex:e.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp(`(['"]{3})([^\\1])*?\\1`,"gm"),css:"comment"},{regex:new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"',"gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"special"}],this.CssClass="dp-py",this.Style=".dp-py .builtins { color: #ff1493; }.dp-py .magicmethods { color: #808080; }.dp-py .exceptions { color: brown; }.dp-py .types { color: brown; font-style: italic; }.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"},e.sh.Brushes.Python.prototype=new e.sh.Highlighter,e.sh.Brushes.Python.Aliases=["py","python"],e.sh.Brushes.Xml=function(){this.CssClass="dp-xml",this.Style=".dp-xml .cdata { color: #ff1493; }.dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }.dp-xml .attribute { color: red; }.dp-xml .attribute-value { color: blue; }"},e.sh.Brushes.Xml.prototype=new e.sh.Highlighter,e.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"],e.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function t(l,a){l[l.length]=a}var s=0,r=null,i=null;for(this.GetMatches(new RegExp("(<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](>|>)","gm"),"cdata"),this.GetMatches(new RegExp("(<|<)!--\\s*.*?\\s*--(>|>)","gm"),"comments"),i=new RegExp(`([:\\w-.]+)\\s*=\\s*(".*?"|'.*?'|\\w+)*|(\\w+)`,"gm");(r=i.exec(this.code))!=null;)r[1]!=null&&(t(this.matches,new e.sh.Match(r[1],r.index,"attribute")),r[2]!=null&&t(this.matches,new e.sh.Match(r[2],r.index+r[0].indexOf(r[2]),"attribute-value")));for(this.GetMatches(new RegExp("(<|<)/*\\?*(?!\\!)|/*\\?*(>|>)","gm"),"tag"),i=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");(r=i.exec(this.code))!=null;)t(this.matches,new e.sh.Match(r[1],r.index+r[0].indexOf(r[1]),"tag-name"))},e.sh.Brushes.Vb=function(){var t="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit False Finally For Friend Function Get GetType GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-vb"},e.sh.Brushes.Vb.prototype=new e.sh.Highlighter,e.sh.Brushes.Vb.Aliases=["vb","vb.net"],e.sh.Brushes.Ruby=function(){var t="alias and BEGIN begin break case class def define_method defined do each else elsif END end ensure false for if in module new next nil not or raise redo rescue retry return self super then throw true undef unless until when while yield",s="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ThreadGroup Thread Time TrueClass";this.regexList=[{regex:e.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"builtin"}],this.CssClass="dp-rb",this.Style=".dp-rb .symbol { color: #a70; }.dp-rb .variable { color: #a70; font-weight: bold; }"},e.sh.Brushes.Ruby.prototype=new e.sh.Highlighter,e.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"],e.sh.Brushes.Sql=function(){var t="abs avg case cast coalesce convert count current_timestamp current_user day isnull left lower month nullif replace right session_user space substring sum system_user upper user year",s="absolute action add after alter as asc at authorization begin bigint binary bit by cascade char character check checkpoint close collate column commit committed connect connection constraint contains continue create cube current current_date current_time cursor database date deallocate dec decimal declare default delete desc distinct double drop dynamic else end end-exec escape except exec execute false fetch first float for force foreign forward free from full function global goto grant group grouping having hour ignore index inner insensitive insert instead int integer intersect into is isolation key last level load local max min minute modify move name national nchar next no numeric of off on only open option order out output partial password precision prepare primary prior privileges procedure public read real references relative repeatable restrict return returns revoke rollback rollup rows rule schema scroll second section select sequence serializable set size smallint static statistics table temp temporary then time timestamp to top transaction translation trigger true truncate uncommitted union unique update values varchar varying view when where with work",r="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(t),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(r),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords(s),"gmi"),css:"keyword"}],this.CssClass="dp-sql",this.Style=".dp-sql .func { color: #ff1493; }.dp-sql .op { color: #808080; }"},e.sh.Brushes.Sql.prototype=new e.sh.Highlighter,e.sh.Brushes.Sql.Aliases=["sql"];var O=this,H,p;O.PluginName="InsertCode";function N(t,s,r){var i=H&&H["text_"+t]||s;return r===void 0?i:i.split("{0}").join(String(r))}O.InitConfig=function(t){H=t},O.InitEditor=function(t){p=t,p.attachEvent("exec_command_insertcode",function(s,r,i){O.DoShowDialog(),s.returnValue=!0}),p.toolbarFactoryMap.insertcode=function(s){var r=p.createToolbarButton(s);return r.style.backgroundColor="",r}};function T(t,s,r,i){var l=t.ownerDocument.createElement(s);return r&&(l.style.cssText=r),i&&(l.className=i),t.appendChild(l),l}O.DoShowDialog=function(){var t=null;try{var s=p.getDocument(),r=s.defaultView.getSelection();r&&r.rangeCount&&(t=r.getRangeAt(0).cloneRange())}catch{t=null}function i(){if(!t)return!1;try{var b=p.getDocument(),u=b.defaultView.getSelection();return u.removeAllRanges(),u.addRange(t),!0}catch{return!1}}function l(b){if(!i())return!1;if(p.trackedChanges&&typeof p.trackedChanges.isEnabled=="function"&&p.trackedChanges.isEnabled())return p.insertHTML(b),!0;var u=p.getDocument(),w=u.defaultView.getSelection();if(!w||!w.rangeCount)return!1;for(var S=w.getRangeAt(0),v=S.startContainer,x=null;v&&v!==u.body;){if(v.nodeType===1&&/^(P|H[1-6]|LI|TD|TH|DIV|BLOCKQUOTE)$/.test(v.tagName)){x=v;break}v=v.parentNode}var m=u.createElement("div");m.innerHTML=b;var g=m.firstChild;if(!g)return!1;if(!x||!/^(P|H[1-6])$/.test(x.tagName))return S.deleteContents(),S.insertNode(g),!0;S.deleteContents();var L=S.cloneRange();L.setEndAfter(x.lastChild||x);var E=L.extractContents();x.parentNode.insertBefore(g,x.nextSibling);var C=u.createElement(x.tagName);return C.appendChild(E),(C.textContent.replace(/^\s+|\s+$/g,"")!==""||C.querySelector("*"))&&x.parentNode.insertBefore(C,g.nextSibling),x.textContent.replace(/^\s+|\s+$/g,"")===""&&!x.querySelector("img,table")&&x.parentNode.removeChild(x),!0}var a=p.createDialog(p.getLangText("insertcode"),"rte-dialog-insertcode"),f=T(a,"div","position:relative;text-align:center;"),c=T(f,"label");c.innerText=p.getLangText("language")+":";var n=T(f,"select","width:200px;");n.id="rte-insertcode-lang-"+new Date().getTime(),c.htmlFor=n.id,n.options.add(new Option(N("cd_plaintext","Plain Text"),""));for(var d in e.sh.Brushes){var _=e.sh.Brushes[d].Aliases;if(_!=null){n.options.add(new Option(_,d));var h=null;try{h=sessionStorage.getItem("rte-insertcode-lang")}catch{}h&&(n.value=h)}}var y=T(a,"div","position:relative;text-align:center;"),o=T(y,"textarea","width:100%;min-width:300px;height:200px");o.setAttribute("aria-label",N("cd_code","Code"));var R=T(a,"rte-dialog-footer",null,"rte-dialog-footer-center"),P=T(R,"rte-dialog-button");P.innerText=N("insert","Insert"),setTimeout(function(){o.focus()},300),P.onclick=function(){a.close();try{sessionStorage.setItem("rte-insertcode-lang",n.value)}catch{}if(n.value!=""){var b=e.sh.Brushes[n.value];o.language=b.Aliases[0]+":nocontrols",o.name="rteinsertcode"+new Date().getTime(),o.textContent=o.value,e.sh.HighlightAll(o);var u=o.previousSibling;if(!l('<div class="dp-highlighter">'+u.innerHTML+"</div>")){var w=p.insertRootParagraph();w.innerHTML='<div class="dp-highlighter">'+u.innerHTML+"</div>"}}else if(i())p.insertText(o.value);else{var w=p.insertRootParagraph();w.innerText=o.value}p.focus()}}}
|
|
8
|
+
`)}function l(n,d,_){return n.substr(d,_-d)}var a=0;if(t==null&&(t=""),this.originalCode=t,this.code=r(i(t)),this.div=this.CreateElement("DIV"),this.bar=this.CreateElement("DIV"),this.ol=this.CreateElement("OL"),this.matches=new Array,this.div.className="dp-highlighter",this.div.highlighter=this,this.bar.className="bar",this.ol.start=this.firstLine,this.CssClass!=null&&(this.ol.className=this.CssClass),this.collapse&&(this.div.className+=" collapsed"),this.noGutter&&(this.div.className+=" nogutter"),this.tabsToSpaces==!0&&(this.code=this.ProcessSmartTabs(this.code)),this.ProcessRegexList(),this.matches.length==0){this.AddBit(this.code,null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol);return}this.matches=this.matches.sort(e.sh.Highlighter.SortCallback);for(var f=0;f<this.matches.length;f++)this.IsInside(this.matches[f])&&(this.matches[f]=null);for(var f=0;f<this.matches.length;f++){var c=this.matches[f];c==null||c.length==0||(this.AddBit(l(this.code,a,c.index),null),this.AddBit(c.value,c.css),a=c.index+c.length)}this.AddBit(this.code.substr(a),null),this.SwitchToList(),this.div.appendChild(this.bar),this.div.appendChild(this.ol)},e.sh.Highlighter.prototype.GetKeywords=function(t){return"\\b"+t.replace(/ /g,"\\b|\\b")+"\\b"},e.sh.BloggerMode=function(){e.sh.isBloggerMode=!0},e.sh.HighlightAll=function(t,s,r,i,l,a){function f(){for(var m=arguments,g=0;g<m.length;g++)if(m[g]!=null){if(typeof m[g]=="string"&&m[g]!="")return m[g]+"";if(typeof m[g]=="object"&&m[g].value!="")return m[g].value+""}return null}function c(m,g){for(var L=0;L<g.length;L++)if(g[L]==m)return!0;return!1}function n(m,g,L){for(var E=new RegExp("^"+m+"\\[(\\w+)\\]$","gi"),C=null,k=0;k<g.length;k++)if((C=E.exec(g[k]))!=null)return C[1];return L}function d(m,g,L){for(var E=document.getElementsByTagName(L),C=0;C<E.length;C++)E[C].getAttribute("name")==g&&m.push(E[C])}var _=[t],h=null,y={},o="innerHTML";for(var R in e.sh.Brushes){var P=e.sh.Brushes[R].Aliases;if(P!=null)for(var b=0;b<P.length;b++)y[P[b]]=R}for(var b=0;b<_.length;b++){var t=_[b],u=f(t.attributes.class,t.className,t.attributes.language,t.language),w="";if(u!=null&&(u=u.split(":"),w=u[0].toLowerCase(),y[w]!=null)){h=new e.sh.Brushes[y[w]],t.style.display="none",h.noGutter=s==null?c("nogutter",u):!s,h.addControls=r??!c("nocontrols",u),h.collapse=i??c("collapse",u),h.showColumns=a??c("showcolumns",u);var T=document.getElementsByTagName("head")[0];if(h.Style&&T){var v=document.createElement("style");if(v.setAttribute("type","text/css"),v.styleSheet)v.styleSheet.cssText=h.Style;else{var x=document.createTextNode(h.Style);v.appendChild(x)}T.appendChild(v)}h.firstLine=l??parseInt(n("firstline",u,1)),h.Highlight(t[o]),h.source=t,t.parentNode.insertBefore(h.div,t)}}},e.sh.Brushes.JScript=function(){var t="abstract boolean break byte case catch char class const continue debugger default delete do double else enum export extends false final finally float for function goto if implements import in instanceof int interface long native new null package private protected public return short static super switch synchronized this throw throws transient true try typeof var void volatile while with";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-c"},e.sh.Brushes.JScript.prototype=new e.sh.Highlighter,e.sh.Brushes.JScript.Aliases=["js","jscript","javascript"],e.sh.Brushes.Java=function(){var t="abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws true transient try void volatile while";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b","gi"),css:"number"},{regex:new RegExp("(?!\\@interface\\b)\\@[\\$\\w]+\\b","g"),css:"annotation"},{regex:new RegExp("\\@interface\\b","g"),css:"keyword"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-j",this.Style=".dp-j .annotation { color: #646464; }.dp-j .number { color: #C00000; }"},e.sh.Brushes.Java.prototype=new e.sh.Highlighter,e.sh.Brushes.Java.Aliases=["java"],e.sh.Brushes.Cpp=function(){var t="ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t __wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler sig_atomic_t size_t _stat __stat64 _stati64 terminate_function time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf va_list wchar_t wctrans_t wctype_t wint_t signed",s="break case catch class const __finally __exception __try const_cast continue private public protected __declspec default delete deprecated dllexport dllimport do dynamic_cast else enum explicit extern if for friend goto inline mutable naked namespace new noinline noreturn nothrow register reinterpret_cast return selectany sizeof static static_cast struct switch template this thread throw true false try typedef typeid typename union using uuid virtual void volatile whcar_t while";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^ *#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"datatypes"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"keyword"}],this.CssClass="dp-cpp",this.Style=".dp-cpp .datatypes { color: #2E8B57; font-weight: bold; }"},e.sh.Brushes.Cpp.prototype=new e.sh.Highlighter,e.sh.Brushes.Cpp.Aliases=["cpp","c","c++"],e.sh.Brushes.CSharp=function(){var t="abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach get goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed set short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void while";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-c",this.Style=".dp-c .vars { color: #d00; }"},e.sh.Brushes.CSharp.prototype=new e.sh.Highlighter,e.sh.Brushes.CSharp.Aliases=["c#","c-sharp","csharp"],e.sh.Brushes.CSS=function(){var t="ascent azimuth background-attachment background-color background-image background-position background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width border cap-height caption-side centerline clear clip color content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font height letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress table-layout text-align text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index",s="above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow",r="[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif";this.regexList=[{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\#[a-zA-Z0-9]{3,6}","g"),css:"value"},{regex:new RegExp("(-?\\d+)(.\\d+)?(px|em|pt|:|%|)","g"),css:"value"},{regex:new RegExp("!important","g"),css:"important"},{regex:new RegExp(this.GetKeywordsCSS(t),"gm"),css:"keyword"},{regex:new RegExp(this.GetValuesCSS(s),"g"),css:"value"},{regex:new RegExp(this.GetValuesCSS(r),"g"),css:"value"}],this.CssClass="dp-css",this.Style=".dp-css .value { color: black; }.dp-css .important { color: red; }"},e.sh.Highlighter.prototype.GetKeywordsCSS=function(t){return"\\b([a-z_]|)"+t.replace(/ /g,"(?=:)\\b|\\b([a-z_\\*]|\\*|)")+"(?=:)\\b"},e.sh.Highlighter.prototype.GetValuesCSS=function(t){return"\\b"+t.replace(/ /g,"(?!-)(?!:)\\b|\\b()")+":\\b"},e.sh.Brushes.CSS.prototype=new e.sh.Highlighter,e.sh.Brushes.CSS.Aliases=["css"],e.sh.Brushes.Php=function(){var t="abs acos acosh addcslashes addslashes array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists closedir closelog copy cos cosh count count_chars date decbin dechex decoct deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime strtoupper strtr strval substr substr_compare",s="and or xor __FILE__ __LINE__ array as break case cfunction class const continue declare default die do else elseif empty enddeclare endfor endforeach endif endswitch endwhile extends for foreach function include include_once global if new old_function return static switch use require require_once var while __FUNCTION__ __CLASS__ __METHOD__ abstract interface public implements extends private protected throw";this.regexList=[{regex:e.sh.RegexLib.SingleLineCComments,css:"comment"},{regex:e.sh.RegexLib.MultiLineCComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp("\\$\\w+","g"),css:"vars"},{regex:new RegExp(this.GetKeywords(t),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"keyword"}],this.CssClass="dp-c"},e.sh.Brushes.Php.prototype=new e.sh.Highlighter,e.sh.Brushes.Php.Aliases=["php"],e.sh.Brushes.Python=function(){var t="and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try yield while",s="None True False self cls class_";this.regexList=[{regex:e.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:new RegExp("^\\s*@\\w+","gm"),css:"decorator"},{regex:new RegExp(`(['"]{3})([^\\1])*?\\1`,"gm"),css:"comment"},{regex:new RegExp('"(?!")(?:\\.|\\\\\\"|[^\\""\\n\\r])*"',"gm"),css:"string"},{regex:new RegExp("'(?!')*(?:\\.|(\\\\\\')|[^\\''\\n\\r])*'","gm"),css:"string"},{regex:new RegExp("\\b\\d+\\.?\\w*","g"),css:"number"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"special"}],this.CssClass="dp-py",this.Style=".dp-py .builtins { color: #ff1493; }.dp-py .magicmethods { color: #808080; }.dp-py .exceptions { color: brown; }.dp-py .types { color: brown; font-style: italic; }.dp-py .commonlibs { color: #8A2BE2; font-style: italic; }"},e.sh.Brushes.Python.prototype=new e.sh.Highlighter,e.sh.Brushes.Python.Aliases=["py","python"],e.sh.Brushes.Xml=function(){this.CssClass="dp-xml",this.Style=".dp-xml .cdata { color: #ff1493; }.dp-xml .tag, .dp-xml .tag-name { color: #069; font-weight: bold; }.dp-xml .attribute { color: red; }.dp-xml .attribute-value { color: blue; }"},e.sh.Brushes.Xml.prototype=new e.sh.Highlighter,e.sh.Brushes.Xml.Aliases=["xml","xhtml","xslt","html","xhtml"],e.sh.Brushes.Xml.prototype.ProcessRegexList=function(){function t(l,a){l[l.length]=a}var s=0,r=null,i=null;for(this.GetMatches(new RegExp("(<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](>|>)","gm"),"cdata"),this.GetMatches(new RegExp("(<|<)!--\\s*.*?\\s*--(>|>)","gm"),"comments"),i=new RegExp(`([:\\w-.]+)\\s*=\\s*(".*?"|'.*?'|\\w+)*|(\\w+)`,"gm");(r=i.exec(this.code))!=null;)r[1]!=null&&(t(this.matches,new e.sh.Match(r[1],r.index,"attribute")),r[2]!=null&&t(this.matches,new e.sh.Match(r[2],r.index+r[0].indexOf(r[2]),"attribute-value")));for(this.GetMatches(new RegExp("(<|<)/*\\?*(?!\\!)|/*\\?*(>|>)","gm"),"tag"),i=new RegExp("(?:<|<)/*\\?*\\s*([:\\w-.]+)","gm");(r=i.exec(this.code))!=null;)t(this.matches,new e.sh.Match(r[1],r.index+r[0].indexOf(r[1]),"tag-name"))},e.sh.Brushes.Vb=function(){var t="AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType Date Decimal Declare Default Delegate Dim DirectCast Do Double Each Else ElseIf End Enum Erase Error Event Exit False Finally For Friend Function Get GetType GoSub GoTo Handles If Implements Imports In Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing NotInheritable NotOverridable Object On Option Optional Or OrElse Overloads Overridable Overrides ParamArray Preserve Private Property Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume Return Select Set Shadows Shared Short Single Static Step Stop String Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until Variant When While With WithEvents WriteOnly Xor";this.regexList=[{regex:new RegExp("'.*$","gm"),css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:new RegExp("^\\s*#.*","gm"),css:"preprocessor"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"}],this.CssClass="dp-vb"},e.sh.Brushes.Vb.prototype=new e.sh.Highlighter,e.sh.Brushes.Vb.Aliases=["vb","vb.net"],e.sh.Brushes.Ruby=function(){var t="alias and BEGIN begin break case class def define_method defined do each else elsif END end ensure false for if in module new next nil not or raise redo rescue retry return self super then throw true undef unless until when while yield",s="Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ThreadGroup Thread Time TrueClass";this.regexList=[{regex:e.sh.RegexLib.SingleLinePerlComments,css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(":[a-z][A-Za-z0-9_]*","g"),css:"symbol"},{regex:new RegExp("(\\$|@@|@)\\w+","g"),css:"variable"},{regex:new RegExp(this.GetKeywords(t),"gm"),css:"keyword"},{regex:new RegExp(this.GetKeywords(s),"gm"),css:"builtin"}],this.CssClass="dp-rb",this.Style=".dp-rb .symbol { color: #a70; }.dp-rb .variable { color: #a70; font-weight: bold; }"},e.sh.Brushes.Ruby.prototype=new e.sh.Highlighter,e.sh.Brushes.Ruby.Aliases=["ruby","rails","ror"],e.sh.Brushes.Sql=function(){var t="abs avg case cast coalesce convert count current_timestamp current_user day isnull left lower month nullif replace right session_user space substring sum system_user upper user year",s="absolute action add after alter as asc at authorization begin bigint binary bit by cascade char character check checkpoint close collate column commit committed connect connection constraint contains continue create cube current current_date current_time cursor database date deallocate dec decimal declare default delete desc distinct double drop dynamic else end end-exec escape except exec execute false fetch first float for force foreign forward free from full function global goto grant group grouping having hour ignore index inner insensitive insert instead int integer intersect into is isolation key last level load local max min minute modify move name national nchar next no numeric of off on only open option order out output partial password precision prepare primary prior privileges procedure public read real references relative repeatable restrict return returns revoke rollback rollup rows rule schema scroll second section select sequence serializable set size smallint static statistics table temp temporary then time timestamp to top transaction translation trigger true truncate uncommitted union unique update values varchar varying view when where with work",r="all and any between cross in join like not null or outer some";this.regexList=[{regex:new RegExp("--(.*)$","gm"),css:"comment"},{regex:e.sh.RegexLib.DoubleQuotedString,css:"string"},{regex:e.sh.RegexLib.SingleQuotedString,css:"string"},{regex:new RegExp(this.GetKeywords(t),"gmi"),css:"func"},{regex:new RegExp(this.GetKeywords(r),"gmi"),css:"op"},{regex:new RegExp(this.GetKeywords(s),"gmi"),css:"keyword"}],this.CssClass="dp-sql",this.Style=".dp-sql .func { color: #ff1493; }.dp-sql .op { color: #808080; }"},e.sh.Brushes.Sql.prototype=new e.sh.Highlighter,e.sh.Brushes.Sql.Aliases=["sql"];var O=this,H,p;O.PluginName="InsertCode";function N(t,s,r){var i=H&&H["text_"+t]||s;return r===void 0?i:i.split("{0}").join(String(r))}O.InitConfig=function(t){H=t},O.InitEditor=function(t){p=t,p.attachEvent("exec_command_insertcode",function(s,r,i){O.DoShowDialog(),s.returnValue=!0}),p.toolbarFactoryMap.insertcode=function(s){var r=p.createToolbarButton(s);return r.style.backgroundColor="",r}};function S(t,s,r,i){var l=t.ownerDocument.createElement(s);return r&&(l.style.cssText=r),i&&(l.className=i),t.appendChild(l),l}O.DoShowDialog=function(){var t=null;try{var s=p.getDocument(),r=s.defaultView.getSelection();r&&r.rangeCount&&(t=r.getRangeAt(0).cloneRange())}catch{t=null}function i(){if(!t)return!1;try{var b=p.getDocument(),u=b.defaultView.getSelection();return u.removeAllRanges(),u.addRange(t),!0}catch{return!1}}function l(b){if(!i())return!1;if(p.trackedChanges&&typeof p.trackedChanges.isEnabled=="function"&&p.trackedChanges.isEnabled())return p.insertHTML(b),!0;var u=p.getDocument(),w=u.defaultView.getSelection();if(!w||!w.rangeCount)return!1;for(var T=w.getRangeAt(0),v=T.startContainer,x=null;v&&v!==u.body;){if(v.nodeType===1&&/^(P|H[1-6]|LI|TD|TH|DIV|BLOCKQUOTE)$/.test(v.tagName)){x=v;break}v=v.parentNode}var m=u.createElement("div");m.innerHTML=__RTE_TT(b);var g=m.firstChild;if(!g)return!1;if(!x||!/^(P|H[1-6])$/.test(x.tagName))return T.deleteContents(),T.insertNode(g),!0;T.deleteContents();var L=T.cloneRange();L.setEndAfter(x.lastChild||x);var E=L.extractContents();x.parentNode.insertBefore(g,x.nextSibling);var C=u.createElement(x.tagName);return C.appendChild(E),(C.textContent.replace(/^\s+|\s+$/g,"")!==""||C.querySelector("*"))&&x.parentNode.insertBefore(C,g.nextSibling),x.textContent.replace(/^\s+|\s+$/g,"")===""&&!x.querySelector("img,table")&&x.parentNode.removeChild(x),!0}var a=p.createDialog(p.getLangText("insertcode"),"rte-dialog-insertcode"),f=S(a,"div","position:relative;text-align:center;"),c=S(f,"label");c.innerText=p.getLangText("language")+":";var n=S(f,"select","width:200px;");n.id="rte-insertcode-lang-"+new Date().getTime(),c.htmlFor=n.id,n.options.add(new Option(N("cd_plaintext","Plain Text"),""));for(var d in e.sh.Brushes){var _=e.sh.Brushes[d].Aliases;if(_!=null){n.options.add(new Option(_,d));var h=null;try{h=sessionStorage.getItem("rte-insertcode-lang")}catch{}h&&(n.value=h)}}var y=S(a,"div","position:relative;text-align:center;"),o=S(y,"textarea","width:100%;min-width:300px;height:200px");o.setAttribute("aria-label",N("cd_code","Code"));var R=S(a,"rte-dialog-footer",null,"rte-dialog-footer-center"),P=S(R,"rte-dialog-button");P.innerText=N("insert","Insert"),setTimeout(function(){o.focus()},300),P.onclick=function(){a.close();try{sessionStorage.setItem("rte-insertcode-lang",n.value)}catch{}if(n.value!=""){var b=e.sh.Brushes[n.value];o.language=b.Aliases[0]+":nocontrols",o.name="rteinsertcode"+new Date().getTime(),o.textContent=o.value,e.sh.HighlightAll(o);var u=o.previousSibling;if(!l('<div class="dp-highlighter">'+u.innerHTML+"</div>")){var w=p.insertRootParagraph();w.innerHTML=__RTE_TT('<div class="dp-highlighter">'+u.innerHTML+"</div>")}}else if(i())p.insertText(o.value);else{var w=p.insertRootParagraph();w.innerText=o.value}p.focus()}}}
|
|
@@ -51,7 +51,7 @@ function RTE_Plugin_InsertEmoji() {
|
|
|
51
51
|
emojiNameWaiters = [done];
|
|
52
52
|
var base = String((config && config.url_base) || "/richtexteditor").replace(/\/+$/, "");
|
|
53
53
|
var s = document.createElement("script");
|
|
54
|
-
s.src = base + "/lang/emoji/rte-emoji-" + l + ".js";
|
|
54
|
+
s.src = window.RTE_TrustedTypes.scriptURL(base + "/lang/emoji/rte-emoji-" + l + ".js");
|
|
55
55
|
s.charset = "utf-8";
|
|
56
56
|
var finish = function () { var w = emojiNameWaiters || []; emojiNameWaiters = null; for (var i = 0; i < w.length; i++) { try { w[i](); } catch (e) { /* ignore */ } } };
|
|
57
57
|
s.onload = finish;
|
|
@@ -324,7 +324,7 @@ function RTE_Plugin_InsertEmoji() {
|
|
|
324
324
|
hitsHtml.push('<gitem class="rte-flex-column-center" style="width:32px;height:32px;margin:2px"><gspan role="menuitem" tabindex="0" aria-label="' + (emojiName(item) || item.emoji).replace(/"/g, '') + '" htmlcode="' + htmlcode + '" title="' + item.emoji + ' ' + emojiName(item).replace(/"/g, '') + '">' + htmlcode + '</gspan></gitem>');
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
resultpanel.innerHTML = '<div style="width:100%;padding:3px;margin-top:5px;color:' + headColor + ';text-align:center;">' + emojiItemsText(itemindex) + '</div>' + hitsHtml.join('');
|
|
327
|
+
resultpanel.innerHTML = __RTE_TT('<div style="width:100%;padding:3px;margin-top:5px;color:' + headColor + ';text-align:center;">' + emojiItemsText(itemindex) + '</div>' + hitsHtml.join(''));
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
panel.setAttribute("id", "emoji-picker");
|
|
@@ -347,7 +347,7 @@ function RTE_Plugin_InsertEmoji() {
|
|
|
347
347
|
// gi -1 is Recently used, the first tab when there is one
|
|
348
348
|
function renderCategory(gi) {
|
|
349
349
|
activeGroupIndex = gi;
|
|
350
|
-
grouppanel.innerHTML = buildCategoryHTML(gi === -1 ? recentGroup : emojidata[gi]);
|
|
350
|
+
grouppanel.innerHTML = __RTE_TT(buildCategoryHTML(gi === -1 ? recentGroup : emojidata[gi]));
|
|
351
351
|
grouppanel.scrollTop = 0;
|
|
352
352
|
for (var bi = 0; bi < tabuibtns.length; bi++) {
|
|
353
353
|
tabuibtns[bi].className = tabuibtns[bi].__rteGroup === gi ? "rte-ui-active" : "";
|
|
@@ -363,7 +363,7 @@ function RTE_Plugin_InsertEmoji() {
|
|
|
363
363
|
(function (group) {
|
|
364
364
|
var btn = __Append(tabuitoolbar, "rte-tabui-toolbar-button", "width:32px;text-align:center;margin:4px");
|
|
365
365
|
btn.setAttribute("title", emojiGroupLabel(group.name));
|
|
366
|
-
btn.innerHTML = group.items[0].emoji;
|
|
366
|
+
btn.innerHTML = __RTE_TT(group.items[0].emoji);
|
|
367
367
|
btn.__rteGroup = group.index;
|
|
368
368
|
btn.onclick = function () { renderCategory(group.index); };
|
|
369
369
|
tabuibtns.push(btn);
|