Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-special-characters

Package Overview
Dependencies
Maintainers
1
Versions
739
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-special-characters - npm Package Compare versions

Comparing version 36.0.1 to 37.0.0-alpha.0

src/index.d.ts

2

build/special-characters.js

@@ -5,2 +5,2 @@ !function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{All:"All","Almost equal to":"Almost equal to",Angle:"Angle","Approximately equal to":"Approximately equal to",Arrows:"Arrows","Asterisk operator":"Asterisk operator","Austral sign":"Austral sign","back with leftwards arrow above":"back with leftwards arrow above","Bitcoin sign":"Bitcoin sign","Cedi sign":"Cedi sign","Cent sign":"Cent sign","Character categories":"Character categories","Colon sign":"Colon sign","Contains as member":"Contains as member","Copyright sign":"Copyright sign","Cruzeiro sign":"Cruzeiro sign",Currency:"Currency","Currency sign":"Currency sign","Degree sign":"Degree sign","Division sign":"Division sign","Dollar sign":"Dollar sign","Dong sign":"Dong sign","Double dagger":"Double dagger","Double exclamation mark":"Double exclamation mark","Double low-9 quotation mark":"Double low-9 quotation mark","Double question mark":"Double question mark","downwards arrow to bar":"downwards arrow to bar","downwards dashed arrow":"downwards dashed arrow","downwards double arrow":"downwards double arrow","downwards simple arrow":"downwards simple arrow","Drachma sign":"Drachma sign","Element of":"Element of","Em dash":"Em dash","Empty set":"Empty set","En dash":"En dash","end with leftwards arrow above":"end with leftwards arrow above","Euro sign":"Euro sign","Euro-currency sign":"Euro-currency sign","Exclamation question mark":"Exclamation question mark","For all":"For all","Fraction slash":"Fraction slash","French franc sign":"French franc sign","German penny sign":"German penny sign","Greater-than or equal to":"Greater-than or equal to","Greater-than sign":"Greater-than sign","Guarani sign":"Guarani sign","Horizontal ellipsis":"Horizontal ellipsis","Hryvnia sign":"Hryvnia sign","Identical to":"Identical to","Indian rupee sign":"Indian rupee sign",Infinity:"Infinity",Integral:"Integral",Intersection:"Intersection","Inverted exclamation mark":"Inverted exclamation mark","Inverted question mark":"Inverted question mark","Kip sign":"Kip sign",Latin:"Latin","Latin capital letter a with breve":"Latin capital letter a with breve","Latin capital letter a with macron":"Latin capital letter a with macron","Latin capital letter a with ogonek":"Latin capital letter a with ogonek","Latin capital letter c with acute":"Latin capital letter c with acute","Latin capital letter c with caron":"Latin capital letter c with caron","Latin capital letter c with circumflex":"Latin capital letter c with circumflex","Latin capital letter c with dot above":"Latin capital letter c with dot above","Latin capital letter d with caron":"Latin capital letter d with caron","Latin capital letter d with stroke":"Latin capital letter d with stroke","Latin capital letter e with breve":"Latin capital letter e with breve","Latin capital letter e with caron":"Latin capital letter e with caron","Latin capital letter e with dot above":"Latin capital letter e with dot above","Latin capital letter e with macron":"Latin capital letter e with macron","Latin capital letter e with ogonek":"Latin capital letter e with ogonek","Latin capital letter eng":"Latin capital letter eng","Latin capital letter g with breve":"Latin capital letter g with breve","Latin capital letter g with cedilla":"Latin capital letter g with cedilla","Latin capital letter g with circumflex":"Latin capital letter g with circumflex","Latin capital letter g with dot above":"Latin capital letter g with dot above","Latin capital letter h with circumflex":"Latin capital letter h with circumflex","Latin capital letter h with stroke":"Latin capital letter h with stroke","Latin capital letter i with breve":"Latin capital letter i with breve","Latin capital letter i with dot above":"Latin capital letter i with dot above","Latin capital letter i with macron":"Latin capital letter i with macron","Latin capital letter i with ogonek":"Latin capital letter i with ogonek","Latin capital letter i with tilde":"Latin capital letter i with tilde","Latin capital letter j with circumflex":"Latin capital letter j with circumflex","Latin capital letter k with cedilla":"Latin capital letter k with cedilla","Latin capital letter l with acute":"Latin capital letter l with acute","Latin capital letter l with caron":"Latin capital letter l with caron","Latin capital letter l with cedilla":"Latin capital letter l with cedilla","Latin capital letter l with middle dot":"Latin capital letter l with middle dot","Latin capital letter l with stroke":"Latin capital letter l with stroke","Latin capital letter n with acute":"Latin capital letter n with acute","Latin capital letter n with caron":"Latin capital letter n with caron","Latin capital letter n with cedilla":"Latin capital letter n with cedilla","Latin capital letter o with breve":"Latin capital letter o with breve","Latin capital letter o with double acute":"Latin capital letter o with double acute","Latin capital letter o with macron":"Latin capital letter o with macron","Latin capital letter r with acute":"Latin capital letter r with acute","Latin capital letter r with caron":"Latin capital letter r with caron","Latin capital letter r with cedilla":"Latin capital letter r with cedilla","Latin capital letter s with acute":"Latin capital letter s with acute","Latin capital letter s with caron":"Latin capital letter s with caron","Latin capital letter s with cedilla":"Latin capital letter s with cedilla","Latin capital letter s with circumflex":"Latin capital letter s with circumflex","Latin capital letter t with caron":"Latin capital letter t with caron","Latin capital letter t with cedilla":"Latin capital letter t with cedilla","Latin capital letter t with stroke":"Latin capital letter t with stroke","Latin capital letter u with breve":"Latin capital letter u with breve","Latin capital letter u with double acute":"Latin capital letter u with double acute","Latin capital letter u with macron":"Latin capital letter u with macron","Latin capital letter u with ogonek":"Latin capital letter u with ogonek","Latin capital letter u with ring above":"Latin capital letter u with ring above","Latin capital letter u with tilde":"Latin capital letter u with tilde","Latin capital letter w with circumflex":"Latin capital letter w with circumflex","Latin capital letter y with circumflex":"Latin capital letter y with circumflex","Latin capital letter y with diaeresis":"Latin capital letter y with diaeresis","Latin capital letter z with acute":"Latin capital letter z with acute","Latin capital letter z with caron":"Latin capital letter z with caron","Latin capital letter z with dot above":"Latin capital letter z with dot above","Latin capital ligature ij":"Latin capital ligature ij","Latin capital ligature oe":"Latin capital ligature oe","Latin small letter a with breve":"Latin small letter a with breve","Latin small letter a with macron":"Latin small letter a with macron","Latin small letter a with ogonek":"Latin small letter a with ogonek","Latin small letter c with acute":"Latin small letter c with acute","Latin small letter c with caron":"Latin small letter c with caron","Latin small letter c with circumflex":"Latin small letter c with circumflex","Latin small letter c with dot above":"Latin small letter c with dot above","Latin small letter d with caron":"Latin small letter d with caron","Latin small letter d with stroke":"Latin small letter d with stroke","Latin small letter dotless i":"Latin small letter dotless i","Latin small letter e with breve":"Latin small letter e with breve","Latin small letter e with caron":"Latin small letter e with caron","Latin small letter e with dot above":"Latin small letter e with dot above","Latin small letter e with macron":"Latin small letter e with macron","Latin small letter e with ogonek":"Latin small letter e with ogonek","Latin small letter eng":"Latin small letter eng","Latin small letter f with hook":"Latin small letter f with hook","Latin small letter g with breve":"Latin small letter g with breve","Latin small letter g with cedilla":"Latin small letter g with cedilla","Latin small letter g with circumflex":"Latin small letter g with circumflex","Latin small letter g with dot above":"Latin small letter g with dot above","Latin small letter h with circumflex":"Latin small letter h with circumflex","Latin small letter h with stroke":"Latin small letter h with stroke","Latin small letter i with breve":"Latin small letter i with breve","Latin small letter i with macron":"Latin small letter i with macron","Latin small letter i with ogonek":"Latin small letter i with ogonek","Latin small letter i with tilde":"Latin small letter i with tilde","Latin small letter j with circumflex":"Latin small letter j with circumflex","Latin small letter k with cedilla":"Latin small letter k with cedilla","Latin small letter kra":"Latin small letter kra","Latin small letter l with acute":"Latin small letter l with acute","Latin small letter l with caron":"Latin small letter l with caron","Latin small letter l with cedilla":"Latin small letter l with cedilla","Latin small letter l with middle dot":"Latin small letter l with middle dot","Latin small letter l with stroke":"Latin small letter l with stroke","Latin small letter long s":"Latin small letter long s","Latin small letter n preceded by apostrophe":"Latin small letter n preceded by apostrophe","Latin small letter n with acute":"Latin small letter n with acute","Latin small letter n with caron":"Latin small letter n with caron","Latin small letter n with cedilla":"Latin small letter n with cedilla","Latin small letter o with breve":"Latin small letter o with breve","Latin small letter o with double acute":"Latin small letter o with double acute","Latin small letter o with macron":"Latin small letter o with macron","Latin small letter r with acute":"Latin small letter r with acute","Latin small letter r with caron":"Latin small letter r with caron","Latin small letter r with cedilla":"Latin small letter r with cedilla","Latin small letter s with acute":"Latin small letter s with acute","Latin small letter s with caron":"Latin small letter s with caron","Latin small letter s with cedilla":"Latin small letter s with cedilla","Latin small letter s with circumflex":"Latin small letter s with circumflex","Latin small letter t with caron":"Latin small letter t with caron","Latin small letter t with cedilla":"Latin small letter t with cedilla","Latin small letter t with stroke":"Latin small letter t with stroke","Latin small letter u with breve":"Latin small letter u with breve","Latin small letter u with double acute":"Latin small letter u with double acute","Latin small letter u with macron":"Latin small letter u with macron","Latin small letter u with ogonek":"Latin small letter u with ogonek","Latin small letter u with ring above":"Latin small letter u with ring above","Latin small letter u with tilde":"Latin small letter u with tilde","Latin small letter w with circumflex":"Latin small letter w with circumflex","Latin small letter y with circumflex":"Latin small letter y with circumflex","Latin small letter z with acute":"Latin small letter z with acute","Latin small letter z with caron":"Latin small letter z with caron","Latin small letter z with dot above":"Latin small letter z with dot above","Latin small ligature ij":"Latin small ligature ij","Latin small ligature oe":"Latin small ligature oe","Left double quotation mark":"Left double quotation mark","Left single quotation mark":"Left single quotation mark","Left-pointing double angle quotation mark":"Left-pointing double angle quotation mark","leftwards arrow to bar":"leftwards arrow to bar","leftwards dashed arrow":"leftwards dashed arrow","leftwards double arrow":"leftwards double arrow","leftwards simple arrow":"leftwards simple arrow","Less-than or equal to":"Less-than or equal to","Less-than sign":"Less-than sign","Lira sign":"Lira sign","Livre tournois sign":"Livre tournois sign","Logical and":"Logical and","Logical or":"Logical or",Macron:"Macron","Manat sign":"Manat sign",Mathematical:"Mathematical","Mill sign":"Mill sign","Minus sign":"Minus sign","Multiplication sign":"Multiplication sign","N-ary product":"N-ary product","N-ary summation":"N-ary summation",Nabla:"Nabla","Naira sign":"Naira sign","New sheqel sign":"New sheqel sign","Nordic mark sign":"Nordic mark sign","Not an element of":"Not an element of","Not equal to":"Not equal to","Not sign":"Not sign","on with exclamation mark with left right arrow above":"on with exclamation mark with left right arrow above",Overline:"Overline","Paragraph sign":"Paragraph sign","Partial differential":"Partial differential","Per mille sign":"Per mille sign","Per ten thousand sign":"Per ten thousand sign","Peseta sign":"Peseta sign","Peso sign":"Peso sign","Plus-minus sign":"Plus-minus sign","Pound sign":"Pound sign","Proportional to":"Proportional to","Question exclamation mark":"Question exclamation mark","Registered sign":"Registered sign","Reversed paragraph sign":"Reversed paragraph sign","Right double quotation mark":"Right double quotation mark","Right single quotation mark":"Right single quotation mark","Right-pointing double angle quotation mark":"Right-pointing double angle quotation mark","rightwards arrow to bar":"rightwards arrow to bar","rightwards dashed arrow":"rightwards dashed arrow","rightwards double arrow":"rightwards double arrow","rightwards simple arrow":"rightwards simple arrow","Ruble sign":"Ruble sign","Rupee sign":"Rupee sign","Section sign":"Section sign","Single left-pointing angle quotation mark":"Single left-pointing angle quotation mark","Single low-9 quotation mark":"Single low-9 quotation mark","Single right-pointing angle quotation mark":"Single right-pointing angle quotation mark","soon with rightwards arrow above":"soon with rightwards arrow above","Special characters":"Special characters","Spesmilo sign":"Spesmilo sign","Square root":"Square root","Tenge sign":"Tenge sign",Text:"Text","There exists":"There exists","Tilde operator":"Tilde operator","top with upwards arrow above":"top with upwards arrow above","Trade mark sign":"Trade mark sign","Tugrik sign":"Tugrik sign","Turkish lira sign":"Turkish lira sign","Two dot leader":"Two dot leader",Union:"Union","up down arrow with base":"up down arrow with base","upwards arrow to bar":"upwards arrow to bar","upwards dashed arrow":"upwards dashed arrow","upwards double arrow":"upwards double arrow","upwards simple arrow":"upwards simple arrow","Vulgar fraction one half":"Vulgar fraction one half","Vulgar fraction one quarter":"Vulgar fraction one quarter","Vulgar fraction three quarters":"Vulgar fraction three quarters","Won sign":"Won sign","Yen sign":"Yen sign"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),

* For licensing, see LICENSE.md.
*/(()=>{var t={395:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid .ck-character-grid__tiles{display:grid}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{max-height:200px;overflow-x:hidden;overflow-y:auto;width:350px}@media screen and (max-width:600px){.ck.ck-character-grid{width:190px}}.ck.ck-character-grid .ck-character-grid__tiles{grid-gap:var(--ck-spacing-standard);grid-template-columns:repeat(10,1fr);margin:var(--ck-spacing-standard) var(--ck-spacing-large)}@media screen and (max-width:600px){.ck.ck-character-grid .ck-character-grid__tiles{grid-template-columns:repeat(5,1fr)}}.ck.ck-character-grid .ck-character-grid__tile{border:0;font-size:1.2em;height:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-character-grid-tile-size)}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);text-align:center;width:100%}",""]);const l=r},198:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-info{border-top:1px solid var(--ck-color-base-border);display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-character-info>*{font-size:var(--ck-font-size-small);text-transform:uppercase}.ck.ck-character-info .ck-character-info__name{max-width:280px;overflow:hidden;text-overflow:ellipsis}.ck.ck-character-info .ck-character-info__code{opacity:.6}@media screen and (max-width:600px){.ck.ck-character-info{max-width:190px}}",""]);const l=r},454:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-special-characters-navigation>.ck-label{max-width:160px;overflow:hidden;text-overflow:ellipsis}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}@media screen and (max-width:600px){.ck.ck-special-characters-navigation{max-width:190px}.ck.ck-special-characters-navigation>.ck-form__header__label{overflow:hidden;text-overflow:ellipsis}}",""]);const l=r},609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var a=t(e);return e[2]?"@media ".concat(e[2]," {").concat(a,"}"):a})).join("")},e.i=function(t,a,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(r[c]=!0)}for(var n=0;n<t.length;n++){var o=[].concat(t[n]);i&&r[o[0]]||(a&&(o[2]?o[2]="".concat(a," and ").concat(o[2]):o[2]=a),e.push(o))}},e}},62:(t,e,a)=>{"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},l=function(){var t={};return function(e){if(void 0===t[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}t[e]=a}return t[e]}}(),c=[];function n(t){for(var e=-1,a=0;a<c.length;a++)if(c[a].identifier===t){e=a;break}return e}function o(t,e){for(var a={},i=[],r=0;r<t.length;r++){var l=t[r],o=e.base?l[0]+e.base:l[0],s=a[o]||0,h="".concat(o," ").concat(s);a[o]=s+1;var w=n(h),d={css:l[1],media:l[2],sourceMap:l[3]};-1!==w?(c[w].references++,c[w].updater(d)):c.push({identifier:h,updater:p(d,e),references:1}),i.push(h)}return i}function s(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var r=a.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var c=l(t.insert||"head");if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(e)}return e}var h,w=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function d(t,e,a,i){var r=a?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=w(e,r);else{var l=document.createTextNode(r),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(l,c[e]):t.appendChild(l)}}function u(t,e,a){var i=a.css,r=a.media,l=a.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),l&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var g=null,m=0;function p(t,e){var a,i,r;if(e.singleton){var l=m++;a=g||(g=s(e)),i=d.bind(null,a,l,!1),r=d.bind(null,a,l,!0)}else a=s(e),i=u.bind(null,a,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(a)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var a=o(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<a.length;i++){var r=n(a[i]);c[r].references--}for(var l=o(t,e),s=0;s<a.length;s++){var h=n(a[s]);0===c[h].references&&(c[h].updater(),c.splice(h,1))}a=l}}}},704:(t,e,a)=>{t.exports=a(79)("./src/core.js")},181:(t,e,a)=>{t.exports=a(79)("./src/typing.js")},273:(t,e,a)=>{t.exports=a(79)("./src/ui.js")},209:(t,e,a)=>{t.exports=a(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function a(i){var r=e[i];if(void 0!==r)return r.exports;var l=e[i]={id:i,exports:{}};return t[i](l,l.exports,a),l.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nc=void 0;var i={};(()=>{"use strict";a.r(i),a.d(i,{SpecialCharacters:()=>k,SpecialCharactersArrows:()=>v,SpecialCharactersCurrency:()=>T,SpecialCharactersEssentials:()=>q,SpecialCharactersLatin:()=>C,SpecialCharactersMathematical:()=>y,SpecialCharactersText:()=>x});var t=a(704),e=a(181),r=a(273),l=a(209);class c extends r.FormHeaderView{constructor(t,e){super(t);const a=t.t;this.set("class","ck-special-characters-navigation"),this.groupDropdownView=this._createGroupDropdown(e),this.groupDropdownView.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",this.label=a("Special characters"),this.children.add(this.groupDropdownView)}get currentGroupName(){return this.groupDropdownView.value}focus(){this.groupDropdownView.focus()}_createGroupDropdown(t){const e=this.locale,a=e.t,i=(0,r.createDropdown)(e),l=this._getCharacterGroupListItemDefinitions(i,t);return i.set("value",l.first.model.name),i.buttonView.bind("label").to(i,"value",(e=>t.get(e))),i.buttonView.set({isOn:!1,withText:!0,tooltip:a("Character categories"),class:["ck-dropdown__button_label-width_auto"]}),i.on("execute",(t=>{i.value=t.source.name})),i.delegate("execute").to(this),(0,r.addListToDropdown)(i,l),i}_getCharacterGroupListItemDefinitions(t,e){const a=new l.Collection;for(const[i,l]of e){const e={type:"button",model:new r.Model({name:i,label:l,withText:!0})};e.model.bind("isOn").to(t,"value",(t=>t===e.model.name)),a.add(e)}return a}}var n=a(62),o=a.n(n),s=a(395),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(s.Z,h);s.Z.locals;class w extends r.View{constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,(0,r.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>l.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}createTile(t,e){const a=new r.ButtonView(this.locale);return a.set({label:t,withText:!0,class:"ck-character-grid__tile"}),a.extendTemplate({attributes:{title:e},on:{mouseover:a.bindTemplate.to("mouseover"),focus:a.bindTemplate.to("focus")}}),a.on("mouseover",(()=>{this.fire("tileHover",{name:e,character:t})})),a.on("focus",(()=>{this.fire("tileFocus",{name:e,character:t})})),a.on("execute",(()=>{this.fire("execute",{name:e,character:t})})),a}render(){super.render();for(const t of this.tiles)this.focusTracker.add(t.element);this.tiles.on("change",((t,{added:e,removed:a})=>{if(e.length>0)for(const t of e)this.focusTracker.add(t.element);if(a.length>0)for(const t of a)this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.get(0).focus()}}var d=a(198),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(d.Z,u);d.Z.locals;class g extends r.View{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",m),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",(t=>t||"​"))}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function m(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}class p extends r.View{constructor(t,e,a,i){super(t),this.items=this.createCollection(),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,this._focusCycler=new r.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.navigationView=e,this.gridView=a,this.infoView=i,this.setTemplate({tag:"div",children:[this.navigationView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.navigationView.groupDropdownView.buttonView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.navigationView.groupDropdownView.buttonView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.navigationView.focus()}}var L=a(454),f={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(L.Z,f);L.Z.locals;const b="All";class k extends t.Plugin{static get requires(){return[e.Typing]}static get pluginName(){return"SpecialCharacters"}constructor(t){super(t);const e=t.t;this._characters=new Map,this._groups=new Map,this._allSpecialCharactersGroupLabel=e("All")}init(){const t=this.editor,e=t.t,a=t.commands.get("input");t.ui.componentFactory.add("specialCharacters",(i=>{const l=(0,r.createDropdown)(i);let c;return l.buttonView.set({label:e("Special characters"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z"/></svg>',tooltip:!0}),l.bind("isEnabled").to(a),l.on("execute",((e,a)=>{t.execute("insertText",{text:a.character}),t.editing.view.focus()})),l.on("change:isOpen",(()=>{if(!c){c=this._createDropdownPanelContent(i,l);const t=new p(i,c.navigationView,c.gridView,c.infoView);l.panelView.children.add(t)}c.infoView.set({character:null,name:null})})),l}))}addItems(t,e,a={label:t}){if(t===b)throw new l.CKEditorError("special-character-invalid-group-name",null);const i=this._getGroup(t,a.label);for(const t of e)i.items.add(t.title),this._characters.set(t.title,t.character)}getGroups(){const t=Array.from(this._groups.keys()),e=this.editor.config.get("specialCharacters.order")||[],a=e.find((e=>!t.includes(e)));if(a)throw new l.CKEditorError("special-character-invalid-order-group-name",null,{invalidGroup:a});return new Set([...e,...t])}getCharactersForGroup(t){if(t===b)return new Set(this._characters.keys());const e=this._groups.get(t);return e?e.items:void 0}getCharacter(t){return this._characters.get(t)}_getGroup(t,e){return this._groups.has(t)||this._groups.set(t,{items:new Set,label:e}),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const a=this.getCharactersForGroup(t);for(const t of a){const a=this.getCharacter(t);e.tiles.add(e.createTile(a,t))}}_createDropdownPanelContent(t,e){const a=new Map([[b,this._allSpecialCharactersGroupLabel],...Array.from(this.getGroups()).map((t=>[t,this._groups.get(t).label]))]),i=new c(t,a),r=new w(t),l=new g(t);return r.delegate("execute").to(e),r.on("tileHover",((t,e)=>{l.set(e)})),r.on("tileFocus",((t,e)=>{l.set(e)})),i.on("execute",(()=>{this._updateGrid(i.currentGroupName,r)})),this._updateGrid(i.currentGroupName,r),{navigationView:i,gridView:r,infoView:l}}}class v extends t.Plugin{static get pluginName(){return"SpecialCharactersArrows"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Arrows",[{title:e("leftwards simple arrow"),character:"←"},{title:e("rightwards simple arrow"),character:"→"},{title:e("upwards simple arrow"),character:"↑"},{title:e("downwards simple arrow"),character:"↓"},{title:e("leftwards double arrow"),character:"⇐"},{title:e("rightwards double arrow"),character:"⇒"},{title:e("upwards double arrow"),character:"⇑"},{title:e("downwards double arrow"),character:"⇓"},{title:e("leftwards dashed arrow"),character:"⇠"},{title:e("rightwards dashed arrow"),character:"⇢"},{title:e("upwards dashed arrow"),character:"⇡"},{title:e("downwards dashed arrow"),character:"⇣"},{title:e("leftwards arrow to bar"),character:"⇤"},{title:e("rightwards arrow to bar"),character:"⇥"},{title:e("upwards arrow to bar"),character:"⤒"},{title:e("downwards arrow to bar"),character:"⤓"},{title:e("up down arrow with base"),character:"↨"},{title:e("back with leftwards arrow above"),character:"🔙"},{title:e("end with leftwards arrow above"),character:"🔚"},{title:e("on with exclamation mark with left right arrow above"),character:"🔛"},{title:e("soon with rightwards arrow above"),character:"🔜"},{title:e("top with upwards arrow above"),character:"🔝"}],{label:e("Arrows")})}}class x extends t.Plugin{static get pluginName(){return"SpecialCharactersText"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:e("Single left-pointing angle quotation mark")},{character:"›",title:e("Single right-pointing angle quotation mark")},{character:"«",title:e("Left-pointing double angle quotation mark")},{character:"»",title:e("Right-pointing double angle quotation mark")},{character:"‘",title:e("Left single quotation mark")},{character:"’",title:e("Right single quotation mark")},{character:"“",title:e("Left double quotation mark")},{character:"”",title:e("Right double quotation mark")},{character:"‚",title:e("Single low-9 quotation mark")},{character:"„",title:e("Double low-9 quotation mark")},{character:"¡",title:e("Inverted exclamation mark")},{character:"¿",title:e("Inverted question mark")},{character:"‥",title:e("Two dot leader")},{character:"…",title:e("Horizontal ellipsis")},{character:"‡",title:e("Double dagger")},{character:"‰",title:e("Per mille sign")},{character:"‱",title:e("Per ten thousand sign")},{character:"‼",title:e("Double exclamation mark")},{character:"⁈",title:e("Question exclamation mark")},{character:"⁉",title:e("Exclamation question mark")},{character:"⁇",title:e("Double question mark")},{character:"©",title:e("Copyright sign")},{character:"®",title:e("Registered sign")},{character:"™",title:e("Trade mark sign")},{character:"§",title:e("Section sign")},{character:"¶",title:e("Paragraph sign")},{character:"⁋",title:e("Reversed paragraph sign")}],{label:e("Text")})}}class y extends t.Plugin{static get pluginName(){return"SpecialCharactersMathematical"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:e("Less-than sign")},{character:">",title:e("Greater-than sign")},{character:"≤",title:e("Less-than or equal to")},{character:"≥",title:e("Greater-than or equal to")},{character:"–",title:e("En dash")},{character:"—",title:e("Em dash")},{character:"¯",title:e("Macron")},{character:"‾",title:e("Overline")},{character:"°",title:e("Degree sign")},{character:"−",title:e("Minus sign")},{character:"±",title:e("Plus-minus sign")},{character:"÷",title:e("Division sign")},{character:"⁄",title:e("Fraction slash")},{character:"×",title:e("Multiplication sign")},{character:"ƒ",title:e("Latin small letter f with hook")},{character:"∫",title:e("Integral")},{character:"∑",title:e("N-ary summation")},{character:"∞",title:e("Infinity")},{character:"√",title:e("Square root")},{character:"∼",title:e("Tilde operator")},{character:"≅",title:e("Approximately equal to")},{character:"≈",title:e("Almost equal to")},{character:"≠",title:e("Not equal to")},{character:"≡",title:e("Identical to")},{character:"∈",title:e("Element of")},{character:"∉",title:e("Not an element of")},{character:"∋",title:e("Contains as member")},{character:"∏",title:e("N-ary product")},{character:"∧",title:e("Logical and")},{character:"∨",title:e("Logical or")},{character:"¬",title:e("Not sign")},{character:"∩",title:e("Intersection")},{character:"∪",title:e("Union")},{character:"∂",title:e("Partial differential")},{character:"∀",title:e("For all")},{character:"∃",title:e("There exists")},{character:"∅",title:e("Empty set")},{character:"∇",title:e("Nabla")},{character:"∗",title:e("Asterisk operator")},{character:"∝",title:e("Proportional to")},{character:"∠",title:e("Angle")},{character:"¼",title:e("Vulgar fraction one quarter")},{character:"½",title:e("Vulgar fraction one half")},{character:"¾",title:e("Vulgar fraction three quarters")}],{label:e("Mathematical")})}}class C extends t.Plugin{static get pluginName(){return"SpecialCharactersLatin"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:e("Latin capital letter a with macron")},{character:"ā",title:e("Latin small letter a with macron")},{character:"Ă",title:e("Latin capital letter a with breve")},{character:"ă",title:e("Latin small letter a with breve")},{character:"Ą",title:e("Latin capital letter a with ogonek")},{character:"ą",title:e("Latin small letter a with ogonek")},{character:"Ć",title:e("Latin capital letter c with acute")},{character:"ć",title:e("Latin small letter c with acute")},{character:"Ĉ",title:e("Latin capital letter c with circumflex")},{character:"ĉ",title:e("Latin small letter c with circumflex")},{character:"Ċ",title:e("Latin capital letter c with dot above")},{character:"ċ",title:e("Latin small letter c with dot above")},{character:"Č",title:e("Latin capital letter c with caron")},{character:"č",title:e("Latin small letter c with caron")},{character:"Ď",title:e("Latin capital letter d with caron")},{character:"ď",title:e("Latin small letter d with caron")},{character:"Đ",title:e("Latin capital letter d with stroke")},{character:"đ",title:e("Latin small letter d with stroke")},{character:"Ē",title:e("Latin capital letter e with macron")},{character:"ē",title:e("Latin small letter e with macron")},{character:"Ĕ",title:e("Latin capital letter e with breve")},{character:"ĕ",title:e("Latin small letter e with breve")},{character:"Ė",title:e("Latin capital letter e with dot above")},{character:"ė",title:e("Latin small letter e with dot above")},{character:"Ę",title:e("Latin capital letter e with ogonek")},{character:"ę",title:e("Latin small letter e with ogonek")},{character:"Ě",title:e("Latin capital letter e with caron")},{character:"ě",title:e("Latin small letter e with caron")},{character:"Ĝ",title:e("Latin capital letter g with circumflex")},{character:"ĝ",title:e("Latin small letter g with circumflex")},{character:"Ğ",title:e("Latin capital letter g with breve")},{character:"ğ",title:e("Latin small letter g with breve")},{character:"Ġ",title:e("Latin capital letter g with dot above")},{character:"ġ",title:e("Latin small letter g with dot above")},{character:"Ģ",title:e("Latin capital letter g with cedilla")},{character:"ģ",title:e("Latin small letter g with cedilla")},{character:"Ĥ",title:e("Latin capital letter h with circumflex")},{character:"ĥ",title:e("Latin small letter h with circumflex")},{character:"Ħ",title:e("Latin capital letter h with stroke")},{character:"ħ",title:e("Latin small letter h with stroke")},{character:"Ĩ",title:e("Latin capital letter i with tilde")},{character:"ĩ",title:e("Latin small letter i with tilde")},{character:"Ī",title:e("Latin capital letter i with macron")},{character:"ī",title:e("Latin small letter i with macron")},{character:"Ĭ",title:e("Latin capital letter i with breve")},{character:"ĭ",title:e("Latin small letter i with breve")},{character:"Į",title:e("Latin capital letter i with ogonek")},{character:"į",title:e("Latin small letter i with ogonek")},{character:"İ",title:e("Latin capital letter i with dot above")},{character:"ı",title:e("Latin small letter dotless i")},{character:"IJ",title:e("Latin capital ligature ij")},{character:"ij",title:e("Latin small ligature ij")},{character:"Ĵ",title:e("Latin capital letter j with circumflex")},{character:"ĵ",title:e("Latin small letter j with circumflex")},{character:"Ķ",title:e("Latin capital letter k with cedilla")},{character:"ķ",title:e("Latin small letter k with cedilla")},{character:"ĸ",title:e("Latin small letter kra")},{character:"Ĺ",title:e("Latin capital letter l with acute")},{character:"ĺ",title:e("Latin small letter l with acute")},{character:"Ļ",title:e("Latin capital letter l with cedilla")},{character:"ļ",title:e("Latin small letter l with cedilla")},{character:"Ľ",title:e("Latin capital letter l with caron")},{character:"ľ",title:e("Latin small letter l with caron")},{character:"Ŀ",title:e("Latin capital letter l with middle dot")},{character:"ŀ",title:e("Latin small letter l with middle dot")},{character:"Ł",title:e("Latin capital letter l with stroke")},{character:"ł",title:e("Latin small letter l with stroke")},{character:"Ń",title:e("Latin capital letter n with acute")},{character:"ń",title:e("Latin small letter n with acute")},{character:"Ņ",title:e("Latin capital letter n with cedilla")},{character:"ņ",title:e("Latin small letter n with cedilla")},{character:"Ň",title:e("Latin capital letter n with caron")},{character:"ň",title:e("Latin small letter n with caron")},{character:"ʼn",title:e("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:e("Latin capital letter eng")},{character:"ŋ",title:e("Latin small letter eng")},{character:"Ō",title:e("Latin capital letter o with macron")},{character:"ō",title:e("Latin small letter o with macron")},{character:"Ŏ",title:e("Latin capital letter o with breve")},{character:"ŏ",title:e("Latin small letter o with breve")},{character:"Ő",title:e("Latin capital letter o with double acute")},{character:"ő",title:e("Latin small letter o with double acute")},{character:"Œ",title:e("Latin capital ligature oe")},{character:"œ",title:e("Latin small ligature oe")},{character:"Ŕ",title:e("Latin capital letter r with acute")},{character:"ŕ",title:e("Latin small letter r with acute")},{character:"Ŗ",title:e("Latin capital letter r with cedilla")},{character:"ŗ",title:e("Latin small letter r with cedilla")},{character:"Ř",title:e("Latin capital letter r with caron")},{character:"ř",title:e("Latin small letter r with caron")},{character:"Ś",title:e("Latin capital letter s with acute")},{character:"ś",title:e("Latin small letter s with acute")},{character:"Ŝ",title:e("Latin capital letter s with circumflex")},{character:"ŝ",title:e("Latin small letter s with circumflex")},{character:"Ş",title:e("Latin capital letter s with cedilla")},{character:"ş",title:e("Latin small letter s with cedilla")},{character:"Š",title:e("Latin capital letter s with caron")},{character:"š",title:e("Latin small letter s with caron")},{character:"Ţ",title:e("Latin capital letter t with cedilla")},{character:"ţ",title:e("Latin small letter t with cedilla")},{character:"Ť",title:e("Latin capital letter t with caron")},{character:"ť",title:e("Latin small letter t with caron")},{character:"Ŧ",title:e("Latin capital letter t with stroke")},{character:"ŧ",title:e("Latin small letter t with stroke")},{character:"Ũ",title:e("Latin capital letter u with tilde")},{character:"ũ",title:e("Latin small letter u with tilde")},{character:"Ū",title:e("Latin capital letter u with macron")},{character:"ū",title:e("Latin small letter u with macron")},{character:"Ŭ",title:e("Latin capital letter u with breve")},{character:"ŭ",title:e("Latin small letter u with breve")},{character:"Ů",title:e("Latin capital letter u with ring above")},{character:"ů",title:e("Latin small letter u with ring above")},{character:"Ű",title:e("Latin capital letter u with double acute")},{character:"ű",title:e("Latin small letter u with double acute")},{character:"Ų",title:e("Latin capital letter u with ogonek")},{character:"ų",title:e("Latin small letter u with ogonek")},{character:"Ŵ",title:e("Latin capital letter w with circumflex")},{character:"ŵ",title:e("Latin small letter w with circumflex")},{character:"Ŷ",title:e("Latin capital letter y with circumflex")},{character:"ŷ",title:e("Latin small letter y with circumflex")},{character:"Ÿ",title:e("Latin capital letter y with diaeresis")},{character:"Ź",title:e("Latin capital letter z with acute")},{character:"ź",title:e("Latin small letter z with acute")},{character:"Ż",title:e("Latin capital letter z with dot above")},{character:"ż",title:e("Latin small letter z with dot above")},{character:"Ž",title:e("Latin capital letter z with caron")},{character:"ž",title:e("Latin small letter z with caron")},{character:"ſ",title:e("Latin small letter long s")}],{label:e("Latin")})}}class T extends t.Plugin{static get pluginName(){return"SpecialCharactersCurrency"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:e("Dollar sign")},{character:"€",title:e("Euro sign")},{character:"¥",title:e("Yen sign")},{character:"£",title:e("Pound sign")},{character:"¢",title:e("Cent sign")},{character:"₠",title:e("Euro-currency sign")},{character:"₡",title:e("Colon sign")},{character:"₢",title:e("Cruzeiro sign")},{character:"₣",title:e("French franc sign")},{character:"₤",title:e("Lira sign")},{character:"¤",title:e("Currency sign")},{character:"₿",title:e("Bitcoin sign")},{character:"₥",title:e("Mill sign")},{character:"₦",title:e("Naira sign")},{character:"₧",title:e("Peseta sign")},{character:"₨",title:e("Rupee sign")},{character:"₩",title:e("Won sign")},{character:"₪",title:e("New sheqel sign")},{character:"₫",title:e("Dong sign")},{character:"₭",title:e("Kip sign")},{character:"₮",title:e("Tugrik sign")},{character:"₯",title:e("Drachma sign")},{character:"₰",title:e("German penny sign")},{character:"₱",title:e("Peso sign")},{character:"₲",title:e("Guarani sign")},{character:"₳",title:e("Austral sign")},{character:"₴",title:e("Hryvnia sign")},{character:"₵",title:e("Cedi sign")},{character:"₶",title:e("Livre tournois sign")},{character:"₷",title:e("Spesmilo sign")},{character:"₸",title:e("Tenge sign")},{character:"₹",title:e("Indian rupee sign")},{character:"₺",title:e("Turkish lira sign")},{character:"₻",title:e("Nordic mark sign")},{character:"₼",title:e("Manat sign")},{character:"₽",title:e("Ruble sign")}],{label:e("Currency")})}}class q extends t.Plugin{static get requires(){return[T,x,y,v,C]}}})(),(window.CKEditor5=window.CKEditor5||{}).specialCharacters=i})();
*/(()=>{var t={395:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid .ck-character-grid__tiles{display:grid}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{max-height:200px;overflow-x:hidden;overflow-y:auto;width:350px}@media screen and (max-width:600px){.ck.ck-character-grid{width:190px}}.ck.ck-character-grid .ck-character-grid__tiles{grid-gap:var(--ck-spacing-standard);grid-template-columns:repeat(10,1fr);margin:var(--ck-spacing-standard) var(--ck-spacing-large)}@media screen and (max-width:600px){.ck.ck-character-grid .ck-character-grid__tiles{grid-template-columns:repeat(5,1fr)}}.ck.ck-character-grid .ck-character-grid__tile{border:0;font-size:1.2em;height:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-character-grid-tile-size)}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);text-align:center;width:100%}",""]);const l=r},198:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-info{border-top:1px solid var(--ck-color-base-border);display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-character-info>*{font-size:var(--ck-font-size-small);text-transform:uppercase}.ck.ck-character-info .ck-character-info__name{max-width:280px;overflow:hidden;text-overflow:ellipsis}.ck.ck-character-info .ck-character-info__code{opacity:.6}@media screen and (max-width:600px){.ck.ck-character-info{max-width:190px}}",""]);const l=r},454:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-special-characters-navigation>.ck-label{max-width:160px;overflow:hidden;text-overflow:ellipsis}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}@media screen and (max-width:600px){.ck.ck-special-characters-navigation{max-width:190px}.ck.ck-special-characters-navigation>.ck-form__header__label{overflow:hidden;text-overflow:ellipsis}}",""]);const l=r},609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var a=t(e);return e[2]?"@media ".concat(e[2]," {").concat(a,"}"):a})).join("")},e.i=function(t,a,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var l=0;l<this.length;l++){var c=this[l][0];null!=c&&(r[c]=!0)}for(var n=0;n<t.length;n++){var o=[].concat(t[n]);i&&r[o[0]]||(a&&(o[2]?o[2]="".concat(a," and ").concat(o[2]):o[2]=a),e.push(o))}},e}},62:(t,e,a)=>{"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},l=function(){var t={};return function(e){if(void 0===t[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}t[e]=a}return t[e]}}(),c=[];function n(t){for(var e=-1,a=0;a<c.length;a++)if(c[a].identifier===t){e=a;break}return e}function o(t,e){for(var a={},i=[],r=0;r<t.length;r++){var l=t[r],o=e.base?l[0]+e.base:l[0],s=a[o]||0,h="".concat(o," ").concat(s);a[o]=s+1;var w=n(h),d={css:l[1],media:l[2],sourceMap:l[3]};-1!==w?(c[w].references++,c[w].updater(d)):c.push({identifier:h,updater:p(d,e),references:1}),i.push(h)}return i}function s(t){var e=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var r=a.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach((function(t){e.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(e);else{var c=l(t.insert||"head");if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(e)}return e}var h,w=(h=[],function(t,e){return h[t]=e,h.filter(Boolean).join("\n")});function d(t,e,a,i){var r=a?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=w(e,r);else{var l=document.createTextNode(r),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(l,c[e]):t.appendChild(l)}}function u(t,e,a){var i=a.css,r=a.media,l=a.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),l&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(l))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var g=null,m=0;function p(t,e){var a,i,r;if(e.singleton){var l=m++;a=g||(g=s(e)),i=d.bind(null,a,l,!1),r=d.bind(null,a,l,!0)}else a=s(e),i=u.bind(null,a,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(a)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var a=o(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<a.length;i++){var r=n(a[i]);c[r].references--}for(var l=o(t,e),s=0;s<a.length;s++){var h=n(a[s]);0===c[h].references&&(c[h].updater(),c.splice(h,1))}a=l}}}},704:(t,e,a)=>{t.exports=a(79)("./src/core.js")},181:(t,e,a)=>{t.exports=a(79)("./src/typing.js")},273:(t,e,a)=>{t.exports=a(79)("./src/ui.js")},209:(t,e,a)=>{t.exports=a(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function a(i){var r=e[i];if(void 0!==r)return r.exports;var l=e[i]={id:i,exports:{}};return t[i](l,l.exports,a),l.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nc=void 0;var i={};(()=>{"use strict";a.r(i),a.d(i,{SpecialCharacters:()=>k,SpecialCharactersArrows:()=>v,SpecialCharactersCurrency:()=>T,SpecialCharactersEssentials:()=>q,SpecialCharactersLatin:()=>C,SpecialCharactersMathematical:()=>y,SpecialCharactersText:()=>x});var t=a(704),e=a(181),r=a(273),l=a(209);class c extends r.FormHeaderView{constructor(t,e){super(t);const a=t.t;this.set("class","ck-special-characters-navigation"),this.groupDropdownView=this._createGroupDropdown(e),this.groupDropdownView.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",this.label=a("Special characters"),this.children.add(this.groupDropdownView)}get currentGroupName(){return this.groupDropdownView.value}focus(){this.groupDropdownView.focus()}_createGroupDropdown(t){const e=this.locale,a=e.t,i=(0,r.createDropdown)(e),l=this._getCharacterGroupListItemDefinitions(i,t);return i.set("value",l.first.model.name),i.buttonView.bind("label").to(i,"value",(e=>t.get(e))),i.buttonView.set({isOn:!1,withText:!0,tooltip:a("Character categories"),class:["ck-dropdown__button_label-width_auto"]}),i.on("execute",(t=>{i.value=t.source.name})),i.delegate("execute").to(this),(0,r.addListToDropdown)(i,l),i}_getCharacterGroupListItemDefinitions(t,e){const a=new l.Collection;for(const[i,l]of e){const e=new r.Model({name:i,label:l,withText:!0});e.bind("isOn").to(t,"value",(t=>t===e.name)),a.add({type:"button",model:e})}return a}}var n=a(62),o=a.n(n),s=a(395),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(s.Z,h);s.Z.locals;class w extends r.View{constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,(0,r.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>l.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}createTile(t,e){const a=new r.ButtonView(this.locale);return a.set({label:t,withText:!0,class:"ck-character-grid__tile"}),a.extendTemplate({attributes:{title:e},on:{mouseover:a.bindTemplate.to("mouseover"),focus:a.bindTemplate.to("focus")}}),a.on("mouseover",(()=>{this.fire("tileHover",{name:e,character:t})})),a.on("focus",(()=>{this.fire("tileFocus",{name:e,character:t})})),a.on("execute",(()=>{this.fire("execute",{name:e,character:t})})),a}render(){super.render();for(const t of this.tiles)this.focusTracker.add(t.element);this.tiles.on("change",((t,{added:e,removed:a})=>{if(e.length>0)for(const t of e)this.focusTracker.add(t.element);if(a.length>0)for(const t of a)this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.first.focus()}}var d=a(198),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(d.Z,u);d.Z.locals;class g extends r.View{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",m),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",(t=>t||"​"))}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function m(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}class p extends r.View{constructor(t,e,a,i){super(t),this.navigationView=e,this.gridView=a,this.infoView=i,this.items=this.createCollection(),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,this._focusCycler=new r.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[this.navigationView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.navigationView.groupDropdownView.buttonView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.navigationView.groupDropdownView.buttonView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.navigationView.focus()}}var L=a(454),f={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(L.Z,f);L.Z.locals;const b="All";class k extends t.Plugin{static get requires(){return[e.Typing]}static get pluginName(){return"SpecialCharacters"}constructor(t){super(t);const e=t.t;this._characters=new Map,this._groups=new Map,this._allSpecialCharactersGroupLabel=e("All")}init(){const t=this.editor,e=t.t,a=t.commands.get("insertText");t.ui.componentFactory.add("specialCharacters",(i=>{const l=(0,r.createDropdown)(i);let c;return l.buttonView.set({label:e("Special characters"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2.5a7.47 7.47 0 0 1 4.231 1.31 7.268 7.268 0 0 1 2.703 3.454 7.128 7.128 0 0 1 .199 4.353c-.39 1.436-1.475 2.72-2.633 3.677h2.013c0-.226.092-.443.254-.603a.876.876 0 0 1 1.229 0c.163.16.254.377.254.603v.853c0 .209-.078.41-.22.567a.873.873 0 0 1-.547.28l-.101.006h-4.695a.517.517 0 0 1-.516-.518v-1.265c0-.21.128-.398.317-.489a5.601 5.601 0 0 0 2.492-2.371 5.459 5.459 0 0 0 .552-3.693 5.53 5.53 0 0 0-1.955-3.2A5.71 5.71 0 0 0 10 4.206 5.708 5.708 0 0 0 6.419 5.46 5.527 5.527 0 0 0 4.46 8.663a5.457 5.457 0 0 0 .554 3.695 5.6 5.6 0 0 0 2.497 2.37.55.55 0 0 1 .317.49v1.264c0 .286-.23.518-.516.518H2.618a.877.877 0 0 1-.614-.25.845.845 0 0 1-.254-.603v-.853c0-.226.091-.443.254-.603a.876.876 0 0 1 1.228 0c.163.16.255.377.255.603h1.925c-1.158-.958-2.155-2.241-2.545-3.678a7.128 7.128 0 0 1 .199-4.352 7.268 7.268 0 0 1 2.703-3.455A7.475 7.475 0 0 1 10 2.5z"/></svg>',tooltip:!0}),l.bind("isEnabled").to(a),l.on("execute",((e,a)=>{t.execute("insertText",{text:a.character}),t.editing.view.focus()})),l.on("change:isOpen",(()=>{if(!c){c=this._createDropdownPanelContent(i,l);const t=new p(i,c.navigationView,c.gridView,c.infoView);l.panelView.children.add(t)}c.infoView.set({character:null,name:null})})),l}))}addItems(t,e,a={label:t}){if(t===b)throw new l.CKEditorError("special-character-invalid-group-name",null);const i=this._getGroup(t,a.label);for(const t of e)i.items.add(t.title),this._characters.set(t.title,t.character)}getGroups(){const t=Array.from(this._groups.keys()),e=this.editor.config.get("specialCharacters.order")||[],a=e.find((e=>!t.includes(e)));if(a)throw new l.CKEditorError("special-character-invalid-order-group-name",null,{invalidGroup:a});return new Set([...e,...t])}getCharactersForGroup(t){if(t===b)return new Set(this._characters.keys());const e=this._groups.get(t);return e?e.items:void 0}getCharacter(t){return this._characters.get(t)}_getGroup(t,e){return this._groups.has(t)||this._groups.set(t,{items:new Set,label:e}),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const a=this.getCharactersForGroup(t);for(const t of a){const a=this.getCharacter(t);e.tiles.add(e.createTile(a,t))}}_createDropdownPanelContent(t,e){const a=Array.from(this.getGroups()).map((t=>[t,this._groups.get(t).label])),i=new Map([[b,this._allSpecialCharactersGroupLabel],...a]),r=new c(t,i),l=new w(t),n=new g(t);return l.delegate("execute").to(e),l.on("tileHover",((t,e)=>{n.set(e)})),l.on("tileFocus",((t,e)=>{n.set(e)})),r.on("execute",(()=>{this._updateGrid(r.currentGroupName,l)})),this._updateGrid(r.currentGroupName,l),{navigationView:r,gridView:l,infoView:n}}}class v extends t.Plugin{static get pluginName(){return"SpecialCharactersArrows"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Arrows",[{title:e("leftwards simple arrow"),character:"←"},{title:e("rightwards simple arrow"),character:"→"},{title:e("upwards simple arrow"),character:"↑"},{title:e("downwards simple arrow"),character:"↓"},{title:e("leftwards double arrow"),character:"⇐"},{title:e("rightwards double arrow"),character:"⇒"},{title:e("upwards double arrow"),character:"⇑"},{title:e("downwards double arrow"),character:"⇓"},{title:e("leftwards dashed arrow"),character:"⇠"},{title:e("rightwards dashed arrow"),character:"⇢"},{title:e("upwards dashed arrow"),character:"⇡"},{title:e("downwards dashed arrow"),character:"⇣"},{title:e("leftwards arrow to bar"),character:"⇤"},{title:e("rightwards arrow to bar"),character:"⇥"},{title:e("upwards arrow to bar"),character:"⤒"},{title:e("downwards arrow to bar"),character:"⤓"},{title:e("up down arrow with base"),character:"↨"},{title:e("back with leftwards arrow above"),character:"🔙"},{title:e("end with leftwards arrow above"),character:"🔚"},{title:e("on with exclamation mark with left right arrow above"),character:"🔛"},{title:e("soon with rightwards arrow above"),character:"🔜"},{title:e("top with upwards arrow above"),character:"🔝"}],{label:e("Arrows")})}}class x extends t.Plugin{static get pluginName(){return"SpecialCharactersText"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:e("Single left-pointing angle quotation mark")},{character:"›",title:e("Single right-pointing angle quotation mark")},{character:"«",title:e("Left-pointing double angle quotation mark")},{character:"»",title:e("Right-pointing double angle quotation mark")},{character:"‘",title:e("Left single quotation mark")},{character:"’",title:e("Right single quotation mark")},{character:"“",title:e("Left double quotation mark")},{character:"”",title:e("Right double quotation mark")},{character:"‚",title:e("Single low-9 quotation mark")},{character:"„",title:e("Double low-9 quotation mark")},{character:"¡",title:e("Inverted exclamation mark")},{character:"¿",title:e("Inverted question mark")},{character:"‥",title:e("Two dot leader")},{character:"…",title:e("Horizontal ellipsis")},{character:"‡",title:e("Double dagger")},{character:"‰",title:e("Per mille sign")},{character:"‱",title:e("Per ten thousand sign")},{character:"‼",title:e("Double exclamation mark")},{character:"⁈",title:e("Question exclamation mark")},{character:"⁉",title:e("Exclamation question mark")},{character:"⁇",title:e("Double question mark")},{character:"©",title:e("Copyright sign")},{character:"®",title:e("Registered sign")},{character:"™",title:e("Trade mark sign")},{character:"§",title:e("Section sign")},{character:"¶",title:e("Paragraph sign")},{character:"⁋",title:e("Reversed paragraph sign")}],{label:e("Text")})}}class y extends t.Plugin{static get pluginName(){return"SpecialCharactersMathematical"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:e("Less-than sign")},{character:">",title:e("Greater-than sign")},{character:"≤",title:e("Less-than or equal to")},{character:"≥",title:e("Greater-than or equal to")},{character:"–",title:e("En dash")},{character:"—",title:e("Em dash")},{character:"¯",title:e("Macron")},{character:"‾",title:e("Overline")},{character:"°",title:e("Degree sign")},{character:"−",title:e("Minus sign")},{character:"±",title:e("Plus-minus sign")},{character:"÷",title:e("Division sign")},{character:"⁄",title:e("Fraction slash")},{character:"×",title:e("Multiplication sign")},{character:"ƒ",title:e("Latin small letter f with hook")},{character:"∫",title:e("Integral")},{character:"∑",title:e("N-ary summation")},{character:"∞",title:e("Infinity")},{character:"√",title:e("Square root")},{character:"∼",title:e("Tilde operator")},{character:"≅",title:e("Approximately equal to")},{character:"≈",title:e("Almost equal to")},{character:"≠",title:e("Not equal to")},{character:"≡",title:e("Identical to")},{character:"∈",title:e("Element of")},{character:"∉",title:e("Not an element of")},{character:"∋",title:e("Contains as member")},{character:"∏",title:e("N-ary product")},{character:"∧",title:e("Logical and")},{character:"∨",title:e("Logical or")},{character:"¬",title:e("Not sign")},{character:"∩",title:e("Intersection")},{character:"∪",title:e("Union")},{character:"∂",title:e("Partial differential")},{character:"∀",title:e("For all")},{character:"∃",title:e("There exists")},{character:"∅",title:e("Empty set")},{character:"∇",title:e("Nabla")},{character:"∗",title:e("Asterisk operator")},{character:"∝",title:e("Proportional to")},{character:"∠",title:e("Angle")},{character:"¼",title:e("Vulgar fraction one quarter")},{character:"½",title:e("Vulgar fraction one half")},{character:"¾",title:e("Vulgar fraction three quarters")}],{label:e("Mathematical")})}}class C extends t.Plugin{static get pluginName(){return"SpecialCharactersLatin"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:e("Latin capital letter a with macron")},{character:"ā",title:e("Latin small letter a with macron")},{character:"Ă",title:e("Latin capital letter a with breve")},{character:"ă",title:e("Latin small letter a with breve")},{character:"Ą",title:e("Latin capital letter a with ogonek")},{character:"ą",title:e("Latin small letter a with ogonek")},{character:"Ć",title:e("Latin capital letter c with acute")},{character:"ć",title:e("Latin small letter c with acute")},{character:"Ĉ",title:e("Latin capital letter c with circumflex")},{character:"ĉ",title:e("Latin small letter c with circumflex")},{character:"Ċ",title:e("Latin capital letter c with dot above")},{character:"ċ",title:e("Latin small letter c with dot above")},{character:"Č",title:e("Latin capital letter c with caron")},{character:"č",title:e("Latin small letter c with caron")},{character:"Ď",title:e("Latin capital letter d with caron")},{character:"ď",title:e("Latin small letter d with caron")},{character:"Đ",title:e("Latin capital letter d with stroke")},{character:"đ",title:e("Latin small letter d with stroke")},{character:"Ē",title:e("Latin capital letter e with macron")},{character:"ē",title:e("Latin small letter e with macron")},{character:"Ĕ",title:e("Latin capital letter e with breve")},{character:"ĕ",title:e("Latin small letter e with breve")},{character:"Ė",title:e("Latin capital letter e with dot above")},{character:"ė",title:e("Latin small letter e with dot above")},{character:"Ę",title:e("Latin capital letter e with ogonek")},{character:"ę",title:e("Latin small letter e with ogonek")},{character:"Ě",title:e("Latin capital letter e with caron")},{character:"ě",title:e("Latin small letter e with caron")},{character:"Ĝ",title:e("Latin capital letter g with circumflex")},{character:"ĝ",title:e("Latin small letter g with circumflex")},{character:"Ğ",title:e("Latin capital letter g with breve")},{character:"ğ",title:e("Latin small letter g with breve")},{character:"Ġ",title:e("Latin capital letter g with dot above")},{character:"ġ",title:e("Latin small letter g with dot above")},{character:"Ģ",title:e("Latin capital letter g with cedilla")},{character:"ģ",title:e("Latin small letter g with cedilla")},{character:"Ĥ",title:e("Latin capital letter h with circumflex")},{character:"ĥ",title:e("Latin small letter h with circumflex")},{character:"Ħ",title:e("Latin capital letter h with stroke")},{character:"ħ",title:e("Latin small letter h with stroke")},{character:"Ĩ",title:e("Latin capital letter i with tilde")},{character:"ĩ",title:e("Latin small letter i with tilde")},{character:"Ī",title:e("Latin capital letter i with macron")},{character:"ī",title:e("Latin small letter i with macron")},{character:"Ĭ",title:e("Latin capital letter i with breve")},{character:"ĭ",title:e("Latin small letter i with breve")},{character:"Į",title:e("Latin capital letter i with ogonek")},{character:"į",title:e("Latin small letter i with ogonek")},{character:"İ",title:e("Latin capital letter i with dot above")},{character:"ı",title:e("Latin small letter dotless i")},{character:"IJ",title:e("Latin capital ligature ij")},{character:"ij",title:e("Latin small ligature ij")},{character:"Ĵ",title:e("Latin capital letter j with circumflex")},{character:"ĵ",title:e("Latin small letter j with circumflex")},{character:"Ķ",title:e("Latin capital letter k with cedilla")},{character:"ķ",title:e("Latin small letter k with cedilla")},{character:"ĸ",title:e("Latin small letter kra")},{character:"Ĺ",title:e("Latin capital letter l with acute")},{character:"ĺ",title:e("Latin small letter l with acute")},{character:"Ļ",title:e("Latin capital letter l with cedilla")},{character:"ļ",title:e("Latin small letter l with cedilla")},{character:"Ľ",title:e("Latin capital letter l with caron")},{character:"ľ",title:e("Latin small letter l with caron")},{character:"Ŀ",title:e("Latin capital letter l with middle dot")},{character:"ŀ",title:e("Latin small letter l with middle dot")},{character:"Ł",title:e("Latin capital letter l with stroke")},{character:"ł",title:e("Latin small letter l with stroke")},{character:"Ń",title:e("Latin capital letter n with acute")},{character:"ń",title:e("Latin small letter n with acute")},{character:"Ņ",title:e("Latin capital letter n with cedilla")},{character:"ņ",title:e("Latin small letter n with cedilla")},{character:"Ň",title:e("Latin capital letter n with caron")},{character:"ň",title:e("Latin small letter n with caron")},{character:"ʼn",title:e("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:e("Latin capital letter eng")},{character:"ŋ",title:e("Latin small letter eng")},{character:"Ō",title:e("Latin capital letter o with macron")},{character:"ō",title:e("Latin small letter o with macron")},{character:"Ŏ",title:e("Latin capital letter o with breve")},{character:"ŏ",title:e("Latin small letter o with breve")},{character:"Ő",title:e("Latin capital letter o with double acute")},{character:"ő",title:e("Latin small letter o with double acute")},{character:"Œ",title:e("Latin capital ligature oe")},{character:"œ",title:e("Latin small ligature oe")},{character:"Ŕ",title:e("Latin capital letter r with acute")},{character:"ŕ",title:e("Latin small letter r with acute")},{character:"Ŗ",title:e("Latin capital letter r with cedilla")},{character:"ŗ",title:e("Latin small letter r with cedilla")},{character:"Ř",title:e("Latin capital letter r with caron")},{character:"ř",title:e("Latin small letter r with caron")},{character:"Ś",title:e("Latin capital letter s with acute")},{character:"ś",title:e("Latin small letter s with acute")},{character:"Ŝ",title:e("Latin capital letter s with circumflex")},{character:"ŝ",title:e("Latin small letter s with circumflex")},{character:"Ş",title:e("Latin capital letter s with cedilla")},{character:"ş",title:e("Latin small letter s with cedilla")},{character:"Š",title:e("Latin capital letter s with caron")},{character:"š",title:e("Latin small letter s with caron")},{character:"Ţ",title:e("Latin capital letter t with cedilla")},{character:"ţ",title:e("Latin small letter t with cedilla")},{character:"Ť",title:e("Latin capital letter t with caron")},{character:"ť",title:e("Latin small letter t with caron")},{character:"Ŧ",title:e("Latin capital letter t with stroke")},{character:"ŧ",title:e("Latin small letter t with stroke")},{character:"Ũ",title:e("Latin capital letter u with tilde")},{character:"ũ",title:e("Latin small letter u with tilde")},{character:"Ū",title:e("Latin capital letter u with macron")},{character:"ū",title:e("Latin small letter u with macron")},{character:"Ŭ",title:e("Latin capital letter u with breve")},{character:"ŭ",title:e("Latin small letter u with breve")},{character:"Ů",title:e("Latin capital letter u with ring above")},{character:"ů",title:e("Latin small letter u with ring above")},{character:"Ű",title:e("Latin capital letter u with double acute")},{character:"ű",title:e("Latin small letter u with double acute")},{character:"Ų",title:e("Latin capital letter u with ogonek")},{character:"ų",title:e("Latin small letter u with ogonek")},{character:"Ŵ",title:e("Latin capital letter w with circumflex")},{character:"ŵ",title:e("Latin small letter w with circumflex")},{character:"Ŷ",title:e("Latin capital letter y with circumflex")},{character:"ŷ",title:e("Latin small letter y with circumflex")},{character:"Ÿ",title:e("Latin capital letter y with diaeresis")},{character:"Ź",title:e("Latin capital letter z with acute")},{character:"ź",title:e("Latin small letter z with acute")},{character:"Ż",title:e("Latin capital letter z with dot above")},{character:"ż",title:e("Latin small letter z with dot above")},{character:"Ž",title:e("Latin capital letter z with caron")},{character:"ž",title:e("Latin small letter z with caron")},{character:"ſ",title:e("Latin small letter long s")}],{label:e("Latin")})}}class T extends t.Plugin{static get pluginName(){return"SpecialCharactersCurrency"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:e("Dollar sign")},{character:"€",title:e("Euro sign")},{character:"¥",title:e("Yen sign")},{character:"£",title:e("Pound sign")},{character:"¢",title:e("Cent sign")},{character:"₠",title:e("Euro-currency sign")},{character:"₡",title:e("Colon sign")},{character:"₢",title:e("Cruzeiro sign")},{character:"₣",title:e("French franc sign")},{character:"₤",title:e("Lira sign")},{character:"¤",title:e("Currency sign")},{character:"₿",title:e("Bitcoin sign")},{character:"₥",title:e("Mill sign")},{character:"₦",title:e("Naira sign")},{character:"₧",title:e("Peseta sign")},{character:"₨",title:e("Rupee sign")},{character:"₩",title:e("Won sign")},{character:"₪",title:e("New sheqel sign")},{character:"₫",title:e("Dong sign")},{character:"₭",title:e("Kip sign")},{character:"₮",title:e("Tugrik sign")},{character:"₯",title:e("Drachma sign")},{character:"₰",title:e("German penny sign")},{character:"₱",title:e("Peso sign")},{character:"₲",title:e("Guarani sign")},{character:"₳",title:e("Austral sign")},{character:"₴",title:e("Hryvnia sign")},{character:"₵",title:e("Cedi sign")},{character:"₶",title:e("Livre tournois sign")},{character:"₷",title:e("Spesmilo sign")},{character:"₸",title:e("Tenge sign")},{character:"₹",title:e("Indian rupee sign")},{character:"₺",title:e("Turkish lira sign")},{character:"₻",title:e("Nordic mark sign")},{character:"₼",title:e("Manat sign")},{character:"₽",title:e("Ruble sign")}],{label:e("Currency")})}}class q extends t.Plugin{static get pluginName(){return"SpecialCharactersEssentials"}static get requires(){return[T,x,y,v,C]}}})(),(window.CKEditor5=window.CKEditor5||{}).specialCharacters=i})();
{
"name": "@ckeditor/ckeditor5-special-characters",
"version": "36.0.1",
"version": "37.0.0-alpha.0",
"description": "Special characters feature for CKEditor 5.",

@@ -15,15 +15,16 @@ "keywords": [

"dependencies": {
"ckeditor5": "^36.0.1"
"ckeditor5": "^37.0.0-alpha.0"
},
"devDependencies": {
"@ckeditor/ckeditor5-cloud-services": "^36.0.1",
"@ckeditor/ckeditor5-core": "^36.0.1",
"@ckeditor/ckeditor5-dev-utils": "^32.0.0",
"@ckeditor/ckeditor5-easy-image": "^36.0.1",
"@ckeditor/ckeditor5-editor-classic": "^36.0.1",
"@ckeditor/ckeditor5-image": "^36.0.1",
"@ckeditor/ckeditor5-theme-lark": "^36.0.1",
"@ckeditor/ckeditor5-typing": "^36.0.1",
"@ckeditor/ckeditor5-ui": "^36.0.1",
"@ckeditor/ckeditor5-utils": "^36.0.1",
"@ckeditor/ckeditor5-cloud-services": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-core": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-dev-utils": "^34.0.0",
"@ckeditor/ckeditor5-easy-image": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-editor-classic": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-image": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-theme-lark": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-typing": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-ui": "^37.0.0-alpha.0",
"@ckeditor/ckeditor5-utils": "^37.0.0-alpha.0",
"typescript": "^4.8.4",
"webpack": "^5.58.1",

@@ -47,3 +48,4 @@ "webpack-cli": "^4.9.0"

"lang",
"src",
"src/**/*.js",
"src/**/*.d.ts",
"theme",

@@ -55,4 +57,7 @@ "build",

"scripts": {
"dll:build": "webpack"
}
"dll:build": "webpack",
"build": "tsc -p ./tsconfig.release.json",
"postversion": "npm run build"
},
"types": "src/index.d.ts"
}

@@ -5,7 +5,5 @@ /**

*/
/**
* @module special-characters
*/
export { default as SpecialCharacters } from './specialcharacters';

@@ -12,0 +10,0 @@ export { default as SpecialCharactersArrows } from './specialcharactersarrows';

@@ -5,7 +5,5 @@ /**

*/
/**
* @module special-characters/specialcharacters
*/
import { Plugin } from 'ckeditor5/src/core';

@@ -19,8 +17,6 @@ import { Typing } from 'ckeditor5/src/typing';

import SpecialCharactersView from './ui/specialcharactersview';
import specialCharactersIcon from '../theme/icons/specialcharacters.svg';
import './specialcharactersconfig';
import '../theme/specialcharacters.css';
const ALL_SPECIAL_CHARACTERS_GROUP = 'All';
/**

@@ -30,329 +26,185 @@ * The special characters feature.

* Introduces the `'specialCharacters'` dropdown.
*
* @extends module:core/plugin~Plugin
*/
export default class SpecialCharacters extends Plugin {
/**
* @inheritDoc
*/
static get requires() {
return [ Typing ];
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharacters';
}
/**
* @inheritDoc
*/
constructor( editor ) {
super( editor );
const t = editor.t;
/**
* Registered characters. A pair of a character name and its symbol.
*
* @private
* @member {Map.<String, String>} #_characters
*/
this._characters = new Map();
/**
* Registered groups. Each group contains a displayed label and a collection with symbol names.
*
* @private
* @member {Map.<String, {items: Set.<String>, label: String}>} #_groups
*/
this._groups = new Map();
/**
* A label describing the "All" special characters category.
*
* @private
* @member {String} #_allSpecialCharactersGroupLabel
*/
this._allSpecialCharactersGroupLabel = t( 'All' );
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const inputCommand = editor.commands.get( 'input' );
// Add the `specialCharacters` dropdown button to feature components.
editor.ui.componentFactory.add( 'specialCharacters', locale => {
const dropdownView = createDropdown( locale );
let dropdownPanelContent;
dropdownView.buttonView.set( {
label: t( 'Special characters' ),
icon: specialCharactersIcon,
tooltip: true
} );
dropdownView.bind( 'isEnabled' ).to( inputCommand );
// Insert a special character when a tile was clicked.
dropdownView.on( 'execute', ( evt, data ) => {
editor.execute( 'insertText', { text: data.character } );
editor.editing.view.focus();
} );
dropdownView.on( 'change:isOpen', () => {
if ( !dropdownPanelContent ) {
dropdownPanelContent = this._createDropdownPanelContent( locale, dropdownView );
const specialCharactersView = new SpecialCharactersView(
locale,
dropdownPanelContent.navigationView,
dropdownPanelContent.gridView,
dropdownPanelContent.infoView
);
dropdownView.panelView.children.add( specialCharactersView );
}
dropdownPanelContent.infoView.set( {
character: null,
name: null
} );
} );
return dropdownView;
} );
}
/**
* Adds a collection of special characters to the specified group. The title of a special character must be unique.
*
* **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
* characters category.
*
* @param {String} groupName
* @param {Array.<module:special-characters/specialcharacters~SpecialCharacterDefinition>} items
* @param {Object} options
* @param {String} [options.label=groupName]
*/
addItems( groupName, items, options = { label: groupName } ) {
if ( groupName === ALL_SPECIAL_CHARACTERS_GROUP ) {
/**
* The name "All" for a special category group cannot be used because it is a special category that displays all
* available special characters.
*
* @error special-character-invalid-group-name
*/
throw new CKEditorError( 'special-character-invalid-group-name', null );
}
const group = this._getGroup( groupName, options.label );
for ( const item of items ) {
group.items.add( item.title );
this._characters.set( item.title, item.character );
}
}
/**
* Returns special character groups in an order determined based on configuration and registration sequence.
*
* @returns {Iterable.<String>}
*/
getGroups() {
const groups = Array.from( this._groups.keys() );
const order = this.editor.config.get( 'specialCharacters.order' ) || [];
const invalidGroup = order.find( item => !groups.includes( item ) );
if ( invalidGroup ) {
/**
* One of the special character groups in the "specialCharacters.order" configuration doesn't exist.
*
* @error special-character-invalid-order-group-name
*/
throw new CKEditorError( 'special-character-invalid-order-group-name', null, { invalidGroup } );
}
return new Set( [
...order,
...groups
] );
}
/**
* Returns a collection of special characters symbol names (titles).
*
* @param {String} groupName
* @returns {Set.<String>|undefined}
*/
getCharactersForGroup( groupName ) {
if ( groupName === ALL_SPECIAL_CHARACTERS_GROUP ) {
return new Set( this._characters.keys() );
}
const group = this._groups.get( groupName );
if ( group ) {
return group.items;
}
}
/**
* Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
* is returned.
*
* @param {String} title The title of a special character.
* @returns {String|undefined}
*/
getCharacter( title ) {
return this._characters.get( title );
}
/**
* Returns a group of special characters. If the group with the specified name does not exist, it will be created.
*
* @private
* @param {String} groupName The name of the group to create.
* @param {String} label The label describing the new group.
*/
_getGroup( groupName, label ) {
if ( !this._groups.has( groupName ) ) {
this._groups.set( groupName, {
items: new Set(),
label
} );
}
return this._groups.get( groupName );
}
/**
* Updates the symbol grid depending on the currently selected character group.
*
* @private
* @param {String} currentGroupName
* @param {module:special-characters/ui/charactergridview~CharacterGridView} gridView
*/
_updateGrid( currentGroupName, gridView ) {
// Updating the grid starts with removing all tiles belonging to the old group.
gridView.tiles.clear();
const characterTitles = this.getCharactersForGroup( currentGroupName );
for ( const title of characterTitles ) {
const character = this.getCharacter( title );
gridView.tiles.add( gridView.createTile( character, title ) );
}
}
/**
* Initializes the dropdown, used for lazy loading.
*
* @private
* @param {module:utils/locale~Locale} locale
* @param {module:ui/dropdown/dropdownview~DropdownView} dropdownView
* @returns {Object} Returns an object with `navigationView`, `gridView` and `infoView` properties, containing UI parts.
*/
_createDropdownPanelContent( locale, dropdownView ) {
// The map contains a name of category (an identifier) and its label (a translational string).
const specialCharsGroups = new Map( [
// Add a special group that shows all available special characters.
[ ALL_SPECIAL_CHARACTERS_GROUP, this._allSpecialCharactersGroupLabel ],
...Array.from( this.getGroups() )
.map( name => ( [ name, this._groups.get( name ).label ] ) )
] );
const navigationView = new SpecialCharactersNavigationView( locale, specialCharsGroups );
const gridView = new CharacterGridView( locale );
const infoView = new CharacterInfoView( locale );
gridView.delegate( 'execute' ).to( dropdownView );
gridView.on( 'tileHover', ( evt, data ) => {
infoView.set( data );
} );
gridView.on( 'tileFocus', ( evt, data ) => {
infoView.set( data );
} );
// Update the grid of special characters when a user changed the character group.
navigationView.on( 'execute', () => {
this._updateGrid( navigationView.currentGroupName, gridView );
} );
// Set the initial content of the special characters grid.
this._updateGrid( navigationView.currentGroupName, gridView );
return { navigationView, gridView, infoView };
}
/**
* @inheritDoc
*/
static get requires() {
return [Typing];
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharacters';
}
/**
* @inheritDoc
*/
constructor(editor) {
super(editor);
const t = editor.t;
this._characters = new Map();
this._groups = new Map();
this._allSpecialCharactersGroupLabel = t('All');
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const inputCommand = editor.commands.get('insertText');
// Add the `specialCharacters` dropdown button to feature components.
editor.ui.componentFactory.add('specialCharacters', locale => {
const dropdownView = createDropdown(locale);
let dropdownPanelContent;
dropdownView.buttonView.set({
label: t('Special characters'),
icon: specialCharactersIcon,
tooltip: true
});
dropdownView.bind('isEnabled').to(inputCommand);
// Insert a special character when a tile was clicked.
dropdownView.on('execute', (evt, data) => {
editor.execute('insertText', { text: data.character });
editor.editing.view.focus();
});
dropdownView.on('change:isOpen', () => {
if (!dropdownPanelContent) {
dropdownPanelContent = this._createDropdownPanelContent(locale, dropdownView);
const specialCharactersView = new SpecialCharactersView(locale, dropdownPanelContent.navigationView, dropdownPanelContent.gridView, dropdownPanelContent.infoView);
dropdownView.panelView.children.add(specialCharactersView);
}
dropdownPanelContent.infoView.set({
character: null,
name: null
});
});
return dropdownView;
});
}
/**
* Adds a collection of special characters to the specified group. The title of a special character must be unique.
*
* **Note:** The "All" category name is reserved by the plugin and cannot be used as a new name for a special
* characters category.
*/
addItems(groupName, items, options = { label: groupName }) {
if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
/**
* The name "All" for a special category group cannot be used because it is a special category that displays all
* available special characters.
*
* @error special-character-invalid-group-name
*/
throw new CKEditorError('special-character-invalid-group-name', null);
}
const group = this._getGroup(groupName, options.label);
for (const item of items) {
group.items.add(item.title);
this._characters.set(item.title, item.character);
}
}
/**
* Returns special character groups in an order determined based on configuration and registration sequence.
*/
getGroups() {
const groups = Array.from(this._groups.keys());
const order = this.editor.config.get('specialCharacters.order') || [];
const invalidGroup = order.find(item => !groups.includes(item));
if (invalidGroup) {
/**
* One of the special character groups in the "specialCharacters.order" configuration doesn't exist.
*
* @error special-character-invalid-order-group-name
*/
throw new CKEditorError('special-character-invalid-order-group-name', null, { invalidGroup });
}
return new Set([
...order,
...groups
]);
}
/**
* Returns a collection of special characters symbol names (titles).
*/
getCharactersForGroup(groupName) {
if (groupName === ALL_SPECIAL_CHARACTERS_GROUP) {
return new Set(this._characters.keys());
}
const group = this._groups.get(groupName);
if (group) {
return group.items;
}
}
/**
* Returns the symbol of a special character for the specified name. If the special character could not be found, `undefined`
* is returned.
*
* @param title The title of a special character.
*/
getCharacter(title) {
return this._characters.get(title);
}
/**
* Returns a group of special characters. If the group with the specified name does not exist, it will be created.
*
* @param groupName The name of the group to create.
* @param label The label describing the new group.
*/
_getGroup(groupName, label) {
if (!this._groups.has(groupName)) {
this._groups.set(groupName, {
items: new Set(),
label
});
}
return this._groups.get(groupName);
}
/**
* Updates the symbol grid depending on the currently selected character group.
*/
_updateGrid(currentGroupName, gridView) {
// Updating the grid starts with removing all tiles belonging to the old group.
gridView.tiles.clear();
const characterTitles = this.getCharactersForGroup(currentGroupName);
for (const title of characterTitles) {
const character = this.getCharacter(title);
gridView.tiles.add(gridView.createTile(character, title));
}
}
/**
* Initializes the dropdown, used for lazy loading.
*
* @returns An object with `navigationView`, `gridView` and `infoView` properties, containing UI parts.
*/
_createDropdownPanelContent(locale, dropdownView) {
const groupEntries = Array
.from(this.getGroups())
.map(name => ([name, this._groups.get(name).label]));
// The map contains a name of category (an identifier) and its label (a translational string).
const specialCharsGroups = new Map([
// Add a special group that shows all available special characters.
[ALL_SPECIAL_CHARACTERS_GROUP, this._allSpecialCharactersGroupLabel],
...groupEntries
]);
const navigationView = new SpecialCharactersNavigationView(locale, specialCharsGroups);
const gridView = new CharacterGridView(locale);
const infoView = new CharacterInfoView(locale);
gridView.delegate('execute').to(dropdownView);
gridView.on('tileHover', (evt, data) => {
infoView.set(data);
});
gridView.on('tileFocus', (evt, data) => {
infoView.set(data);
});
// Update the grid of special characters when a user changed the character group.
navigationView.on('execute', () => {
this._updateGrid(navigationView.currentGroupName, gridView);
});
// Set the initial content of the special characters grid.
this._updateGrid(navigationView.currentGroupName, gridView);
return { navigationView, gridView, infoView };
}
}
/**
* @typedef {Object} module:special-characters/specialcharacters~SpecialCharacterDefinition
*
* @property {String} title A unique name of the character (e.g. "greek small letter epsilon").
* @property {String} character A human-readable character displayed as the label (e.g. "ε").
*/
/**
* The configuration of the {@link module:special-characters/specialcharacters~SpecialCharacters} feature.
*
* Read more in {@link module:special-characters/specialcharacters~SpecialCharactersConfig}.
*
* @member {module:special-characters/specialcharacters~SpecialCharactersConfig}
* module:core/editor/editorconfig~EditorConfig#specialCharacters
*/
/**
* The configuration of the special characters feature.
*
* Read more about {@glink features/special-characters#configuration configuring the special characters feature}.
*
* ClassicEditor
* .create( editorElement, {
* specialCharacters: ... // Special characters feature options.
* } )
* .then( ... )
* .catch( ... );
*
* See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
*
* @interface SpecialCharactersConfig
*/
/**
* The configuration of the special characters category order.
*
* Special characters categories are displayed in the UI in the order in which they were registered. Using the `order` property
* allows to override this behaviour and enforce specific order. Categories not listed in the `order` property will be displayed
* in the default order below categories listed in the configuration.
*
* ClassicEditor
* .create( editorElement, {
* plugins: [ SpecialCharacters, SpecialCharactersEssentials, ... ],
* specialCharacters: {
* order: [
* 'Text',
* 'Latin',
* 'Mathematical',
* 'Currency',
* 'Arrows'
* ]
* }
* } )
* .then( ... )
* .catch( ... );
*
* @member {Array.<String>} module:special-characters/specialcharacters~SpecialCharactersConfig#order
*/

@@ -5,61 +5,57 @@ /**

*/
/**
* @module special-characters/specialcharactersarrows
*/
import { Plugin } from 'ckeditor5/src/core';
/**
* A plugin that provides special characters for the "Arrows" category.
*
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
* } )
* .then( ... )
* .catch( ... );
*
* @extends module:core/plugin~Plugin
* ```ts
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersArrows ],
* } )
* .then( ... )
* .catch( ... );
* ```
*/
export default class SpecialCharactersArrows extends Plugin {
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersArrows';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
editor.plugins.get( 'SpecialCharacters' ).addItems( 'Arrows', [
{ title: t( 'leftwards simple arrow' ), character: '←' },
{ title: t( 'rightwards simple arrow' ), character: '→' },
{ title: t( 'upwards simple arrow' ), character: '↑' },
{ title: t( 'downwards simple arrow' ), character: '↓' },
{ title: t( 'leftwards double arrow' ), character: '⇐' },
{ title: t( 'rightwards double arrow' ), character: '⇒' },
{ title: t( 'upwards double arrow' ), character: '⇑' },
{ title: t( 'downwards double arrow' ), character: '⇓' },
{ title: t( 'leftwards dashed arrow' ), character: '⇠' },
{ title: t( 'rightwards dashed arrow' ), character: '⇢' },
{ title: t( 'upwards dashed arrow' ), character: '⇡' },
{ title: t( 'downwards dashed arrow' ), character: '⇣' },
{ title: t( 'leftwards arrow to bar' ), character: '⇤' },
{ title: t( 'rightwards arrow to bar' ), character: '⇥' },
{ title: t( 'upwards arrow to bar' ), character: '⤒' },
{ title: t( 'downwards arrow to bar' ), character: '⤓' },
{ title: t( 'up down arrow with base' ), character: '↨' },
{ title: t( 'back with leftwards arrow above' ), character: '🔙' },
{ title: t( 'end with leftwards arrow above' ), character: '🔚' },
{ title: t( 'on with exclamation mark with left right arrow above' ), character: '🔛' },
{ title: t( 'soon with rightwards arrow above' ), character: '🔜' },
{ title: t( 'top with upwards arrow above' ), character: '🔝' }
], { label: t( 'Arrows' ) } );
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersArrows';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const plugin = editor.plugins.get('SpecialCharacters');
plugin.addItems('Arrows', [
{ title: t('leftwards simple arrow'), character: '←' },
{ title: t('rightwards simple arrow'), character: '→' },
{ title: t('upwards simple arrow'), character: '↑' },
{ title: t('downwards simple arrow'), character: '↓' },
{ title: t('leftwards double arrow'), character: '⇐' },
{ title: t('rightwards double arrow'), character: '⇒' },
{ title: t('upwards double arrow'), character: '⇑' },
{ title: t('downwards double arrow'), character: '⇓' },
{ title: t('leftwards dashed arrow'), character: '⇠' },
{ title: t('rightwards dashed arrow'), character: '⇢' },
{ title: t('upwards dashed arrow'), character: '⇡' },
{ title: t('downwards dashed arrow'), character: '⇣' },
{ title: t('leftwards arrow to bar'), character: '⇤' },
{ title: t('rightwards arrow to bar'), character: '⇥' },
{ title: t('upwards arrow to bar'), character: '⤒' },
{ title: t('downwards arrow to bar'), character: '⤓' },
{ title: t('up down arrow with base'), character: '↨' },
{ title: t('back with leftwards arrow above'), character: '🔙' },
{ title: t('end with leftwards arrow above'), character: '🔚' },
{ title: t('on with exclamation mark with left right arrow above'), character: '🔛' },
{ title: t('soon with rightwards arrow above'), character: '🔜' },
{ title: t('top with upwards arrow above'), character: '🔝' }
], { label: t('Arrows') });
}
}

@@ -5,75 +5,71 @@ /**

*/
/**
* @module special-characters/specialcharacterscurrency
*/
import { Plugin } from 'ckeditor5/src/core';
/**
* A plugin that provides special characters for the "Currency" category.
*
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
* } )
* .then( ... )
* .catch( ... );
*
* @extends module:core/plugin~Plugin
* ```ts
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersCurrency ],
* } )
* .then( ... )
* .catch( ... );
* ```
*/
export default class SpecialCharactersCurrency extends Plugin {
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersCurrency';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
editor.plugins.get( 'SpecialCharacters' ).addItems( 'Currency', [
{ character: '$', title: t( 'Dollar sign' ) },
{ character: '€', title: t( 'Euro sign' ) },
{ character: '¥', title: t( 'Yen sign' ) },
{ character: '£', title: t( 'Pound sign' ) },
{ character: '¢', title: t( 'Cent sign' ) },
{ character: '₠', title: t( 'Euro-currency sign' ) },
{ character: '₡', title: t( 'Colon sign' ) },
{ character: '₢', title: t( 'Cruzeiro sign' ) },
{ character: '₣', title: t( 'French franc sign' ) },
{ character: '₤', title: t( 'Lira sign' ) },
{ character: '¤', title: t( 'Currency sign' ) },
{ character: '₿', title: t( 'Bitcoin sign' ) },
{ character: '₥', title: t( 'Mill sign' ) },
{ character: '₦', title: t( 'Naira sign' ) },
{ character: '₧', title: t( 'Peseta sign' ) },
{ character: '₨', title: t( 'Rupee sign' ) },
{ character: '₩', title: t( 'Won sign' ) },
{ character: '₪', title: t( 'New sheqel sign' ) },
{ character: '₫', title: t( 'Dong sign' ) },
{ character: '₭', title: t( 'Kip sign' ) },
{ character: '₮', title: t( 'Tugrik sign' ) },
{ character: '₯', title: t( 'Drachma sign' ) },
{ character: '₰', title: t( 'German penny sign' ) },
{ character: '₱', title: t( 'Peso sign' ) },
{ character: '₲', title: t( 'Guarani sign' ) },
{ character: '₳', title: t( 'Austral sign' ) },
{ character: '₴', title: t( 'Hryvnia sign' ) },
{ character: '₵', title: t( 'Cedi sign' ) },
{ character: '₶', title: t( 'Livre tournois sign' ) },
{ character: '₷', title: t( 'Spesmilo sign' ) },
{ character: '₸', title: t( 'Tenge sign' ) },
{ character: '₹', title: t( 'Indian rupee sign' ) },
{ character: '₺', title: t( 'Turkish lira sign' ) },
{ character: '₻', title: t( 'Nordic mark sign' ) },
{ character: '₼', title: t( 'Manat sign' ) },
{ character: '₽', title: t( 'Ruble sign' ) }
], { label: t( 'Currency' ) } );
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersCurrency';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const plugin = editor.plugins.get('SpecialCharacters');
plugin.addItems('Currency', [
{ character: '$', title: t('Dollar sign') },
{ character: '€', title: t('Euro sign') },
{ character: '¥', title: t('Yen sign') },
{ character: '£', title: t('Pound sign') },
{ character: '¢', title: t('Cent sign') },
{ character: '₠', title: t('Euro-currency sign') },
{ character: '₡', title: t('Colon sign') },
{ character: '₢', title: t('Cruzeiro sign') },
{ character: '₣', title: t('French franc sign') },
{ character: '₤', title: t('Lira sign') },
{ character: '¤', title: t('Currency sign') },
{ character: '₿', title: t('Bitcoin sign') },
{ character: '₥', title: t('Mill sign') },
{ character: '₦', title: t('Naira sign') },
{ character: '₧', title: t('Peseta sign') },
{ character: '₨', title: t('Rupee sign') },
{ character: '₩', title: t('Won sign') },
{ character: '₪', title: t('New sheqel sign') },
{ character: '₫', title: t('Dong sign') },
{ character: '₭', title: t('Kip sign') },
{ character: '₮', title: t('Tugrik sign') },
{ character: '₯', title: t('Drachma sign') },
{ character: '₰', title: t('German penny sign') },
{ character: '₱', title: t('Peso sign') },
{ character: '₲', title: t('Guarani sign') },
{ character: '₳', title: t('Austral sign') },
{ character: '₴', title: t('Hryvnia sign') },
{ character: '₵', title: t('Cedi sign') },
{ character: '₶', title: t('Livre tournois sign') },
{ character: '₷', title: t('Spesmilo sign') },
{ character: '₸', title: t('Tenge sign') },
{ character: '₹', title: t('Indian rupee sign') },
{ character: '₺', title: t('Turkish lira sign') },
{ character: '₻', title: t('Nordic mark sign') },
{ character: '₼', title: t('Manat sign') },
{ character: '₽', title: t('Ruble sign') }
], { label: t('Currency') });
}
}

@@ -5,9 +5,6 @@ /**

*/
/**
* @module special-characters/specialcharactersessentials
*/
import { Plugin } from 'ckeditor5/src/core';
import SpecialCharactersCurrency from './specialcharacterscurrency';

@@ -18,28 +15,33 @@ import SpecialCharactersMathematical from './specialcharactersmathematical';

import SpecialCharactersText from './specialcharacterstext';
/**
* A plugin combining a basic set of characters for the special characters plugin.
*
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
* } )
* .then( ... )
* .catch( ... );
*
* @extends module:core/plugin~Plugin
* ```ts
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersEssentials ],
* } )
* .then( ... )
* .catch( ... );
* ```
*/
export default class SpecialCharactersEssentials extends Plugin {
/**
* @inheritDoc
*/
static get requires() {
return [
SpecialCharactersCurrency,
SpecialCharactersText,
SpecialCharactersMathematical,
SpecialCharactersArrows,
SpecialCharactersLatin
];
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersEssentials';
}
/**
* @inheritDoc
*/
static get requires() {
return [
SpecialCharactersCurrency,
SpecialCharactersText,
SpecialCharactersMathematical,
SpecialCharactersArrows,
SpecialCharactersLatin
];
}
}

@@ -5,167 +5,163 @@ /**

*/
/**
* @module special-characters/specialcharacterslatin
*/
import { Plugin } from 'ckeditor5/src/core';
/**
* A plugin that provides special characters for the "Latin" category.
*
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
* } )
* .then( ... )
* .catch( ... );
*
* @extends module:core/plugin~Plugin
* ```ts
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersLatin ],
* } )
* .then( ... )
* .catch( ... );
* ```
*/
export default class SpecialCharactersLatin extends Plugin {
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersLatin';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
editor.plugins.get( 'SpecialCharacters' ).addItems( 'Latin', [
{ character: 'Ā', title: t( 'Latin capital letter a with macron' ) },
{ character: 'ā', title: t( 'Latin small letter a with macron' ) },
{ character: 'Ă', title: t( 'Latin capital letter a with breve' ) },
{ character: 'ă', title: t( 'Latin small letter a with breve' ) },
{ character: 'Ą', title: t( 'Latin capital letter a with ogonek' ) },
{ character: 'ą', title: t( 'Latin small letter a with ogonek' ) },
{ character: 'Ć', title: t( 'Latin capital letter c with acute' ) },
{ character: 'ć', title: t( 'Latin small letter c with acute' ) },
{ character: 'Ĉ', title: t( 'Latin capital letter c with circumflex' ) },
{ character: 'ĉ', title: t( 'Latin small letter c with circumflex' ) },
{ character: 'Ċ', title: t( 'Latin capital letter c with dot above' ) },
{ character: 'ċ', title: t( 'Latin small letter c with dot above' ) },
{ character: 'Č', title: t( 'Latin capital letter c with caron' ) },
{ character: 'č', title: t( 'Latin small letter c with caron' ) },
{ character: 'Ď', title: t( 'Latin capital letter d with caron' ) },
{ character: 'ď', title: t( 'Latin small letter d with caron' ) },
{ character: 'Đ', title: t( 'Latin capital letter d with stroke' ) },
{ character: 'đ', title: t( 'Latin small letter d with stroke' ) },
{ character: 'Ē', title: t( 'Latin capital letter e with macron' ) },
{ character: 'ē', title: t( 'Latin small letter e with macron' ) },
{ character: 'Ĕ', title: t( 'Latin capital letter e with breve' ) },
{ character: 'ĕ', title: t( 'Latin small letter e with breve' ) },
{ character: 'Ė', title: t( 'Latin capital letter e with dot above' ) },
{ character: 'ė', title: t( 'Latin small letter e with dot above' ) },
{ character: 'Ę', title: t( 'Latin capital letter e with ogonek' ) },
{ character: 'ę', title: t( 'Latin small letter e with ogonek' ) },
{ character: 'Ě', title: t( 'Latin capital letter e with caron' ) },
{ character: 'ě', title: t( 'Latin small letter e with caron' ) },
{ character: 'Ĝ', title: t( 'Latin capital letter g with circumflex' ) },
{ character: 'ĝ', title: t( 'Latin small letter g with circumflex' ) },
{ character: 'Ğ', title: t( 'Latin capital letter g with breve' ) },
{ character: 'ğ', title: t( 'Latin small letter g with breve' ) },
{ character: 'Ġ', title: t( 'Latin capital letter g with dot above' ) },
{ character: 'ġ', title: t( 'Latin small letter g with dot above' ) },
{ character: 'Ģ', title: t( 'Latin capital letter g with cedilla' ) },
{ character: 'ģ', title: t( 'Latin small letter g with cedilla' ) },
{ character: 'Ĥ', title: t( 'Latin capital letter h with circumflex' ) },
{ character: 'ĥ', title: t( 'Latin small letter h with circumflex' ) },
{ character: 'Ħ', title: t( 'Latin capital letter h with stroke' ) },
{ character: 'ħ', title: t( 'Latin small letter h with stroke' ) },
{ character: 'Ĩ', title: t( 'Latin capital letter i with tilde' ) },
{ character: 'ĩ', title: t( 'Latin small letter i with tilde' ) },
{ character: 'Ī', title: t( 'Latin capital letter i with macron' ) },
{ character: 'ī', title: t( 'Latin small letter i with macron' ) },
{ character: 'Ĭ', title: t( 'Latin capital letter i with breve' ) },
{ character: 'ĭ', title: t( 'Latin small letter i with breve' ) },
{ character: 'Į', title: t( 'Latin capital letter i with ogonek' ) },
{ character: 'į', title: t( 'Latin small letter i with ogonek' ) },
{ character: 'İ', title: t( 'Latin capital letter i with dot above' ) },
{ character: 'ı', title: t( 'Latin small letter dotless i' ) },
{ character: 'IJ', title: t( 'Latin capital ligature ij' ) },
{ character: 'ij', title: t( 'Latin small ligature ij' ) },
{ character: 'Ĵ', title: t( 'Latin capital letter j with circumflex' ) },
{ character: 'ĵ', title: t( 'Latin small letter j with circumflex' ) },
{ character: 'Ķ', title: t( 'Latin capital letter k with cedilla' ) },
{ character: 'ķ', title: t( 'Latin small letter k with cedilla' ) },
{ character: 'ĸ', title: t( 'Latin small letter kra' ) },
{ character: 'Ĺ', title: t( 'Latin capital letter l with acute' ) },
{ character: 'ĺ', title: t( 'Latin small letter l with acute' ) },
{ character: 'Ļ', title: t( 'Latin capital letter l with cedilla' ) },
{ character: 'ļ', title: t( 'Latin small letter l with cedilla' ) },
{ character: 'Ľ', title: t( 'Latin capital letter l with caron' ) },
{ character: 'ľ', title: t( 'Latin small letter l with caron' ) },
{ character: 'Ŀ', title: t( 'Latin capital letter l with middle dot' ) },
{ character: 'ŀ', title: t( 'Latin small letter l with middle dot' ) },
{ character: 'Ł', title: t( 'Latin capital letter l with stroke' ) },
{ character: 'ł', title: t( 'Latin small letter l with stroke' ) },
{ character: 'Ń', title: t( 'Latin capital letter n with acute' ) },
{ character: 'ń', title: t( 'Latin small letter n with acute' ) },
{ character: 'Ņ', title: t( 'Latin capital letter n with cedilla' ) },
{ character: 'ņ', title: t( 'Latin small letter n with cedilla' ) },
{ character: 'Ň', title: t( 'Latin capital letter n with caron' ) },
{ character: 'ň', title: t( 'Latin small letter n with caron' ) },
{ character: 'ʼn', title: t( 'Latin small letter n preceded by apostrophe' ) },
{ character: 'Ŋ', title: t( 'Latin capital letter eng' ) },
{ character: 'ŋ', title: t( 'Latin small letter eng' ) },
{ character: 'Ō', title: t( 'Latin capital letter o with macron' ) },
{ character: 'ō', title: t( 'Latin small letter o with macron' ) },
{ character: 'Ŏ', title: t( 'Latin capital letter o with breve' ) },
{ character: 'ŏ', title: t( 'Latin small letter o with breve' ) },
{ character: 'Ő', title: t( 'Latin capital letter o with double acute' ) },
{ character: 'ő', title: t( 'Latin small letter o with double acute' ) },
{ character: 'Œ', title: t( 'Latin capital ligature oe' ) },
{ character: 'œ', title: t( 'Latin small ligature oe' ) },
{ character: 'Ŕ', title: t( 'Latin capital letter r with acute' ) },
{ character: 'ŕ', title: t( 'Latin small letter r with acute' ) },
{ character: 'Ŗ', title: t( 'Latin capital letter r with cedilla' ) },
{ character: 'ŗ', title: t( 'Latin small letter r with cedilla' ) },
{ character: 'Ř', title: t( 'Latin capital letter r with caron' ) },
{ character: 'ř', title: t( 'Latin small letter r with caron' ) },
{ character: 'Ś', title: t( 'Latin capital letter s with acute' ) },
{ character: 'ś', title: t( 'Latin small letter s with acute' ) },
{ character: 'Ŝ', title: t( 'Latin capital letter s with circumflex' ) },
{ character: 'ŝ', title: t( 'Latin small letter s with circumflex' ) },
{ character: 'Ş', title: t( 'Latin capital letter s with cedilla' ) },
{ character: 'ş', title: t( 'Latin small letter s with cedilla' ) },
{ character: 'Š', title: t( 'Latin capital letter s with caron' ) },
{ character: 'š', title: t( 'Latin small letter s with caron' ) },
{ character: 'Ţ', title: t( 'Latin capital letter t with cedilla' ) },
{ character: 'ţ', title: t( 'Latin small letter t with cedilla' ) },
{ character: 'Ť', title: t( 'Latin capital letter t with caron' ) },
{ character: 'ť', title: t( 'Latin small letter t with caron' ) },
{ character: 'Ŧ', title: t( 'Latin capital letter t with stroke' ) },
{ character: 'ŧ', title: t( 'Latin small letter t with stroke' ) },
{ character: 'Ũ', title: t( 'Latin capital letter u with tilde' ) },
{ character: 'ũ', title: t( 'Latin small letter u with tilde' ) },
{ character: 'Ū', title: t( 'Latin capital letter u with macron' ) },
{ character: 'ū', title: t( 'Latin small letter u with macron' ) },
{ character: 'Ŭ', title: t( 'Latin capital letter u with breve' ) },
{ character: 'ŭ', title: t( 'Latin small letter u with breve' ) },
{ character: 'Ů', title: t( 'Latin capital letter u with ring above' ) },
{ character: 'ů', title: t( 'Latin small letter u with ring above' ) },
{ character: 'Ű', title: t( 'Latin capital letter u with double acute' ) },
{ character: 'ű', title: t( 'Latin small letter u with double acute' ) },
{ character: 'Ų', title: t( 'Latin capital letter u with ogonek' ) },
{ character: 'ų', title: t( 'Latin small letter u with ogonek' ) },
{ character: 'Ŵ', title: t( 'Latin capital letter w with circumflex' ) },
{ character: 'ŵ', title: t( 'Latin small letter w with circumflex' ) },
{ character: 'Ŷ', title: t( 'Latin capital letter y with circumflex' ) },
{ character: 'ŷ', title: t( 'Latin small letter y with circumflex' ) },
{ character: 'Ÿ', title: t( 'Latin capital letter y with diaeresis' ) },
{ character: 'Ź', title: t( 'Latin capital letter z with acute' ) },
{ character: 'ź', title: t( 'Latin small letter z with acute' ) },
{ character: 'Ż', title: t( 'Latin capital letter z with dot above' ) },
{ character: 'ż', title: t( 'Latin small letter z with dot above' ) },
{ character: 'Ž', title: t( 'Latin capital letter z with caron' ) },
{ character: 'ž', title: t( 'Latin small letter z with caron' ) },
{ character: 'ſ', title: t( 'Latin small letter long s' ) }
], { label: t( 'Latin' ) } );
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersLatin';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const plugin = editor.plugins.get('SpecialCharacters');
plugin.addItems('Latin', [
{ character: 'Ā', title: t('Latin capital letter a with macron') },
{ character: 'ā', title: t('Latin small letter a with macron') },
{ character: 'Ă', title: t('Latin capital letter a with breve') },
{ character: 'ă', title: t('Latin small letter a with breve') },
{ character: 'Ą', title: t('Latin capital letter a with ogonek') },
{ character: 'ą', title: t('Latin small letter a with ogonek') },
{ character: 'Ć', title: t('Latin capital letter c with acute') },
{ character: 'ć', title: t('Latin small letter c with acute') },
{ character: 'Ĉ', title: t('Latin capital letter c with circumflex') },
{ character: 'ĉ', title: t('Latin small letter c with circumflex') },
{ character: 'Ċ', title: t('Latin capital letter c with dot above') },
{ character: 'ċ', title: t('Latin small letter c with dot above') },
{ character: 'Č', title: t('Latin capital letter c with caron') },
{ character: 'č', title: t('Latin small letter c with caron') },
{ character: 'Ď', title: t('Latin capital letter d with caron') },
{ character: 'ď', title: t('Latin small letter d with caron') },
{ character: 'Đ', title: t('Latin capital letter d with stroke') },
{ character: 'đ', title: t('Latin small letter d with stroke') },
{ character: 'Ē', title: t('Latin capital letter e with macron') },
{ character: 'ē', title: t('Latin small letter e with macron') },
{ character: 'Ĕ', title: t('Latin capital letter e with breve') },
{ character: 'ĕ', title: t('Latin small letter e with breve') },
{ character: 'Ė', title: t('Latin capital letter e with dot above') },
{ character: 'ė', title: t('Latin small letter e with dot above') },
{ character: 'Ę', title: t('Latin capital letter e with ogonek') },
{ character: 'ę', title: t('Latin small letter e with ogonek') },
{ character: 'Ě', title: t('Latin capital letter e with caron') },
{ character: 'ě', title: t('Latin small letter e with caron') },
{ character: 'Ĝ', title: t('Latin capital letter g with circumflex') },
{ character: 'ĝ', title: t('Latin small letter g with circumflex') },
{ character: 'Ğ', title: t('Latin capital letter g with breve') },
{ character: 'ğ', title: t('Latin small letter g with breve') },
{ character: 'Ġ', title: t('Latin capital letter g with dot above') },
{ character: 'ġ', title: t('Latin small letter g with dot above') },
{ character: 'Ģ', title: t('Latin capital letter g with cedilla') },
{ character: 'ģ', title: t('Latin small letter g with cedilla') },
{ character: 'Ĥ', title: t('Latin capital letter h with circumflex') },
{ character: 'ĥ', title: t('Latin small letter h with circumflex') },
{ character: 'Ħ', title: t('Latin capital letter h with stroke') },
{ character: 'ħ', title: t('Latin small letter h with stroke') },
{ character: 'Ĩ', title: t('Latin capital letter i with tilde') },
{ character: 'ĩ', title: t('Latin small letter i with tilde') },
{ character: 'Ī', title: t('Latin capital letter i with macron') },
{ character: 'ī', title: t('Latin small letter i with macron') },
{ character: 'Ĭ', title: t('Latin capital letter i with breve') },
{ character: 'ĭ', title: t('Latin small letter i with breve') },
{ character: 'Į', title: t('Latin capital letter i with ogonek') },
{ character: 'į', title: t('Latin small letter i with ogonek') },
{ character: 'İ', title: t('Latin capital letter i with dot above') },
{ character: 'ı', title: t('Latin small letter dotless i') },
{ character: 'IJ', title: t('Latin capital ligature ij') },
{ character: 'ij', title: t('Latin small ligature ij') },
{ character: 'Ĵ', title: t('Latin capital letter j with circumflex') },
{ character: 'ĵ', title: t('Latin small letter j with circumflex') },
{ character: 'Ķ', title: t('Latin capital letter k with cedilla') },
{ character: 'ķ', title: t('Latin small letter k with cedilla') },
{ character: 'ĸ', title: t('Latin small letter kra') },
{ character: 'Ĺ', title: t('Latin capital letter l with acute') },
{ character: 'ĺ', title: t('Latin small letter l with acute') },
{ character: 'Ļ', title: t('Latin capital letter l with cedilla') },
{ character: 'ļ', title: t('Latin small letter l with cedilla') },
{ character: 'Ľ', title: t('Latin capital letter l with caron') },
{ character: 'ľ', title: t('Latin small letter l with caron') },
{ character: 'Ŀ', title: t('Latin capital letter l with middle dot') },
{ character: 'ŀ', title: t('Latin small letter l with middle dot') },
{ character: 'Ł', title: t('Latin capital letter l with stroke') },
{ character: 'ł', title: t('Latin small letter l with stroke') },
{ character: 'Ń', title: t('Latin capital letter n with acute') },
{ character: 'ń', title: t('Latin small letter n with acute') },
{ character: 'Ņ', title: t('Latin capital letter n with cedilla') },
{ character: 'ņ', title: t('Latin small letter n with cedilla') },
{ character: 'Ň', title: t('Latin capital letter n with caron') },
{ character: 'ň', title: t('Latin small letter n with caron') },
{ character: 'ʼn', title: t('Latin small letter n preceded by apostrophe') },
{ character: 'Ŋ', title: t('Latin capital letter eng') },
{ character: 'ŋ', title: t('Latin small letter eng') },
{ character: 'Ō', title: t('Latin capital letter o with macron') },
{ character: 'ō', title: t('Latin small letter o with macron') },
{ character: 'Ŏ', title: t('Latin capital letter o with breve') },
{ character: 'ŏ', title: t('Latin small letter o with breve') },
{ character: 'Ő', title: t('Latin capital letter o with double acute') },
{ character: 'ő', title: t('Latin small letter o with double acute') },
{ character: 'Œ', title: t('Latin capital ligature oe') },
{ character: 'œ', title: t('Latin small ligature oe') },
{ character: 'Ŕ', title: t('Latin capital letter r with acute') },
{ character: 'ŕ', title: t('Latin small letter r with acute') },
{ character: 'Ŗ', title: t('Latin capital letter r with cedilla') },
{ character: 'ŗ', title: t('Latin small letter r with cedilla') },
{ character: 'Ř', title: t('Latin capital letter r with caron') },
{ character: 'ř', title: t('Latin small letter r with caron') },
{ character: 'Ś', title: t('Latin capital letter s with acute') },
{ character: 'ś', title: t('Latin small letter s with acute') },
{ character: 'Ŝ', title: t('Latin capital letter s with circumflex') },
{ character: 'ŝ', title: t('Latin small letter s with circumflex') },
{ character: 'Ş', title: t('Latin capital letter s with cedilla') },
{ character: 'ş', title: t('Latin small letter s with cedilla') },
{ character: 'Š', title: t('Latin capital letter s with caron') },
{ character: 'š', title: t('Latin small letter s with caron') },
{ character: 'Ţ', title: t('Latin capital letter t with cedilla') },
{ character: 'ţ', title: t('Latin small letter t with cedilla') },
{ character: 'Ť', title: t('Latin capital letter t with caron') },
{ character: 'ť', title: t('Latin small letter t with caron') },
{ character: 'Ŧ', title: t('Latin capital letter t with stroke') },
{ character: 'ŧ', title: t('Latin small letter t with stroke') },
{ character: 'Ũ', title: t('Latin capital letter u with tilde') },
{ character: 'ũ', title: t('Latin small letter u with tilde') },
{ character: 'Ū', title: t('Latin capital letter u with macron') },
{ character: 'ū', title: t('Latin small letter u with macron') },
{ character: 'Ŭ', title: t('Latin capital letter u with breve') },
{ character: 'ŭ', title: t('Latin small letter u with breve') },
{ character: 'Ů', title: t('Latin capital letter u with ring above') },
{ character: 'ů', title: t('Latin small letter u with ring above') },
{ character: 'Ű', title: t('Latin capital letter u with double acute') },
{ character: 'ű', title: t('Latin small letter u with double acute') },
{ character: 'Ų', title: t('Latin capital letter u with ogonek') },
{ character: 'ų', title: t('Latin small letter u with ogonek') },
{ character: 'Ŵ', title: t('Latin capital letter w with circumflex') },
{ character: 'ŵ', title: t('Latin small letter w with circumflex') },
{ character: 'Ŷ', title: t('Latin capital letter y with circumflex') },
{ character: 'ŷ', title: t('Latin small letter y with circumflex') },
{ character: 'Ÿ', title: t('Latin capital letter y with diaeresis') },
{ character: 'Ź', title: t('Latin capital letter z with acute') },
{ character: 'ź', title: t('Latin small letter z with acute') },
{ character: 'Ż', title: t('Latin capital letter z with dot above') },
{ character: 'ż', title: t('Latin small letter z with dot above') },
{ character: 'Ž', title: t('Latin capital letter z with caron') },
{ character: 'ž', title: t('Latin small letter z with caron') },
{ character: 'ſ', title: t('Latin small letter long s') }
], { label: t('Latin') });
}
}

@@ -5,83 +5,79 @@ /**

*/
/**
* @module special-characters/specialcharactersmathematical
*/
import { Plugin } from 'ckeditor5/src/core';
/**
* A plugin that provides special characters for the "Mathematical" category.
*
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersMathematical ],
* } )
* .then( ... )
* .catch( ... );
*
* @extends module:core/plugin~Plugin
* ```ts
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersMathematical ],
* } )
* .then( ... )
* .catch( ... );
* ```
*/
export default class SpecialCharactersMathematical extends Plugin {
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersMathematical';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
editor.plugins.get( 'SpecialCharacters' ).addItems( 'Mathematical', [
{ character: '<', title: t( 'Less-than sign' ) },
{ character: '>', title: t( 'Greater-than sign' ) },
{ character: '≤', title: t( 'Less-than or equal to' ) },
{ character: '≥', title: t( 'Greater-than or equal to' ) },
{ character: '–', title: t( 'En dash' ) },
{ character: '—', title: t( 'Em dash' ) },
{ character: '¯', title: t( 'Macron' ) },
{ character: '‾', title: t( 'Overline' ) },
{ character: '°', title: t( 'Degree sign' ) },
{ character: '−', title: t( 'Minus sign' ) },
{ character: '±', title: t( 'Plus-minus sign' ) },
{ character: '÷', title: t( 'Division sign' ) },
{ character: '⁄', title: t( 'Fraction slash' ) },
{ character: '×', title: t( 'Multiplication sign' ) },
{ character: 'ƒ', title: t( 'Latin small letter f with hook' ) },
{ character: '∫', title: t( 'Integral' ) },
{ character: '∑', title: t( 'N-ary summation' ) },
{ character: '∞', title: t( 'Infinity' ) },
{ character: '√', title: t( 'Square root' ) },
{ character: '∼', title: t( 'Tilde operator' ) },
{ character: '≅', title: t( 'Approximately equal to' ) },
{ character: '≈', title: t( 'Almost equal to' ) },
{ character: '≠', title: t( 'Not equal to' ) },
{ character: '≡', title: t( 'Identical to' ) },
{ character: '∈', title: t( 'Element of' ) },
{ character: '∉', title: t( 'Not an element of' ) },
{ character: '∋', title: t( 'Contains as member' ) },
{ character: '∏', title: t( 'N-ary product' ) },
{ character: '∧', title: t( 'Logical and' ) },
{ character: '∨', title: t( 'Logical or' ) },
{ character: '¬', title: t( 'Not sign' ) },
{ character: '∩', title: t( 'Intersection' ) },
{ character: '∪', title: t( 'Union' ) },
{ character: '∂', title: t( 'Partial differential' ) },
{ character: '∀', title: t( 'For all' ) },
{ character: '∃', title: t( 'There exists' ) },
{ character: '∅', title: t( 'Empty set' ) },
{ character: '∇', title: t( 'Nabla' ) },
{ character: '∗', title: t( 'Asterisk operator' ) },
{ character: '∝', title: t( 'Proportional to' ) },
{ character: '∠', title: t( 'Angle' ) },
{ character: '¼', title: t( 'Vulgar fraction one quarter' ) },
{ character: '½', title: t( 'Vulgar fraction one half' ) },
{ character: '¾', title: t( 'Vulgar fraction three quarters' ) }
], { label: t( 'Mathematical' ) } );
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersMathematical';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const plugin = editor.plugins.get('SpecialCharacters');
plugin.addItems('Mathematical', [
{ character: '<', title: t('Less-than sign') },
{ character: '>', title: t('Greater-than sign') },
{ character: '≤', title: t('Less-than or equal to') },
{ character: '≥', title: t('Greater-than or equal to') },
{ character: '–', title: t('En dash') },
{ character: '—', title: t('Em dash') },
{ character: '¯', title: t('Macron') },
{ character: '‾', title: t('Overline') },
{ character: '°', title: t('Degree sign') },
{ character: '−', title: t('Minus sign') },
{ character: '±', title: t('Plus-minus sign') },
{ character: '÷', title: t('Division sign') },
{ character: '⁄', title: t('Fraction slash') },
{ character: '×', title: t('Multiplication sign') },
{ character: 'ƒ', title: t('Latin small letter f with hook') },
{ character: '∫', title: t('Integral') },
{ character: '∑', title: t('N-ary summation') },
{ character: '∞', title: t('Infinity') },
{ character: '√', title: t('Square root') },
{ character: '∼', title: t('Tilde operator') },
{ character: '≅', title: t('Approximately equal to') },
{ character: '≈', title: t('Almost equal to') },
{ character: '≠', title: t('Not equal to') },
{ character: '≡', title: t('Identical to') },
{ character: '∈', title: t('Element of') },
{ character: '∉', title: t('Not an element of') },
{ character: '∋', title: t('Contains as member') },
{ character: '∏', title: t('N-ary product') },
{ character: '∧', title: t('Logical and') },
{ character: '∨', title: t('Logical or') },
{ character: '¬', title: t('Not sign') },
{ character: '∩', title: t('Intersection') },
{ character: '∪', title: t('Union') },
{ character: '∂', title: t('Partial differential') },
{ character: '∀', title: t('For all') },
{ character: '∃', title: t('There exists') },
{ character: '∅', title: t('Empty set') },
{ character: '∇', title: t('Nabla') },
{ character: '∗', title: t('Asterisk operator') },
{ character: '∝', title: t('Proportional to') },
{ character: '∠', title: t('Angle') },
{ character: '¼', title: t('Vulgar fraction one quarter') },
{ character: '½', title: t('Vulgar fraction one half') },
{ character: '¾', title: t('Vulgar fraction three quarters') }
], { label: t('Mathematical') });
}
}

@@ -5,66 +5,62 @@ /**

*/
/**
* @module special-characters/specialcharacterstext
*/
import { Plugin } from 'ckeditor5/src/core';
/**
* A plugin that provides special characters for the "Text" category.
*
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersText ],
* } )
* .then( ... )
* .catch( ... );
*
* @extends module:core/plugin~Plugin
* ```ts
* ClassicEditor
* .create( {
* plugins: [ ..., SpecialCharacters, SpecialCharactersText ],
* } )
* .then( ... )
* .catch( ... );
* ```
*/
export default class SpecialCharactersText extends Plugin {
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersText';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
editor.plugins.get( 'SpecialCharacters' ).addItems( 'Text', [
{ character: '‹', title: t( 'Single left-pointing angle quotation mark' ) },
{ character: '›', title: t( 'Single right-pointing angle quotation mark' ) },
{ character: '«', title: t( 'Left-pointing double angle quotation mark' ) },
{ character: '»', title: t( 'Right-pointing double angle quotation mark' ) },
{ character: '‘', title: t( 'Left single quotation mark' ) },
{ character: '’', title: t( 'Right single quotation mark' ) },
{ character: '“', title: t( 'Left double quotation mark' ) },
{ character: '”', title: t( 'Right double quotation mark' ) },
{ character: '‚', title: t( 'Single low-9 quotation mark' ) },
{ character: '„', title: t( 'Double low-9 quotation mark' ) },
{ character: '¡', title: t( 'Inverted exclamation mark' ) },
{ character: '¿', title: t( 'Inverted question mark' ) },
{ character: '‥', title: t( 'Two dot leader' ) },
{ character: '…', title: t( 'Horizontal ellipsis' ) },
{ character: '‡', title: t( 'Double dagger' ) },
{ character: '‰', title: t( 'Per mille sign' ) },
{ character: '‱', title: t( 'Per ten thousand sign' ) },
{ character: '‼', title: t( 'Double exclamation mark' ) },
{ character: '⁈', title: t( 'Question exclamation mark' ) },
{ character: '⁉', title: t( 'Exclamation question mark' ) },
{ character: '⁇', title: t( 'Double question mark' ) },
{ character: '©', title: t( 'Copyright sign' ) },
{ character: '®', title: t( 'Registered sign' ) },
{ character: '™', title: t( 'Trade mark sign' ) },
{ character: '§', title: t( 'Section sign' ) },
{ character: '¶', title: t( 'Paragraph sign' ) },
{ character: '⁋', title: t( 'Reversed paragraph sign' ) }
], { label: t( 'Text' ) } );
}
/**
* @inheritDoc
*/
static get pluginName() {
return 'SpecialCharactersText';
}
/**
* @inheritDoc
*/
init() {
const editor = this.editor;
const t = editor.t;
const plugin = editor.plugins.get('SpecialCharacters');
plugin.addItems('Text', [
{ character: '‹', title: t('Single left-pointing angle quotation mark') },
{ character: '›', title: t('Single right-pointing angle quotation mark') },
{ character: '«', title: t('Left-pointing double angle quotation mark') },
{ character: '»', title: t('Right-pointing double angle quotation mark') },
{ character: '‘', title: t('Left single quotation mark') },
{ character: '’', title: t('Right single quotation mark') },
{ character: '“', title: t('Left double quotation mark') },
{ character: '”', title: t('Right double quotation mark') },
{ character: '‚', title: t('Single low-9 quotation mark') },
{ character: '„', title: t('Double low-9 quotation mark') },
{ character: '¡', title: t('Inverted exclamation mark') },
{ character: '¿', title: t('Inverted question mark') },
{ character: '‥', title: t('Two dot leader') },
{ character: '…', title: t('Horizontal ellipsis') },
{ character: '‡', title: t('Double dagger') },
{ character: '‰', title: t('Per mille sign') },
{ character: '‱', title: t('Per ten thousand sign') },
{ character: '‼', title: t('Double exclamation mark') },
{ character: '⁈', title: t('Question exclamation mark') },
{ character: '⁉', title: t('Exclamation question mark') },
{ character: '⁇', title: t('Double question mark') },
{ character: '©', title: t('Copyright sign') },
{ character: '®', title: t('Registered sign') },
{ character: '™', title: t('Trade mark sign') },
{ character: '§', title: t('Section sign') },
{ character: '¶', title: t('Paragraph sign') },
{ character: '⁋', title: t('Reversed paragraph sign') }
], { label: t('Text') });
}
}

@@ -5,199 +5,151 @@ /**

*/
/**
* @module special-characters/ui/charactergridview
*/
import { View, ButtonView, addKeyboardHandlingForGrid } from 'ckeditor5/src/ui';
import { KeystrokeHandler, FocusTracker, global } from 'ckeditor5/src/utils';
import '../../theme/charactergrid.css';
/**
* A grid of character tiles. It allows browsing special characters and selecting the character to
* be inserted into the content.
*
* @extends module:ui/view~View
*/
export default class CharacterGridView extends View {
/**
* Creates an instance of a character grid containing tiles representing special characters.
*
* @param {module:utils/locale~Locale} locale The localization services instance.
*/
constructor( locale ) {
super( locale );
/**
* A collection of the child tile views. Each tile represents a particular character.
*
* @readonly
* @member {module:ui/viewcollection~ViewCollection}
*/
this.tiles = this.createCollection();
this.setTemplate( {
tag: 'div',
children: [
{
tag: 'div',
attributes: {
class: [
'ck',
'ck-character-grid__tiles'
]
},
children: this.tiles
}
],
attributes: {
class: [
'ck',
'ck-character-grid'
]
}
} );
/**
* Tracks information about the DOM focus in the grid.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
addKeyboardHandlingForGrid( {
keystrokeHandler: this.keystrokes,
focusTracker: this.focusTracker,
gridItems: this.tiles,
numberOfColumns: () => global.window
.getComputedStyle( this.element.firstChild ) // Responsive .ck-character-grid__tiles
.getPropertyValue( 'grid-template-columns' )
.split( ' ' )
.length,
uiLanguageDirection: this.locale && this.locale.uiLanguageDirection
} );
/**
* Fired when any of {@link #tiles grid tiles} is clicked.
*
* @event execute
* @param {Object} data Additional information about the event.
* @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
* @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
*/
/**
* Fired when a mouse or another pointing device caused the cursor to move onto any {@link #tiles grid tile}
* (similar to the native `mouseover` DOM event).
*
* @event tileHover
* @param {Object} data Additional information about the event.
* @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
* @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
*/
/**
* Fired when {@link #tiles grid tile} is focused (e.g. by navigating with arrow keys).
*
* @event tileFocus
* @param {Object} data Additional information about the event.
* @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
* @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
*/
}
/**
* Creates a new tile for the grid.
*
* @param {String} character A human-readable character displayed as the label (e.g. "ε").
* @param {String} name The name of the character (e.g. "greek small letter epsilon").
* @returns {module:ui/button/buttonview~ButtonView}
*/
createTile( character, name ) {
const tile = new ButtonView( this.locale );
tile.set( {
label: character,
withText: true,
class: 'ck-character-grid__tile'
} );
// Labels are vital for the users to understand what character they're looking at.
// For now we're using native title attribute for that, see #5817.
tile.extendTemplate( {
attributes: {
title: name
},
on: {
mouseover: tile.bindTemplate.to( 'mouseover' ),
focus: tile.bindTemplate.to( 'focus' )
}
} );
tile.on( 'mouseover', () => {
this.fire( 'tileHover', { name, character } );
} );
tile.on( 'focus', () => {
this.fire( 'tileFocus', { name, character } );
} );
tile.on( 'execute', () => {
this.fire( 'execute', { name, character } );
} );
return tile;
}
/**
* @inheritDoc
*/
render() {
super.render();
for ( const item of this.tiles ) {
this.focusTracker.add( item.element );
}
this.tiles.on( 'change', ( eventInfo, { added, removed } ) => {
if ( added.length > 0 ) {
for ( const item of added ) {
this.focusTracker.add( item.element );
}
}
if ( removed.length > 0 ) {
for ( const item of removed ) {
this.focusTracker.remove( item.element );
}
}
} );
this.keystrokes.listenTo( this.element );
}
/**
* @inheritDoc
*/
destroy() {
super.destroy();
this.keystrokes.destroy();
}
/**
* Focuses the first focusable in {@link #tiles}.
*/
focus() {
this.tiles.get( 0 ).focus();
}
/**
* Creates an instance of a character grid containing tiles representing special characters.
*
* @param locale The localization services instance.
*/
constructor(locale) {
super(locale);
this.tiles = this.createCollection();
this.setTemplate({
tag: 'div',
children: [
{
tag: 'div',
attributes: {
class: [
'ck',
'ck-character-grid__tiles'
]
},
children: this.tiles
}
],
attributes: {
class: [
'ck',
'ck-character-grid'
]
}
});
this.focusTracker = new FocusTracker();
this.keystrokes = new KeystrokeHandler();
addKeyboardHandlingForGrid({
keystrokeHandler: this.keystrokes,
focusTracker: this.focusTracker,
gridItems: this.tiles,
numberOfColumns: () => global.window
.getComputedStyle(this.element.firstChild) // Responsive .ck-character-grid__tiles
.getPropertyValue('grid-template-columns')
.split(' ')
.length,
uiLanguageDirection: this.locale && this.locale.uiLanguageDirection
});
/**
* Fired when any of {@link #tiles grid tiles} is clicked.
*
* @event execute
* @param {Object} data Additional information about the event.
* @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
* @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
*/
/**
* Fired when a mouse or another pointing device caused the cursor to move onto any {@link #tiles grid tile}
* (similar to the native `mouseover` DOM event).
*
* @event tileHover
* @param {Object} data Additional information about the event.
* @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
* @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
*/
/**
* Fired when {@link #tiles grid tile} is focused (e.g. by navigating with arrow keys).
*
* @event tileFocus
* @param {Object} data Additional information about the event.
* @param {String} data.name The name of the tile that caused the event (e.g. "greek small letter epsilon").
* @param {String} data.character A human-readable character displayed as the label (e.g. "ε").
*/
}
/**
* Creates a new tile for the grid.
*
* @param character A human-readable character displayed as the label (e.g. "ε").
* @param name The name of the character (e.g. "greek small letter epsilon").
*/
createTile(character, name) {
const tile = new ButtonView(this.locale);
tile.set({
label: character,
withText: true,
class: 'ck-character-grid__tile'
});
// Labels are vital for the users to understand what character they're looking at.
// For now we're using native title attribute for that, see #5817.
tile.extendTemplate({
attributes: {
title: name
},
on: {
mouseover: tile.bindTemplate.to('mouseover'),
focus: tile.bindTemplate.to('focus')
}
});
tile.on('mouseover', () => {
this.fire('tileHover', { name, character });
});
tile.on('focus', () => {
this.fire('tileFocus', { name, character });
});
tile.on('execute', () => {
this.fire('execute', { name, character });
});
return tile;
}
/**
* @inheritDoc
*/
render() {
super.render();
for (const item of this.tiles) {
this.focusTracker.add(item.element);
}
this.tiles.on('change', (eventInfo, { added, removed }) => {
if (added.length > 0) {
for (const item of added) {
this.focusTracker.add(item.element);
}
}
if (removed.length > 0) {
for (const item of removed) {
this.focusTracker.remove(item.element);
}
}
});
this.keystrokes.listenTo(this.element);
}
/**
* @inheritDoc
*/
destroy() {
super.destroy();
this.keystrokes.destroy();
}
/**
* Focuses the first focusable in {@link #tiles}.
*/
focus() {
this.tiles.first.focus();
}
}

@@ -5,108 +5,68 @@ /**

*/
/**
* @module special-characters/ui/characterinfoview
*/
import { View } from 'ckeditor5/src/ui';
import '../../theme/characterinfo.css';
/**
* The view displaying detailed information about a special character glyph, e.g. upon
* hovering it with a mouse.
*
* @extends module:ui/view~View
*/
export default class CharacterInfoView extends View {
constructor( locale ) {
super( locale );
const bind = this.bindTemplate;
/**
* The character whose information is displayed by the view. For instance,
* "∑" or "¿".
*
* @observable
* @member {String|null} #character
*/
this.set( 'character', null );
/**
* The name of the {@link #character}. For instance,
* "N-ary summation" or "Inverted question mark".
*
* @observable
* @member {String|null} #name
*/
this.set( 'name', null );
/**
* The "Unicode string" of the {@link #character}. For instance,
* "U+0061".
*
* @observable
* @readonly
* @member {String} #code
*/
this.bind( 'code' ).to( this, 'character', characterToUnicodeString );
this.setTemplate( {
tag: 'div',
children: [
{
tag: 'span',
attributes: {
class: [
'ck-character-info__name'
]
},
children: [
{
// Note: ZWSP to prevent vertical collapsing.
text: bind.to( 'name', name => name ? name : '\u200B' )
}
]
},
{
tag: 'span',
attributes: {
class: [
'ck-character-info__code'
]
},
children: [
{
text: bind.to( 'code' )
}
]
}
],
attributes: {
class: [
'ck',
'ck-character-info'
]
}
} );
}
constructor(locale) {
super(locale);
const bind = this.bindTemplate;
this.set('character', null);
this.set('name', null);
this.bind('code').to(this, 'character', characterToUnicodeString);
this.setTemplate({
tag: 'div',
children: [
{
tag: 'span',
attributes: {
class: [
'ck-character-info__name'
]
},
children: [
{
// Note: ZWSP to prevent vertical collapsing.
text: bind.to('name', name => name ? name : '\u200B')
}
]
},
{
tag: 'span',
attributes: {
class: [
'ck-character-info__code'
]
},
children: [
{
text: bind.to('code')
}
]
}
],
attributes: {
class: [
'ck',
'ck-character-info'
]
}
});
}
}
// Converts a character into a "Unicode string", for instance:
//
// "$" -> "U+0024"
//
// Returns an empty string when the character is `null`.
//
// @param {String} character
// @returns {String}
function characterToUnicodeString( character ) {
if ( character === null ) {
return '';
}
const hexCode = character.codePointAt( 0 ).toString( 16 );
return 'U+' + ( '0000' + hexCode ).slice( -4 );
/**
* Converts a character into a "Unicode string", for instance:
*
* "$" -> "U+0024"
*
* Returns an empty string when the character is `null`.
*/
function characterToUnicodeString(character) {
if (character === null) {
return '';
}
const hexCode = character.codePointAt(0).toString(16);
return 'U+' + ('0000' + hexCode).slice(-4);
}

@@ -5,132 +5,85 @@ /**

*/
/**
* @module special-characters/ui/specialcharactersnavigationview
*/
import { Collection } from 'ckeditor5/src/utils';
import { Model, FormHeaderView, createDropdown, addListToDropdown } from 'ckeditor5/src/ui';
import { addListToDropdown, createDropdown, Model, FormHeaderView } from 'ckeditor5/src/ui';
/**
* A class representing the navigation part of the special characters UI. It is responsible
* for describing the feature and allowing the user to select a particular character group.
*
* @extends module:ui/formheader/formheaderview~FormHeaderView
*/
export default class SpecialCharactersNavigationView extends FormHeaderView {
/**
* Creates an instance of the {@link module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}
* class.
*
* @param {module:utils/locale~Locale} locale The localization services instance.
* @param {Map.<String, String>} groupNames The names of the character groups and their displayed labels.
*/
constructor( locale, groupNames ) {
super( locale );
const t = locale.t;
this.set( 'class', 'ck-special-characters-navigation' );
/**
* A dropdown that allows selecting a group of special characters to be displayed.
*
* @member {module:ui/dropdown/dropdownview~DropdownView}
*/
this.groupDropdownView = this._createGroupDropdown( groupNames );
this.groupDropdownView.panelPosition = locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';
/**
* @inheritDoc
*/
this.label = t( 'Special characters' );
/**
* @inheritDoc
*/
this.children.add( this.groupDropdownView );
}
/**
* Returns the name of the character group currently selected in the {@link #groupDropdownView}.
*
* @type {String}
*/
get currentGroupName() {
return this.groupDropdownView.value;
}
/**
* Focuses the character categories dropdown.
*/
focus() {
this.groupDropdownView.focus();
}
/**
* Returns a dropdown that allows selecting character groups.
*
* @private
* @param {Map.<String, String>} groupNames The names of the character groups and their displayed labels.
* @returns {module:ui/dropdown/dropdownview~DropdownView}
*/
_createGroupDropdown( groupNames ) {
const locale = this.locale;
const t = locale.t;
const dropdown = createDropdown( locale );
const groupDefinitions = this._getCharacterGroupListItemDefinitions( dropdown, groupNames );
dropdown.set( 'value', groupDefinitions.first.model.name );
dropdown.buttonView.bind( 'label' ).to( dropdown, 'value', value => groupNames.get( value ) );
dropdown.buttonView.set( {
isOn: false,
withText: true,
tooltip: t( 'Character categories' ),
class: [ 'ck-dropdown__button_label-width_auto' ]
} );
dropdown.on( 'execute', evt => {
dropdown.value = evt.source.name;
} );
dropdown.delegate( 'execute' ).to( this );
addListToDropdown( dropdown, groupDefinitions );
return dropdown;
}
/**
* Returns list item definitions to be used in the character group dropdown
* representing specific character groups.
*
* @private
* @param {module:ui/dropdown/dropdownview~DropdownView} dropdown
* @param {Map.<String, String>} groupNames The names of the character groups and their displayed labels.
* @returns {Iterable.<module:ui/dropdown/utils~ListDropdownItemDefinition>}
*/
_getCharacterGroupListItemDefinitions( dropdown, groupNames ) {
const groupDefs = new Collection();
for ( const [ name, label ] of groupNames ) {
const definition = {
type: 'button',
model: new Model( {
name,
label,
withText: true
} )
};
definition.model.bind( 'isOn' ).to( dropdown, 'value', value => {
return value === definition.model.name;
} );
groupDefs.add( definition );
}
return groupDefs;
}
/**
* Creates an instance of the {@link module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}
* class.
*
* @param locale The localization services instance.
* @param groupNames The names of the character groups and their displayed labels.
*/
constructor(locale, groupNames) {
super(locale);
const t = locale.t;
this.set('class', 'ck-special-characters-navigation');
this.groupDropdownView = this._createGroupDropdown(groupNames);
this.groupDropdownView.panelPosition = locale.uiLanguageDirection === 'rtl' ? 'se' : 'sw';
this.label = t('Special characters');
this.children.add(this.groupDropdownView);
}
/**
* Returns the name of the character group currently selected in the {@link #groupDropdownView}.
*/
get currentGroupName() {
return this.groupDropdownView.value;
}
/**
* Focuses the character categories dropdown.
*/
focus() {
this.groupDropdownView.focus();
}
/**
* Returns a dropdown that allows selecting character groups.
*
* @param groupNames The names of the character groups and their displayed labels.
*/
_createGroupDropdown(groupNames) {
const locale = this.locale;
const t = locale.t;
const dropdown = createDropdown(locale);
const groupDefinitions = this._getCharacterGroupListItemDefinitions(dropdown, groupNames);
dropdown.set('value', groupDefinitions.first.model.name);
dropdown.buttonView.bind('label').to(dropdown, 'value', value => groupNames.get(value));
dropdown.buttonView.set({
isOn: false,
withText: true,
tooltip: t('Character categories'),
class: ['ck-dropdown__button_label-width_auto']
});
dropdown.on('execute', evt => {
dropdown.value = evt.source.name;
});
dropdown.delegate('execute').to(this);
addListToDropdown(dropdown, groupDefinitions);
return dropdown;
}
/**
* Returns list item definitions to be used in the character group dropdown
* representing specific character groups.
*
* @param dropdown Dropdown view element
* @param groupNames The names of the character groups and their displayed labels.
*/
_getCharacterGroupListItemDefinitions(dropdown, groupNames) {
const groupDefs = new Collection();
for (const [name, label] of groupNames) {
const model = new Model({
name,
label,
withText: true
});
model.bind('isOn').to(dropdown, 'value', value => value === model.name);
groupDefs.add({ type: 'button', model });
}
return groupDefs;
}
}

@@ -5,10 +5,7 @@ /**

*/
/**
* @module special-characters/ui/specialcharactersview
*/
import { View, FocusCycler } from 'ckeditor5/src/ui';
import { FocusTracker, KeystrokeHandler } from 'ckeditor5/src/utils';
/**

@@ -20,126 +17,64 @@ * A view that glues pieces of the special characters dropdown panel together:

* * and the info view (displays detailed info about a specific character).
*
* @extends module:ui/view~View
*/
export default class SpecialCharactersView extends View {
/**
* Creates an instance of the `SpecialCharactersView`.
*
* @param {module:utils/locale~Locale} locale The localization services instance.
* @param {module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView} navigationView
* @param {module:special-characters/ui/charactergridview~CharacterGridView} gridView
* @param {module:special-characters/ui/characterinfoview~CharacterInfoView} infoView
*/
constructor( locale, navigationView, gridView, infoView ) {
super( locale );
/**
* A collection of the focusable children of the view.
*
* @readonly
* @member {module:ui/viewcollection~ViewCollection}
*/
this.items = this.createCollection();
/**
* Tracks information about the DOM focus in the view.
*
* @readonly
* @member {module:utils/focustracker~FocusTracker}
*/
this.focusTracker = new FocusTracker();
/**
* An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
*
* @readonly
* @member {module:utils/keystrokehandler~KeystrokeHandler}
*/
this.keystrokes = new KeystrokeHandler();
/**
* Helps cycling over focusable {@link #items} in the view.
*
* @readonly
* @protected
* @member {module:ui/focuscycler~FocusCycler}
*/
this._focusCycler = new FocusCycler( {
focusables: this.items,
focusTracker: this.focusTracker,
keystrokeHandler: this.keystrokes,
actions: {
focusPrevious: 'shift + tab',
focusNext: 'tab'
}
} );
/**
* An instance of the `SpecialCharactersNavigationView`.
*
* @member {module:special-characters/ui/specialcharactersnavigationview~SpecialCharactersNavigationView}
*/
this.navigationView = navigationView;
/**
* An instance of the `CharacterGridView`.
*
* @member {module:special-characters/ui/charactergridview~CharacterGridView}
*/
this.gridView = gridView;
/**
* An instance of the `CharacterInfoView`.
*
* @member {module:special-characters/ui/characterinfoview~CharacterInfoView}
*/
this.infoView = infoView;
this.setTemplate( {
tag: 'div',
children: [
this.navigationView,
this.gridView,
this.infoView
],
attributes: {
// Avoid focus loss when the user clicks the area of the grid that is not a button.
// https://github.com/ckeditor/ckeditor5/pull/12319#issuecomment-1231779819
tabindex: '-1'
}
} );
this.items.add( this.navigationView.groupDropdownView.buttonView );
this.items.add( this.gridView );
}
/**
* @inheritDoc
*/
render() {
super.render();
this.focusTracker.add( this.navigationView.groupDropdownView.buttonView.element );
this.focusTracker.add( this.gridView.element );
// Start listening for the keystrokes coming from #element.
this.keystrokes.listenTo( this.element );
}
/**
* @inheritDoc
*/
destroy() {
super.destroy();
this.focusTracker.destroy();
this.keystrokes.destroy();
}
/**
* Focuses the first focusable in {@link #items}.
*/
focus() {
this.navigationView.focus();
}
/**
* Creates an instance of the `SpecialCharactersView`.
*/
constructor(locale, navigationView, gridView, infoView) {
super(locale);
this.navigationView = navigationView;
this.gridView = gridView;
this.infoView = infoView;
this.items = this.createCollection();
this.focusTracker = new FocusTracker();
this.keystrokes = new KeystrokeHandler();
this._focusCycler = new FocusCycler({
focusables: this.items,
focusTracker: this.focusTracker,
keystrokeHandler: this.keystrokes,
actions: {
focusPrevious: 'shift + tab',
focusNext: 'tab'
}
});
this.setTemplate({
tag: 'div',
children: [
this.navigationView,
this.gridView,
this.infoView
],
attributes: {
// Avoid focus loss when the user clicks the area of the grid that is not a button.
// https://github.com/ckeditor/ckeditor5/pull/12319#issuecomment-1231779819
tabindex: '-1'
}
});
this.items.add(this.navigationView.groupDropdownView.buttonView);
this.items.add(this.gridView);
}
/**
* @inheritDoc
*/
render() {
super.render();
this.focusTracker.add(this.navigationView.groupDropdownView.buttonView.element);
this.focusTracker.add(this.gridView.element);
// Start listening for the keystrokes coming from #element.
this.keystrokes.listenTo(this.element);
}
/**
* @inheritDoc
*/
destroy() {
super.destroy();
this.focusTracker.destroy();
this.keystrokes.destroy();
}
/**
* Focuses the first focusable in {@link #items}.
*/
focus() {
this.navigationView.focus();
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc