@ckeditor/ckeditor5-source-editing 0.0.0-internal-20241017.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/LICENSE.md +17 -0
- package/README.md +26 -0
- package/build/source-editing.js +5 -0
- package/build/translations/ar.js +1 -0
- package/build/translations/bg.js +1 -0
- package/build/translations/bn.js +1 -0
- package/build/translations/ca.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fi.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/he.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/lt.js +1 -0
- package/build/translations/lv.js +1 -0
- package/build/translations/ms.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/pt.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/sv.js +1 -0
- package/build/translations/th.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/ur.js +1 -0
- package/build/translations/vi.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/ckeditor5-metadata.json +18 -0
- package/dist/augmentation.d.ts +22 -0
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +52 -0
- package/dist/index.css +88 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +606 -0
- package/dist/index.js.map +1 -0
- package/dist/sourceediting.d.ts +112 -0
- package/dist/sourceeditingconfig.d.ts +38 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +5 -0
- package/dist/translations/ar.umd.js +11 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +5 -0
- package/dist/translations/bg.umd.js +11 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +5 -0
- package/dist/translations/bn.umd.js +11 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +5 -0
- package/dist/translations/ca.umd.js +11 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +5 -0
- package/dist/translations/cs.umd.js +11 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +5 -0
- package/dist/translations/da.umd.js +11 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +5 -0
- package/dist/translations/de.umd.js +11 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +5 -0
- package/dist/translations/el.umd.js +11 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +5 -0
- package/dist/translations/en-au.umd.js +11 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +5 -0
- package/dist/translations/en.umd.js +11 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +5 -0
- package/dist/translations/es.umd.js +11 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +5 -0
- package/dist/translations/et.umd.js +11 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +5 -0
- package/dist/translations/fi.umd.js +11 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +5 -0
- package/dist/translations/fr.umd.js +11 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +5 -0
- package/dist/translations/gl.umd.js +11 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +5 -0
- package/dist/translations/he.umd.js +11 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +5 -0
- package/dist/translations/hi.umd.js +11 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +5 -0
- package/dist/translations/hr.umd.js +11 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +5 -0
- package/dist/translations/hu.umd.js +11 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +5 -0
- package/dist/translations/id.umd.js +11 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +5 -0
- package/dist/translations/it.umd.js +11 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +5 -0
- package/dist/translations/ja.umd.js +11 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +5 -0
- package/dist/translations/ko.umd.js +11 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +5 -0
- package/dist/translations/lt.umd.js +11 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +5 -0
- package/dist/translations/lv.umd.js +11 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +5 -0
- package/dist/translations/ms.umd.js +11 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +5 -0
- package/dist/translations/nl.umd.js +11 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +5 -0
- package/dist/translations/no.umd.js +11 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +5 -0
- package/dist/translations/pl.umd.js +11 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +5 -0
- package/dist/translations/pt-br.umd.js +11 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +5 -0
- package/dist/translations/pt.umd.js +11 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +5 -0
- package/dist/translations/ro.umd.js +11 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +5 -0
- package/dist/translations/ru.umd.js +11 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +5 -0
- package/dist/translations/sk.umd.js +11 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +5 -0
- package/dist/translations/sr-latn.umd.js +11 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +5 -0
- package/dist/translations/sr.umd.js +11 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +5 -0
- package/dist/translations/sv.umd.js +11 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +5 -0
- package/dist/translations/th.umd.js +11 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +5 -0
- package/dist/translations/tr.umd.js +11 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +5 -0
- package/dist/translations/ug.umd.js +11 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +5 -0
- package/dist/translations/uk.umd.js +11 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +5 -0
- package/dist/translations/ur.umd.js +11 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +5 -0
- package/dist/translations/vi.umd.js +11 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +5 -0
- package/dist/translations/zh-cn.umd.js +11 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +5 -0
- package/dist/translations/zh.umd.js +11 -0
- package/dist/utils/formathtml.d.ts +23 -0
- package/lang/contexts.json +4 -0
- package/lang/translations/ar.po +26 -0
- package/lang/translations/bg.po +26 -0
- package/lang/translations/bn.po +26 -0
- package/lang/translations/ca.po +26 -0
- package/lang/translations/cs.po +26 -0
- package/lang/translations/da.po +26 -0
- package/lang/translations/de.po +26 -0
- package/lang/translations/el.po +26 -0
- package/lang/translations/en-au.po +26 -0
- package/lang/translations/en.po +26 -0
- package/lang/translations/es.po +26 -0
- package/lang/translations/et.po +26 -0
- package/lang/translations/fi.po +26 -0
- package/lang/translations/fr.po +26 -0
- package/lang/translations/gl.po +26 -0
- package/lang/translations/he.po +26 -0
- package/lang/translations/hi.po +26 -0
- package/lang/translations/hr.po +26 -0
- package/lang/translations/hu.po +26 -0
- package/lang/translations/id.po +26 -0
- package/lang/translations/it.po +26 -0
- package/lang/translations/ja.po +26 -0
- package/lang/translations/ko.po +26 -0
- package/lang/translations/lt.po +26 -0
- package/lang/translations/lv.po +26 -0
- package/lang/translations/ms.po +26 -0
- package/lang/translations/nl.po +26 -0
- package/lang/translations/no.po +26 -0
- package/lang/translations/pl.po +26 -0
- package/lang/translations/pt-br.po +26 -0
- package/lang/translations/pt.po +26 -0
- package/lang/translations/ro.po +26 -0
- package/lang/translations/ru.po +26 -0
- package/lang/translations/sk.po +26 -0
- package/lang/translations/sr-latn.po +26 -0
- package/lang/translations/sr.po +26 -0
- package/lang/translations/sv.po +26 -0
- package/lang/translations/th.po +26 -0
- package/lang/translations/tr.po +26 -0
- package/lang/translations/ug.po +26 -0
- package/lang/translations/uk.po +26 -0
- package/lang/translations/ur.po +26 -0
- package/lang/translations/vi.po +26 -0
- package/lang/translations/zh-cn.po +26 -0
- package/lang/translations/zh.po +26 -0
- package/package.json +42 -0
- package/src/augmentation.d.ts +18 -0
- package/src/augmentation.js +5 -0
- package/src/index.d.ts +10 -0
- package/src/index.js +9 -0
- package/src/sourceediting.d.ts +108 -0
- package/src/sourceediting.js +359 -0
- package/src/sourceeditingconfig.d.ts +34 -0
- package/src/sourceeditingconfig.js +5 -0
- package/src/utils/formathtml.d.ts +19 -0
- package/src/utils/formathtml.js +153 -0
- package/theme/icons/source-editing.svg +1 -0
- package/theme/sourceediting.css +52 -0
package/CHANGELOG.md
ADDED
package/LICENSE.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
Software License Agreement
|
2
|
+
==========================
|
3
|
+
|
4
|
+
**CKEditor 5 source editing feature** – https://github.com/ckeditor/ckeditor5-source-editing <br>
|
5
|
+
Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
|
6
|
+
|
7
|
+
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
|
8
|
+
|
9
|
+
Sources of Intellectual Property Included in CKEditor
|
10
|
+
-----------------------------------------------------
|
11
|
+
|
12
|
+
Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
|
13
|
+
|
14
|
+
Trademarks
|
15
|
+
----------
|
16
|
+
|
17
|
+
**CKEditor** is a trademark of [CKSource Holding sp. z o.o.](https://cksource.com) All other brand and product names are trademarks, registered trademarks, or service marks of their respective holders.
|
package/README.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
CKEditor 5 source editing feature
|
2
|
+
=================================
|
3
|
+
|
4
|
+
[](https://www.npmjs.com/package/@ckeditor/ckeditor5-source-editing)
|
5
|
+
[](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
|
6
|
+
[](https://app.travis-ci.com/github/ckeditor/ckeditor5)
|
7
|
+
|
8
|
+
This package implements the source editing support for CKEditor 5 that allows you to view and edit the source of the document.
|
9
|
+
|
10
|
+
## Demo
|
11
|
+
|
12
|
+
Check out the [demo in the source editing feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html#demo).
|
13
|
+
|
14
|
+
## Documentation
|
15
|
+
|
16
|
+
See the [`@ckeditor/ckeditor5-source-editing` package](https://ckeditor.com/docs/ckeditor5/latest/api/source-editing.html) page as well as the [source editing feature](https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html) guide in the [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
```bash
|
21
|
+
npm install ckeditor5
|
22
|
+
```
|
23
|
+
|
24
|
+
## License
|
25
|
+
|
26
|
+
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
|
@@ -0,0 +1,5 @@
|
|
1
|
+
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Show source":"Show source",Source:"Source"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
|
2
|
+
/*!
|
3
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
4
|
+
* For licensing, see LICENSE.md.
|
5
|
+
*/(()=>{var e={896:(e,t,i)=>{"use strict";i.d(t,{A:()=>s});var o=i(758),n=i.n(o),r=i(935),a=i.n(r)()(n());a.push([e.id,'.ck-source-editing-area{overflow:hidden;position:relative}.ck-source-editing-area textarea,.ck-source-editing-area:after{border:1px solid transparent;font-family:monospace;font-size:var(--ck-font-size-normal);line-height:var(--ck-line-height-base);margin:0;padding:var(--ck-spacing-large);white-space:pre-wrap}.ck-source-editing-area:after{content:attr(data-value) " ";display:block;visibility:hidden}.ck-source-editing-area textarea{border-color:var(--ck-color-base-border);border-radius:0;box-sizing:border-box;height:100%;outline:none;overflow:hidden;position:absolute;resize:none;width:100%}.ck-rounded-corners .ck-source-editing-area textarea,.ck-source-editing-area textarea.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck-source-editing-area textarea:not([readonly]):focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}',""]);const s=a},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",o=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),o&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),o&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,o,n,r){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var d=this[s][0];null!=d&&(a[d]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);o&&a[l[0]]||(void 0!==r&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=r),i&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=i):l[2]=i),n&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=n):l[4]="".concat(n)),t.push(l))}},t}},758:e=>{"use strict";e.exports=function(e){return e[1]}},591:e=>{"use strict";var t=[];function i(e){for(var i=-1,o=0;o<t.length;o++)if(t[o].identifier===e){i=o;break}return i}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var d=e[s],c=o.base?d[0]+o.base:d[0],l=r[c]||0,u="".concat(c," ").concat(l);r[c]=l+1;var h=i(u),m={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(-1!==h)t[h].references++,t[h].updater(m);else{var g=n(m,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:g,references:1})}a.push(u)}return a}function n(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var r=o(e=e||[],n=n||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=i(r[a]);t[s].references--}for(var d=o(e,n),c=0;c<r.length;c++){var l=i(r[c]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}r=d}}},128:e=>{"use strict";var t={};e.exports=function(e,i){var o=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(i)}},51:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},21:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},639:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function o(e,t,o,n){var r;if(o)r="";else{r="",n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var a=void 0!==n.layer;a&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,a&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,r);else{var s=document.createTextNode(r),d=e.childNodes;d[t]&&e.removeChild(d[t]),d.length?e.insertBefore(s,d[t]):e.appendChild(s)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){o(i,t,!1,e)},remove:function(e){o(i,t,!0,e)}}}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},237:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={id:o,exports:{}};return e[o](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";i.r(o),i.d(o,{SourceEditing:()=>E});var e=i(782),t=i(311),n=i(584);function r(e){const t=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],i=t.map((e=>e.name)).join("|"),o=e.replace(new RegExp(`</?(${i})( .*?)?>`,"g"),"\n$&\n").replace(/<br[^>]*>/g,"$&\n").split("\n");let n=0,r=!1;return o.filter((e=>e.length)).map((e=>(r=function(e,t){return new RegExp("<pre( .*?)?>").test(e)?"first":new RegExp("</pre>").test(e)?"last":("first"===t||"middle"===t)&&"middle"}(e,r),function(e,t){return t.some((t=>!t.isVoid&&!!new RegExp(`<${t.name}( .*?)?>`).test(e)))}(e,t)?a(e,n++):function(e,t){return t.some((t=>new RegExp(`</${t.name}>`).test(e)))}(e,t)?a(e,--n):"middle"===r||"last"===r?e:a(e,n)))).join("\n")}function a(e,t,i=" "){return`${i.repeat(Math.max(0,t))}${e}`}var s=i(591),d=i.n(s),c=i(639),l=i.n(c),u=i(128),h=i.n(u),m=i(21),g=i.n(m),p=i(51),f=i.n(p),v=i(896),b={attributes:{"data-cke":!0}};b.setAttributes=g(),b.insert=h().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=f();d()(v.A,b);v.A&&v.A.locals&&v.A.locals;const w="SourceEditingMode";class E extends e.Plugin{static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[e.PendingActions]}constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new n.ElementReplacer,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}init(){this._checkCompatibility();const e=this.editor,i=e.locale.t;e.ui.componentFactory.add("sourceEditing",(()=>{const e=this._createButton(t.ButtonView);return e.set({label:i("Source"),icon:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.5 0 5 4.5v15.003h-16V0h11zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692L3 1.5z"/><path d="M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14l3.496-2.5zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22l-3.496 2.5zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0z"/></svg>',tooltip:!0,class:"ck-source-editing-button"}),e})),e.ui.componentFactory.add("menuBar:sourceEditing",(()=>{const e=this._createButton(t.MenuBarMenuListItemButtonView);return e.set({label:i("Show source"),role:"menuitemcheckbox"}),e})),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",((e,t,i)=>{i?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())})),this.on("change:isEnabled",((e,t,i)=>this._handleReadOnlyMode(!i))),this.listenTo(e,"change:isReadOnly",((e,t,i)=>this._handleReadOnlyMode(i)))),e.data.on("get",(()=>{this.isSourceEditingMode&&this.updateEditorData()}),{priority:"high"})}updateEditorData(){const e=this.editor,t={};for(const[e,i]of this._replacedRoots){const o=this._dataFromRoots.get(e),n=i.dataset.value;o!==n&&(t[e]=n,this._dataFromRoots.set(e,n))}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,t=e.config.get("sourceEditing.allowCollaborationFeatures");if(!t&&e.plugins.has("RealTimeCollaborativeEditing"))throw new n.CKEditorError("source-editing-incompatible-with-real-time-collaboration",null);!t&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some((t=>e.plugins.has(t)))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,i=e.model;i.change((e=>{e.setSelection(null),e.removeSelectionAttribute(i.document.selection.getAttributeKeys())}));for(const[i,o]of t.domRoots){const r=y(e.data.get({rootName:i})),a=(0,n.createElement)(o.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),s=(0,n.createElement)(o.ownerDocument,"div",{class:"ck-source-editing-area","data-value":r},[a]);a.value=r,a.setSelectionRange(0,0),a.addEventListener("input",(()=>{s.dataset.value=a.value,e.ui.update()})),t.change((e=>{const o=t.document.getRoot(i);e.addClass("ck-hidden",o)})),e.ui.setEditableElement("sourceEditing:"+i,a),this._replacedRoots.set(i,s),this._elementReplacer.replace(o,s),this._dataFromRoots.set(i,r)}this._focusSourceEditing()}_hideSourceEditing(){const e=this.editor.editing.view;this.updateEditorData(),e.change((t=>{for(const[i]of this._replacedRoots)t.removeClass("ck-hidden",e.document.getRoot(i))})),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),e.focus()}_focusSourceEditing(){const e=this.editor,[t]=this._replacedRoots.values(),i=t.querySelector("textarea");e.editing.view.document.isFocused=!1,i.focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled(w);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(w)}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled(w);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(w)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const e=this.editor.ui.view.editable;return e&&!e.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(t){const i=this.editor,o=new t(i.locale);return o.set({withText:!0,isToggleable:!0}),o.bind("isOn").to(this,"isSourceEditingMode"),o.bind("isEnabled").to(this,"isEnabled",i,"isReadOnly",i.plugins.get(e.PendingActions),"hasAny",((e,t,i)=>!!e&&(!t&&!i))),this.listenTo(o,"execute",(()=>{this.isSourceEditingMode=!this.isSourceEditingMode})),o}}function y(e){return function(e){return e.startsWith("<")}(e)?r(e):e}})(),(window.CKEditor5=window.CKEditor5||{}).sourceEditing=o})();
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ar=o.ar||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"إظهار المصدر",Source:"المصدر"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.bg=o.bg||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Показване на източника",Source:"Източник"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.bn=n.bn||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"উৎস দেখান",Source:"উৎস"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const n=o.ca=o.ca||{};n.dictionary=Object.assign(n.dictionary||{},{"Show source":"Mostrar la font",Source:"Font"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const c=o.cs=o.cs||{};c.dictionary=Object.assign(c.dictionary||{},{"Show source":"Zobrazit zdroj",Source:"Zdroj"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.da=i.da||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Vis kilde",Source:"Kilde"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e){const n=e.de=e.de||{};n.dictionary=Object.assign(n.dictionary||{},{"Show source":"Quelle anzeigen",Source:"Quellcode"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.el=o.el||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Εμφάνιση πηγής",Source:"Κώδικας"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n["en-au"]=n["en-au"]||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:"Source"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.es=n.es||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Mostrar fuente",Source:"Origen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.et=i.et||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Näita allikat",Source:"Allikas"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.fi=i.fi||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Näytä lähde",Source:"Lähde"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const c=o.fr=o.fr||{};c.dictionary=Object.assign(c.dictionary||{},{"Show source":"Afficher la source",Source:"Source"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.gl=o.gl||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Amosar a orixe",Source:"Orixe"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.he=o.he||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"הצג מקור",Source:"מקור"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.hi=i.hi||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"सोर्स दिखाएं",Source:"सोर्स"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.hr=o.hr||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:"Izvorni kod"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const n=o.hu=o.hu||{};n.dictionary=Object.assign(n.dictionary||{},{"Show source":"Forrás megjelenítése",Source:"Forrás"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.id=i.id||{};n.dictionary=Object.assign(n.dictionary||{},{"Show source":"Tampilkan sumber",Source:"Sumber"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.it=o.it||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Mostra sorgente",Source:"Sorgente"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ja=o.ja||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"ソースを表示",Source:"ソース"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ko=o.ko||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"소스 표시",Source:"소스"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const n=i.lt=i.lt||{};n.dictionary=Object.assign(n.dictionary||{},{"Show source":"Rodyti šaltinį",Source:"Šaltinis"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.lv=o.lv||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Rādīt avotu",Source:"Pirmavots"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.ms=n.ms||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Paparkan sumber",Source:"Sumber"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.nl=n.nl||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Bron tonen",Source:"Bron"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.no=i.no||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Vis kilde",Source:"Kilde"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.pl=o.pl||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Pokaż źródło",Source:"Źródło"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o["pt-br"]=o["pt-br"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Exibir fonte",Source:"Código-Fonte"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const n=o.pt=o.pt||{};n.dictionary=Object.assign(n.dictionary||{},{"Show source":"Mostrar fonte",Source:"Fonte"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ro=o.ro||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Afișare sursă",Source:"Sursă"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ru=o.ru||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Показать источник",Source:"HTML редактор"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.sk=o.sk||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Zobraziť zdroj",Source:"Zdroj"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n["sr-latn"]=n["sr-latn"]||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"",Source:"Izvor"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.sr=o.sr||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Pokaži izvor",Source:"Извор"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(i){const o=i.sv=i.sv||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Visa källa",Source:"Källa"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.th=o.th||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"แสดงที่มา",Source:"ซอร์ส"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const o=n.tr=n.tr||{};o.dictionary=Object.assign(o.dictionary||{},{"Show source":"Kaynağı göster",Source:"Kaynak"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ug=o.ug||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:"مەنبە"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.uk=o.uk||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Показати джерело",Source:"Джерело"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.ur=o.ur||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"",Source:"مآخذ"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const i=n.vi=n.vi||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"Hiển thị nguồn",Source:"Nguồn"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(n){const c=n["zh-cn"]=n["zh-cn"]||{};c.dictionary=Object.assign(c.dictionary||{},{"Show source":"显示源代码",Source:"源代码"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(o){const i=o.zh=o.zh||{};i.dictionary=Object.assign(i.dictionary||{},{"Show source":"顯示來源",Source:"原始碼"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"plugins": [
|
3
|
+
{
|
4
|
+
"name": "Source editing",
|
5
|
+
"className": "SourceEditing",
|
6
|
+
"description": "Allows for viewing and editing the source of the document.",
|
7
|
+
"docs": "features/source-editing.html",
|
8
|
+
"path": "src/sourceediting.js",
|
9
|
+
"uiComponents": [
|
10
|
+
{
|
11
|
+
"type": "Button",
|
12
|
+
"name": "sourceEditing",
|
13
|
+
"iconPath": "theme/icons/source-editing.svg"
|
14
|
+
}
|
15
|
+
]
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
import type { SourceEditing, SourceEditingConfig } from './index.js';
|
10
|
+
declare module '@ckeditor/ckeditor5-core' {
|
11
|
+
interface EditorConfig {
|
12
|
+
/**
|
13
|
+
* The configuration of the source editing feature.
|
14
|
+
*
|
15
|
+
* Read more in {@link module:source-editing/sourceeditingconfig~SourceEditingConfig}.
|
16
|
+
*/
|
17
|
+
sourceEditing?: SourceEditingConfig;
|
18
|
+
}
|
19
|
+
interface PluginsMap {
|
20
|
+
[SourceEditing.pluginName]: SourceEditing;
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
.ck-source-editing-area{
|
6
|
+
position:relative;
|
7
|
+
overflow:hidden;
|
8
|
+
}
|
9
|
+
|
10
|
+
.ck-source-editing-area::after,
|
11
|
+
.ck-source-editing-area textarea{
|
12
|
+
padding:var(--ck-spacing-large);
|
13
|
+
margin:0;
|
14
|
+
border:1px solid transparent;
|
15
|
+
line-height:var(--ck-line-height-base);
|
16
|
+
font-size:var(--ck-font-size-normal);
|
17
|
+
font-family:monospace;
|
18
|
+
white-space:pre-wrap;
|
19
|
+
}
|
20
|
+
|
21
|
+
.ck-source-editing-area::after{
|
22
|
+
content:attr(data-value) " ";
|
23
|
+
visibility:hidden;
|
24
|
+
display:block;
|
25
|
+
}
|
26
|
+
|
27
|
+
.ck-source-editing-area textarea{
|
28
|
+
position:absolute;
|
29
|
+
width:100%;
|
30
|
+
height:100%;
|
31
|
+
resize:none;
|
32
|
+
outline:none;
|
33
|
+
overflow:hidden;
|
34
|
+
box-sizing:border-box;
|
35
|
+
|
36
|
+
border-color:var(--ck-color-base-border);
|
37
|
+
|
38
|
+
border-radius:0;
|
39
|
+
}
|
40
|
+
|
41
|
+
.ck-rounded-corners .ck-source-editing-area textarea,
|
42
|
+
.ck-source-editing-area textarea.ck-rounded-corners{
|
43
|
+
border-radius:var(--ck-border-radius);
|
44
|
+
border-top-left-radius:0;
|
45
|
+
border-top-right-radius:0;
|
46
|
+
}
|
47
|
+
|
48
|
+
.ck-source-editing-area textarea:not([readonly]):focus{
|
49
|
+
outline:none;
|
50
|
+
border:var(--ck-focus-ring);
|
51
|
+
box-shadow:var(--ck-inner-shadow), 0 0;
|
52
|
+
}
|
package/dist/index.css
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/*
|
6
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
|
10
|
+
/*
|
11
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
12
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
13
|
+
*/
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Implements rounded corner interface for .ck-rounded-corners class.
|
17
|
+
*
|
18
|
+
* @see $ck-border-radius
|
19
|
+
*/
|
20
|
+
/*
|
21
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
22
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
23
|
+
*/
|
24
|
+
/**
|
25
|
+
* A visual style of focused element's border.
|
26
|
+
*/
|
27
|
+
/*
|
28
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
29
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
30
|
+
*/
|
31
|
+
/**
|
32
|
+
* A helper to combine multiple shadows.
|
33
|
+
*/
|
34
|
+
/**
|
35
|
+
* Gives an element a drop shadow so it looks like a floating panel.
|
36
|
+
*/
|
37
|
+
|
38
|
+
.ck-source-editing-area {
|
39
|
+
position: relative;
|
40
|
+
overflow: hidden;
|
41
|
+
}
|
42
|
+
|
43
|
+
.ck-source-editing-area::after,
|
44
|
+
.ck-source-editing-area textarea {
|
45
|
+
padding: var(--ck-spacing-large);
|
46
|
+
margin: 0;
|
47
|
+
border: 1px solid transparent;
|
48
|
+
line-height: var(--ck-line-height-base);
|
49
|
+
font-size: var(--ck-font-size-normal);
|
50
|
+
font-family: monospace;
|
51
|
+
white-space: pre-wrap;
|
52
|
+
}
|
53
|
+
|
54
|
+
.ck-source-editing-area::after {
|
55
|
+
content: attr(data-value) " ";
|
56
|
+
visibility: hidden;
|
57
|
+
display: block;
|
58
|
+
}
|
59
|
+
|
60
|
+
.ck-source-editing-area textarea {
|
61
|
+
position: absolute;
|
62
|
+
width: 100%;
|
63
|
+
height: 100%;
|
64
|
+
resize: none;
|
65
|
+
outline: none;
|
66
|
+
overflow: hidden;
|
67
|
+
box-sizing: border-box;
|
68
|
+
|
69
|
+
border-color: var(--ck-color-base-border);
|
70
|
+
|
71
|
+
border-radius: 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
.ck-rounded-corners .ck-source-editing-area textarea,
|
75
|
+
.ck-source-editing-area textarea.ck-rounded-corners {
|
76
|
+
border-radius: var(--ck-border-radius);
|
77
|
+
border-top-left-radius: 0;
|
78
|
+
border-top-right-radius: 0;
|
79
|
+
}
|
80
|
+
|
81
|
+
.ck-source-editing-area textarea:not([readonly]):focus {
|
82
|
+
/* Disable native outline. */
|
83
|
+
outline: none;
|
84
|
+
border: var(--ck-focus-ring);
|
85
|
+
box-shadow: var(--ck-inner-shadow), 0 0;
|
86
|
+
}
|
87
|
+
|
88
|
+
/*# sourceMappingURL=index.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../theme/sourceediting.css","index.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],"names":[],"mappings":";;;;AAAA,CAAA;ACCA,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ;AAC3E,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,QA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","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css\";\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css\";\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css\";\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) \" \";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&:not([readonly]):focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * A visual style of focused element's border.\n */\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) \" \";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\tborder-radius: 0;\n}\n\n.ck-rounded-corners .ck-source-editing-area textarea,\n\t.ck-source-editing-area textarea.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n.ck-source-editing-area textarea:not([readonly]):focus {\n\t\t/* Disable native outline. */\n\t\toutline: none;\n\t\tborder: var(--ck-focus-ring);\n\t\tbox-shadow: var(--ck-inner-shadow), 0 0;\n\t}\n\n/*# sourceMappingURL=index.css.map */","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t.ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"]}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
/**
|
10
|
+
* @module source-editing
|
11
|
+
*/
|
12
|
+
export { default as SourceEditing } from './sourceediting.js';
|
13
|
+
export type { SourceEditingConfig } from './sourceeditingconfig.js';
|
14
|
+
import './augmentation.js';
|