@ckeditor/ckeditor5-basic-styles 44.3.0 → 45.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/basic-styles.js +1 -1
- package/build/translations/be.js +1 -0
- package/ckeditor5-metadata.json +7 -7
- package/dist/index.js +9 -20
- package/dist/index.js.map +1 -1
- package/dist/translations/be.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- package/lang/translations/be.po +60 -0
- package/package.json +7 -6
- package/src/attributecommand.js +4 -0
- package/src/bold/boldui.js +3 -2
- package/src/code/codeui.js +2 -2
- package/src/italic/italicui.js +2 -2
- package/src/strikethrough/strikethroughui.js +2 -2
- package/src/subscript/subscriptui.js +2 -2
- package/src/superscript/superscriptui.js +2 -2
- package/src/underline/underlineui.js +2 -2
- package/theme/icons/code.svg +0 -1
- package/theme/icons/italic.svg +0 -1
- package/theme/icons/strikethrough.svg +0 -1
- package/theme/icons/subscript.svg +0 -1
- package/theme/icons/superscript.svg +0 -1
- package/theme/icons/underline.svg +0 -1
package/build/basic-styles.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={21:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}},51:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},128:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,i)=>{t.exports=i(237)("./src/ui.js")},591:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},o=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,d="".concat(l," ").concat(u);s[l]=u+1;var g=i(d),m={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==g)e[g].references++,e[g].updater(m);else{var p=r(m,n);n.byIndex=a,e.splice(a,0,{identifier:d,updater:p,references:1})}o.push(d)}return o}function r(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,r){var s=n(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=i(s[o]);e[a].references--}for(var c=n(t,r),l=0;l<s.length;l++){var u=i(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},598:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(758),r=i.n(n),s=i(935),o=i.n(s)()(r());o.push([t.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}",""]);const a=o},639:t=>{"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function n(t,e,n,r){var s;if(n)s="";else{s="",r.supports&&(s+="@supports (".concat(r.supports,") {")),r.media&&(s+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(s+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),s+=r.css,o&&(s+="}"),r.media&&(s+="}"),r.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var r={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=r.singletonCounter++,i=r.singleton||(r.singleton=t.insertStyleElement(t));return{update:function(t){n(i,e,!1,t)},remove:function(t){n(i,e,!0,t)}}}},758:t=>{"use strict";t.exports=function(t){return t[1]}},782:(t,e,i)=>{t.exports=i(237)("./src/core.js")},834:(t,e,i)=>{t.exports=i(237)("./src/typing.js")},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&o[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),e.push(u))}},e}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n),i.d(n,{AttributeCommand:()=>e,Bold:()=>u,BoldEditing:()=>s,BoldUI:()=>l,Code:()=>E,CodeEditing:()=>m,CodeUI:()=>A,Italic:()=>M,ItalicEditing:()=>T,ItalicUI:()=>N,Strikethrough:()=>K,StrikethroughEditing:()=>F,StrikethroughUI:()=>V,Subscript:()=>q,SubscriptEditing:()=>z,SubscriptUI:()=>j,Superscript:()=>G,SuperscriptEditing:()=>$,SuperscriptUI:()=>X,Underline:()=>Z,UnderlineEditing:()=>Q,UnderlineUI:()=>Y});var t=i(782);class e extends t.Command{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,i=e.document.selection,n=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(i.isCollapsed)n?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const r=e.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const e of r)n?t.setAttribute(this.attributeKey,n,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,i=t.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const t of i.getRanges())for(const i of t.getItems())if(e.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const r="bold";class s extends t.Plugin{static get pluginName(){return"BoldEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:r}),t.model.schema.setAttributeProperties(r,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:r,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e&&("bold"==e||Number(e)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(r,new e(t,r)),t.keystrokes.set("CTRL+B",r),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Bold text"),keystroke:"CTRL+B"}]})}}var o=i(311);function a({editor:t,commandName:e,plugin:i,icon:n,label:r,keystroke:s}){return a=>{const c=t.commands.get(e),l=new a(t.locale);return l.set({label:r,icon:n,keystroke:s,isToggleable:!0}),l.bind("isEnabled").to(c,"isEnabled"),l.bind("isOn").to(c,"value"),l instanceof o.MenuBarMenuListItemButtonView?l.set({role:"menuitemcheckbox"}):l.set({tooltip:!0}),i.listenTo(l,"execute",(()=>{t.execute(e),t.editing.view.focus()})),l}}const c="bold";class l extends t.Plugin{static get pluginName(){return"BoldUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,i=e.locale.t,n=a({editor:e,commandName:c,plugin:this,icon:t.icons.bold,label:i("Bold"),keystroke:"CTRL+B"});e.ui.componentFactory.add(c,(()=>n(o.ButtonView))),e.ui.componentFactory.add("menuBar:"+c,(()=>n(o.MenuBarMenuListItemButtonView)))}}class u extends t.Plugin{static get requires(){return[s,l]}static get pluginName(){return"Bold"}static get isOfficialPlugin(){return!0}}var d=i(834);const g="code";class m extends t.Plugin{static get pluginName(){return"CodeEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[d.TwoStepCaretMovement]}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:g}),t.model.schema.setAttributeProperties(g,{isFormatting:!0,copyOnEnter:!1}),t.conversion.attributeToElement({model:g,view:"code"}),t.commands.add(g,new e(t,g)),t.plugins.get(d.TwoStepCaretMovement).registerAttribute(g),(0,d.inlineHighlight)(t,g,"code","ck-code_selected"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}var p=i(591),h=i.n(p),f=i(639),b=i.n(f),v=i(128),y=i.n(v),w=i(21),x=i.n(w),k=i(51),I=i.n(k),P=i(598),S={attributes:{"data-cke":!0}};S.setAttributes=x(),S.insert=y().bind(null,"head"),S.domAPI=b(),S.insertStyleElement=I();h()(P.A,S);P.A&&P.A.locals&&P.A.locals;const B="code";class A extends t.Plugin{static get pluginName(){return"CodeUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=a({editor:t,commandName:B,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z"/></svg>',label:e("Code")});t.ui.componentFactory.add(B,(()=>i(o.ButtonView))),t.ui.componentFactory.add("menuBar:"+B,(()=>i(o.MenuBarMenuListItemButtonView)))}}class E extends t.Plugin{static get requires(){return[m,A]}static get pluginName(){return"Code"}static get isOfficialPlugin(){return!0}}const O="italic";class T extends t.Plugin{static get pluginName(){return"ItalicEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:O}),t.model.schema.setAttributeProperties(O,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:O,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(O,new e(t,O)),t.keystrokes.set("CTRL+I",O),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Italic text"),keystroke:"CTRL+I"}]})}}const C="italic";class N extends t.Plugin{static get pluginName(){return"ItalicUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=a({editor:t,commandName:C,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z"/></svg>',keystroke:"CTRL+I",label:e("Italic")});t.ui.componentFactory.add(C,(()=>i(o.ButtonView))),t.ui.componentFactory.add("menuBar:"+C,(()=>i(o.MenuBarMenuListItemButtonView)))}}class M extends t.Plugin{static get requires(){return[T,N]}static get pluginName(){return"Italic"}static get isOfficialPlugin(){return!0}}const L="strikethrough";class F extends t.Plugin{static get pluginName(){return"StrikethroughEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:L}),t.model.schema.setAttributeProperties(L,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:L,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add(L,new e(t,L)),t.keystrokes.set("CTRL+SHIFT+X","strikethrough"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const U="strikethrough";class V extends t.Plugin{static get pluginName(){return"StrikethroughUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=a({editor:t,commandName:U,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',keystroke:"CTRL+SHIFT+X",label:e("Strikethrough")});t.ui.componentFactory.add(U,(()=>i(o.ButtonView))),t.ui.componentFactory.add("menuBar:"+U,(()=>i(o.MenuBarMenuListItemButtonView)))}}class K extends t.Plugin{static get requires(){return[F,V]}static get pluginName(){return"Strikethrough"}static get isOfficialPlugin(){return!0}}const R="subscript";class z extends t.Plugin{static get pluginName(){return"SubscriptEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:R}),t.model.schema.setAttributeProperties(R,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:R,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),t.commands.add(R,new e(t,R))}}const _="subscript";class j extends t.Plugin{static get pluginName(){return"SubscriptUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=a({editor:t,commandName:_,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z"/></svg>',label:e("Subscript")});t.ui.componentFactory.add(_,(()=>i(o.ButtonView))),t.ui.componentFactory.add("menuBar:"+_,(()=>i(o.MenuBarMenuListItemButtonView)))}}class q extends t.Plugin{static get requires(){return[z,j]}static get pluginName(){return"Subscript"}static get isOfficialPlugin(){return!0}}const H="superscript";class $ extends t.Plugin{static get pluginName(){return"SuperscriptEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:H}),t.model.schema.setAttributeProperties(H,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:H,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),t.commands.add(H,new e(t,H))}}const D="superscript";class X extends t.Plugin{static get pluginName(){return"SuperscriptUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=a({editor:t,commandName:D,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z"/></svg>',label:e("Superscript")});t.ui.componentFactory.add(D,(()=>i(o.ButtonView))),t.ui.componentFactory.add("menuBar:"+D,(()=>i(o.MenuBarMenuListItemButtonView)))}}class G extends t.Plugin{static get requires(){return[$,X]}static get pluginName(){return"Superscript"}static get isOfficialPlugin(){return!0}}const J="underline";class Q extends t.Plugin{static get pluginName(){return"UnderlineEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:J}),t.model.schema.setAttributeProperties(J,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:J,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add(J,new e(t,J)),t.keystrokes.set("CTRL+U","underline"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Underline text"),keystroke:"CTRL+U"}]})}}const W="underline";class Y extends t.Plugin{static get pluginName(){return"UnderlineUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=a({editor:t,commandName:W,plugin:this,icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z"/></svg>',label:e("Underline"),keystroke:"CTRL+U"});t.ui.componentFactory.add(W,(()=>i(o.ButtonView))),t.ui.componentFactory.add("menuBar:"+W,(()=>i(o.MenuBarMenuListItemButtonView)))}}class Z extends t.Plugin{static get requires(){return[Q,Y]}static get pluginName(){return"Underline"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).basicStyles=n})();
|
|
5
|
+
*/(()=>{var t={21:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}},51:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},128:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,i)=>{t.exports=i(237)("./src/ui.js")},355:(t,e,i)=>{t.exports=i(237)("./src/icons.js")},591:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},o=[],a=0;a<t.length;a++){var c=t[a],u=n.base?c[0]+n.base:c[0],l=s[u]||0,d="".concat(u," ").concat(l);s[u]=l+1;var g=i(d),m={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==g)e[g].references++,e[g].updater(m);else{var p=r(m,n);n.byIndex=a,e.splice(a,0,{identifier:d,updater:p,references:1})}o.push(d)}return o}function r(t,e){var i=e.domAPI(e);i.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,r){var s=n(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=i(s[o]);e[a].references--}for(var c=n(t,r),u=0;u<s.length;u++){var l=i(s[u]);0===e[l].references&&(e[l].updater(),e.splice(l,1))}s=c}}},598:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(758),r=i.n(n),s=i(935),o=i.n(s)()(r());o.push([t.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}",""]);const a=o},639:t=>{"use strict";var e,i=(e=[],function(t,i){return e[t]=i,e.filter(Boolean).join("\n")});function n(t,e,n,r){var s;if(n)s="";else{s="",r.supports&&(s+="@supports (".concat(r.supports,") {")),r.media&&(s+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(s+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),s+=r.css,o&&(s+="}"),r.media&&(s+="}"),r.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=i(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var r={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=r.singletonCounter++,i=r.singleton||(r.singleton=t.insertStyleElement(t));return{update:function(t){n(i,e,!1,t)},remove:function(t){n(i,e,!0,t)}}}},758:t=>{"use strict";t.exports=function(t){return t[1]}},782:(t,e,i)=>{t.exports=i(237)("./src/core.js")},834:(t,e,i)=>{t.exports=i(237)("./src/typing.js")},935:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,r,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(o[c]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);n&&o[l[0]]||(void 0!==s&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=s),i&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=i):l[2]=i),r&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=r):l[4]="".concat(r)),e.push(l))}},e}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";i.r(n),i.d(n,{AttributeCommand:()=>e,Bold:()=>d,BoldEditing:()=>s,BoldUI:()=>l,Code:()=>O,CodeEditing:()=>p,CodeUI:()=>E,Italic:()=>U,ItalicEditing:()=>T,ItalicUI:()=>F,Strikethrough:()=>R,StrikethroughEditing:()=>L,StrikethroughUI:()=>V,Subscript:()=>H,SubscriptEditing:()=>_,SubscriptUI:()=>$,Superscript:()=>J,SuperscriptEditing:()=>X,SuperscriptUI:()=>G,Underline:()=>tt,UnderlineEditing:()=>W,UnderlineUI:()=>Z});var t=i(782);class e extends t.Command{attributeKey;constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,i=e.document.selection,n=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(i.isCollapsed)n?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const r=e.schema.getValidRanges(i.getRanges(),this.attributeKey);for(const e of r)n?t.setAttribute(this.attributeKey,n,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,i=t.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const t of i.getRanges())for(const i of t.getItems())if(e.checkAttribute(i,this.attributeKey))return i.hasAttribute(this.attributeKey);return!1}}const r="bold";class s extends t.Plugin{static get pluginName(){return"BoldEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:r}),t.model.schema.setAttributeProperties(r,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:r,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e&&("bold"==e||Number(e)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(r,new e(t,r)),t.keystrokes.set("CTRL+B",r),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Bold text"),keystroke:"CTRL+B"}]})}}var o=i(355),a=i(311);function c({editor:t,commandName:e,plugin:i,icon:n,label:r,keystroke:s}){return o=>{const c=t.commands.get(e),u=new o(t.locale);return u.set({label:r,icon:n,keystroke:s,isToggleable:!0}),u.bind("isEnabled").to(c,"isEnabled"),u.bind("isOn").to(c,"value"),u instanceof a.MenuBarMenuListItemButtonView?u.set({role:"menuitemcheckbox"}):u.set({tooltip:!0}),i.listenTo(u,"execute",(()=>{t.execute(e),t.editing.view.focus()})),u}}const u="bold";class l extends t.Plugin{static get pluginName(){return"BoldUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:u,plugin:this,icon:o.IconBold,label:e("Bold"),keystroke:"CTRL+B"});t.ui.componentFactory.add(u,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+u,(()=>i(a.MenuBarMenuListItemButtonView)))}}class d extends t.Plugin{static get requires(){return[s,l]}static get pluginName(){return"Bold"}static get isOfficialPlugin(){return!0}}var g=i(834);const m="code";class p extends t.Plugin{static get pluginName(){return"CodeEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[g.TwoStepCaretMovement]}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:m}),t.model.schema.setAttributeProperties(m,{isFormatting:!0,copyOnEnter:!1}),t.conversion.attributeToElement({model:m,view:"code"}),t.commands.add(m,new e(t,m)),t.plugins.get(g.TwoStepCaretMovement).registerAttribute(m),(0,g.inlineHighlight)(t,m,"code","ck-code_selected"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}var h=i(591),f=i.n(h),b=i(639),y=i.n(b),v=i(128),k=i.n(v),x=i(21),I=i.n(x),w=i(51),S=i.n(w),P=i(598),B={attributes:{"data-cke":!0}};B.setAttributes=I(),B.insert=k().bind(null,"head"),B.domAPI=y(),B.insertStyleElement=S();f()(P.A,B);P.A&&P.A.locals&&P.A.locals;const A="code";class E extends t.Plugin{static get pluginName(){return"CodeUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:A,plugin:this,icon:o.IconCode,label:e("Code")});t.ui.componentFactory.add(A,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+A,(()=>i(a.MenuBarMenuListItemButtonView)))}}class O extends t.Plugin{static get requires(){return[p,E]}static get pluginName(){return"Code"}static get isOfficialPlugin(){return!0}}const C="italic";class T extends t.Plugin{static get pluginName(){return"ItalicEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:C}),t.model.schema.setAttributeProperties(C,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:C,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(C,new e(t,C)),t.keystrokes.set("CTRL+I",C),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Italic text"),keystroke:"CTRL+I"}]})}}const N="italic";class F extends t.Plugin{static get pluginName(){return"ItalicUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:N,plugin:this,icon:o.IconItalic,keystroke:"CTRL+I",label:e("Italic")});t.ui.componentFactory.add(N,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+N,(()=>i(a.MenuBarMenuListItemButtonView)))}}class U extends t.Plugin{static get requires(){return[T,F]}static get pluginName(){return"Italic"}static get isOfficialPlugin(){return!0}}const M="strikethrough";class L extends t.Plugin{static get pluginName(){return"StrikethroughEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:M}),t.model.schema.setAttributeProperties(M,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:M,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),t.commands.add(M,new e(t,M)),t.keystrokes.set("CTRL+SHIFT+X","strikethrough"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const K="strikethrough";class V extends t.Plugin{static get pluginName(){return"StrikethroughUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:K,plugin:this,icon:o.IconStrikethrough,keystroke:"CTRL+SHIFT+X",label:e("Strikethrough")});t.ui.componentFactory.add(K,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+K,(()=>i(a.MenuBarMenuListItemButtonView)))}}class R extends t.Plugin{static get requires(){return[L,V]}static get pluginName(){return"Strikethrough"}static get isOfficialPlugin(){return!0}}const j="subscript";class _ extends t.Plugin{static get pluginName(){return"SubscriptEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:j}),t.model.schema.setAttributeProperties(j,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:j,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),t.commands.add(j,new e(t,j))}}const q="subscript";class $ extends t.Plugin{static get pluginName(){return"SubscriptUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:q,plugin:this,icon:o.IconSubscript,label:e("Subscript")});t.ui.componentFactory.add(q,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+q,(()=>i(a.MenuBarMenuListItemButtonView)))}}class H extends t.Plugin{static get requires(){return[_,$]}static get pluginName(){return"Subscript"}static get isOfficialPlugin(){return!0}}const D="superscript";class X extends t.Plugin{static get pluginName(){return"SuperscriptEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:D}),t.model.schema.setAttributeProperties(D,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:D,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),t.commands.add(D,new e(t,D))}}const z="superscript";class G extends t.Plugin{static get pluginName(){return"SuperscriptUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:z,plugin:this,icon:o.IconSuperscript,label:e("Superscript")});t.ui.componentFactory.add(z,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+z,(()=>i(a.MenuBarMenuListItemButtonView)))}}class J extends t.Plugin{static get requires(){return[X,G]}static get pluginName(){return"Superscript"}static get isOfficialPlugin(){return!0}}const Q="underline";class W extends t.Plugin{static get pluginName(){return"UnderlineEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,i=this.editor.t;t.model.schema.extend("$text",{allowAttributes:Q}),t.model.schema.setAttributeProperties(Q,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Q,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),t.commands.add(Q,new e(t,Q)),t.keystrokes.set("CTRL+U","underline"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:i("Underline text"),keystroke:"CTRL+U"}]})}}const Y="underline";class Z extends t.Plugin{static get pluginName(){return"UnderlineUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor,e=t.locale.t,i=c({editor:t,commandName:Y,plugin:this,icon:o.IconUnderline,label:e("Underline"),keystroke:"CTRL+U"});t.ui.componentFactory.add(Y,(()=>i(a.ButtonView))),t.ui.componentFactory.add("menuBar:"+Y,(()=>i(a.MenuBarMenuListItemButtonView)))}}class tt extends t.Plugin{static get requires(){return[W,Z]}static get pluginName(){return"Underline"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).basicStyles=n})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){const e=t.be=t.be||{};e.dictionary=Object.assign(e.dictionary||{},{Bold:"Тоўсты","Bold text":"Тоўсты тэкст",Code:"Код",Italic:"Курсіў","Italic text":"Текст курсівам","Move out of an inline code style":"Выйсці з убудаванага сцілю",Strikethrough:"Перакрэслены","Strikethrough text":"Перакрэслены тэкст",Subscript:"Ніжні індэкс",Superscript:"Верхні індэкс",Underline:"Падкрэслены","Underline text":"Падкрэслены тэкст"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
package/ckeditor5-metadata.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{
|
|
11
11
|
"type": "Button",
|
|
12
12
|
"name": "bold",
|
|
13
|
-
"iconPath": "@ckeditor/ckeditor5-
|
|
13
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/bold.svg"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"htmlOutput": [
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
{
|
|
30
30
|
"type": "Button",
|
|
31
31
|
"name": "code",
|
|
32
|
-
"iconPath": "theme/icons/code.svg"
|
|
32
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/code.svg"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
35
|
"htmlOutput": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
{
|
|
49
49
|
"type": "Button",
|
|
50
50
|
"name": "italic",
|
|
51
|
-
"iconPath": "theme/icons/italic.svg"
|
|
51
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/italic.svg"
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"htmlOutput": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
{
|
|
68
68
|
"type": "Button",
|
|
69
69
|
"name": "strikethrough",
|
|
70
|
-
"iconPath": "theme/icons/strikethrough.svg"
|
|
70
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/strikethrough.svg"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
73
|
"htmlOutput": [
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
{
|
|
87
87
|
"type": "Button",
|
|
88
88
|
"name": "subscript",
|
|
89
|
-
"iconPath": "theme/icons/subscript.svg"
|
|
89
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/subscript.svg"
|
|
90
90
|
}
|
|
91
91
|
],
|
|
92
92
|
"htmlOutput": [
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
{
|
|
106
106
|
"type": "Button",
|
|
107
107
|
"name": "superscript",
|
|
108
|
-
"iconPath": "theme/icons/superscript.svg"
|
|
108
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/superscript.svg"
|
|
109
109
|
}
|
|
110
110
|
],
|
|
111
111
|
"htmlOutput": [
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
{
|
|
125
125
|
"type": "Button",
|
|
126
126
|
"name": "underline",
|
|
127
|
-
"iconPath": "theme/icons/underline.svg"
|
|
127
|
+
"iconPath": "@ckeditor/ckeditor5-icons/theme/icons/underline.svg"
|
|
128
128
|
}
|
|
129
129
|
],
|
|
130
130
|
"htmlOutput": [
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
import { Command, Plugin
|
|
5
|
+
import { Command, Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
|
|
6
|
+
import { IconBold, IconCode, IconItalic, IconStrikethrough, IconSubscript, IconSuperscript, IconUnderline } from '@ckeditor/ckeditor5-icons/dist/index.js';
|
|
6
7
|
import { MenuBarMenuListItemButtonView, ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
|
7
8
|
import { TwoStepCaretMovement, inlineHighlight } from '@ckeditor/ckeditor5-typing/dist/index.js';
|
|
8
9
|
|
|
@@ -224,7 +225,7 @@ const BOLD = 'bold';
|
|
|
224
225
|
editor,
|
|
225
226
|
commandName: BOLD,
|
|
226
227
|
plugin: this,
|
|
227
|
-
icon:
|
|
228
|
+
icon: IconBold,
|
|
228
229
|
label: t('Bold'),
|
|
229
230
|
keystroke: 'CTRL+B'
|
|
230
231
|
});
|
|
@@ -332,8 +333,6 @@ const HIGHLIGHT_CLASS = 'ck-code_selected';
|
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
|
|
335
|
-
var codeIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1zm-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1z\"/></svg>";
|
|
336
|
-
|
|
337
336
|
const CODE = 'code';
|
|
338
337
|
/**
|
|
339
338
|
* The code UI feature. It introduces the Code button.
|
|
@@ -357,7 +356,7 @@ const CODE = 'code';
|
|
|
357
356
|
editor,
|
|
358
357
|
commandName: CODE,
|
|
359
358
|
plugin: this,
|
|
360
|
-
icon:
|
|
359
|
+
icon: IconCode,
|
|
361
360
|
label: t('Code')
|
|
362
361
|
});
|
|
363
362
|
// Add code button to feature components.
|
|
@@ -453,8 +452,6 @@ const ITALIC$1 = 'italic';
|
|
|
453
452
|
}
|
|
454
453
|
}
|
|
455
454
|
|
|
456
|
-
var italicIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m9.586 14.633.021.004c-.036.335.095.655.393.962.082.083.173.15.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15c.474-.07.809-.182 1.005-.334.157-.122.291-.32.404-.597l2.416-9.55a1.053 1.053 0 0 0-.281-.823 1.12 1.12 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195c-.376.056-.65.155-.823.296-.215.175-.423.439-.623.79l-2.366 9.347z\"/></svg>";
|
|
457
|
-
|
|
458
455
|
const ITALIC = 'italic';
|
|
459
456
|
/**
|
|
460
457
|
* The italic UI feature. It introduces the Italic button.
|
|
@@ -478,7 +475,7 @@ const ITALIC = 'italic';
|
|
|
478
475
|
editor,
|
|
479
476
|
commandName: ITALIC,
|
|
480
477
|
plugin: this,
|
|
481
|
-
icon:
|
|
478
|
+
icon: IconItalic,
|
|
482
479
|
keystroke: 'CTRL+I',
|
|
483
480
|
label: t('Italic')
|
|
484
481
|
});
|
|
@@ -577,8 +574,6 @@ const STRIKETHROUGH$1 = 'strikethrough';
|
|
|
577
574
|
}
|
|
578
575
|
}
|
|
579
576
|
|
|
580
|
-
var strikethroughIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6zM6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z\"/><path d=\"M3 10.5V9h14v1.5z\"/></svg>";
|
|
581
|
-
|
|
582
577
|
const STRIKETHROUGH = 'strikethrough';
|
|
583
578
|
/**
|
|
584
579
|
* The strikethrough UI feature. It introduces the Strikethrough button.
|
|
@@ -602,7 +597,7 @@ const STRIKETHROUGH = 'strikethrough';
|
|
|
602
597
|
editor,
|
|
603
598
|
commandName: STRIKETHROUGH,
|
|
604
599
|
plugin: this,
|
|
605
|
-
icon:
|
|
600
|
+
icon: IconStrikethrough,
|
|
606
601
|
keystroke: 'CTRL+SHIFT+X',
|
|
607
602
|
label: t('Strikethrough')
|
|
608
603
|
});
|
|
@@ -687,8 +682,6 @@ const SUBSCRIPT$1 = 'subscript';
|
|
|
687
682
|
}
|
|
688
683
|
}
|
|
689
684
|
|
|
690
|
-
var subscriptIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82zm8.147 7.829h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309z\"/></svg>";
|
|
691
|
-
|
|
692
685
|
const SUBSCRIPT = 'subscript';
|
|
693
686
|
/**
|
|
694
687
|
* The subscript UI feature. It introduces the Subscript button.
|
|
@@ -712,7 +705,7 @@ const SUBSCRIPT = 'subscript';
|
|
|
712
705
|
editor,
|
|
713
706
|
commandName: SUBSCRIPT,
|
|
714
707
|
plugin: this,
|
|
715
|
-
icon:
|
|
708
|
+
icon: IconSubscript,
|
|
716
709
|
label: t('Subscript')
|
|
717
710
|
});
|
|
718
711
|
// Add subscript button to feature components.
|
|
@@ -793,8 +786,6 @@ const SUPERSCRIPT$1 = 'superscript';
|
|
|
793
786
|
}
|
|
794
787
|
}
|
|
795
788
|
|
|
796
|
-
var superscriptIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M15.677 8.678h2.549c.254 0 .447.05.58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393c-.105.108-.266.162-.48.162h-3.594c-.245 0-.435-.066-.572-.197a.621.621 0 0 1-.205-.463c0-.114.044-.265.132-.453a1.62 1.62 0 0 1 .288-.444c.433-.436.824-.81 1.172-1.122.348-.312.597-.517.747-.615.267-.183.49-.368.667-.553.177-.185.312-.375.405-.57.093-.194.139-.384.139-.57a1.008 1.008 0 0 0-.554-.917 1.197 1.197 0 0 0-.56-.133c-.426 0-.761.182-1.005.546a2.332 2.332 0 0 0-.164.39 1.609 1.609 0 0 1-.258.488c-.096.114-.237.17-.423.17a.558.558 0 0 1-.405-.156.568.568 0 0 1-.161-.427c0-.218.05-.446.151-.683.101-.238.252-.453.452-.646s.454-.349.762-.467a2.998 2.998 0 0 1 1.081-.178c.498 0 .923.076 1.274.228a1.916 1.916 0 0 1 1.004 1.032 1.984 1.984 0 0 1-.156 1.794c-.2.32-.405.572-.613.754-.208.182-.558.468-1.048.857-.49.39-.826.691-1.008.906a2.703 2.703 0 0 0-.24.309zM7.03 10.349l3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53l3.818 3.82z\"/></svg>";
|
|
797
|
-
|
|
798
789
|
const SUPERSCRIPT = 'superscript';
|
|
799
790
|
/**
|
|
800
791
|
* The superscript UI feature. It introduces the Superscript button.
|
|
@@ -818,7 +809,7 @@ const SUPERSCRIPT = 'superscript';
|
|
|
818
809
|
editor,
|
|
819
810
|
commandName: SUPERSCRIPT,
|
|
820
811
|
plugin: this,
|
|
821
|
-
icon:
|
|
812
|
+
icon: IconSuperscript,
|
|
822
813
|
label: t('Superscript')
|
|
823
814
|
});
|
|
824
815
|
// Add superscript button to feature components.
|
|
@@ -908,8 +899,6 @@ const UNDERLINE$1 = 'underline';
|
|
|
908
899
|
}
|
|
909
900
|
}
|
|
910
901
|
|
|
911
|
-
var underlineIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8 1.9 0 3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4z\"/></svg>";
|
|
912
|
-
|
|
913
902
|
const UNDERLINE = 'underline';
|
|
914
903
|
/**
|
|
915
904
|
* The underline UI feature. It introduces the Underline button.
|
|
@@ -933,7 +922,7 @@ const UNDERLINE = 'underline';
|
|
|
933
922
|
editor,
|
|
934
923
|
commandName: UNDERLINE,
|
|
935
924
|
plugin: this,
|
|
936
|
-
icon:
|
|
925
|
+
icon: IconUnderline,
|
|
937
926
|
label: t('Underline'),
|
|
938
927
|
keystroke: 'CTRL+U'
|
|
939
928
|
});
|