@ckeditor/ckeditor5-merge-fields 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 +18 -0
- package/README.md +36 -0
- package/build/merge-fields.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/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.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/uk.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 +26 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +232 -0
- package/dist/index.css +278 -0
- package/dist/index.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/ar.umd.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bg.umd.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bn.umd.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/ca.umd.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/cs.umd.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/da.umd.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/de.umd.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/el.umd.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/es.umd.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/et.umd.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fi.umd.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/fr.umd.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/gl.umd.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/he.umd.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hi.umd.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hr.umd.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/hu.umd.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/id.umd.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/it.umd.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/ja.umd.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/ko.umd.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lt.umd.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/lv.umd.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/ms.umd.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/nl.umd.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/no.umd.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pl.umd.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt-br.umd.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/pt.umd.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ro.umd.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/ru.umd.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sk.umd.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sr.umd.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/sv.umd.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/th.umd.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/tr.umd.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/uk.umd.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/vi.umd.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh-cn.umd.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/translations/zh.umd.js +23 -0
- package/lang/contexts.json +13 -0
- package/lang/translations/ar.po +62 -0
- package/lang/translations/bg.po +62 -0
- package/lang/translations/bn.po +62 -0
- package/lang/translations/ca.po +62 -0
- package/lang/translations/cs.po +62 -0
- package/lang/translations/da.po +62 -0
- package/lang/translations/de.po +62 -0
- package/lang/translations/el.po +62 -0
- package/lang/translations/en.po +62 -0
- package/lang/translations/es.po +62 -0
- package/lang/translations/et.po +62 -0
- package/lang/translations/fi.po +62 -0
- package/lang/translations/fr.po +62 -0
- package/lang/translations/gl.po +62 -0
- package/lang/translations/he.po +62 -0
- package/lang/translations/hi.po +62 -0
- package/lang/translations/hr.po +62 -0
- package/lang/translations/hu.po +62 -0
- package/lang/translations/id.po +62 -0
- package/lang/translations/it.po +62 -0
- package/lang/translations/ja.po +62 -0
- package/lang/translations/ko.po +62 -0
- package/lang/translations/lt.po +62 -0
- package/lang/translations/lv.po +62 -0
- package/lang/translations/ms.po +62 -0
- package/lang/translations/nl.po +62 -0
- package/lang/translations/no.po +62 -0
- package/lang/translations/pl.po +62 -0
- package/lang/translations/pt-br.po +62 -0
- package/lang/translations/pt.po +62 -0
- package/lang/translations/ro.po +62 -0
- package/lang/translations/ru.po +62 -0
- package/lang/translations/sk.po +62 -0
- package/lang/translations/sr.po +62 -0
- package/lang/translations/sv.po +62 -0
- package/lang/translations/th.po +62 -0
- package/lang/translations/tr.po +62 -0
- package/lang/translations/uk.po +62 -0
- package/lang/translations/vi.po +62 -0
- package/lang/translations/zh-cn.po +62 -0
- package/lang/translations/zh.po +62 -0
- package/package.json +39 -0
- package/src/augmentation.d.ts +25 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +12 -0
- package/src/index.js +23 -0
- package/src/insertmergefieldblockcommand.d.ts +28 -0
- package/src/insertmergefieldblockcommand.js +23 -0
- package/src/insertmergefieldcommand.d.ts +31 -0
- package/src/insertmergefieldcommand.js +23 -0
- package/src/mergefields.d.ts +36 -0
- package/src/mergefields.js +23 -0
- package/src/mergefieldsconfig.d.ts +241 -0
- package/src/mergefieldsconfig.js +23 -0
- package/src/mergefieldsediting.d.ts +113 -0
- package/src/mergefieldsediting.js +23 -0
- package/src/mergefieldsui.d.ts +46 -0
- package/src/mergefieldsui.js +23 -0
- package/src/previewmergefieldscommand.d.ts +43 -0
- package/src/previewmergefieldscommand.js +23 -0
- package/src/ui/mergefieldslistview.d.ts +22 -0
- package/src/ui/mergefieldslistview.js +23 -0
- package/src/ui/mergefieldspanelview.d.ts +16 -0
- package/src/ui/mergefieldspanelview.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/theme/icons/insert-merge-field.svg +7 -0
- package/theme/icons/preview-merge-fields.svg +8 -0
- package/theme/icons/warning.svg +3 -0
- package/theme/insert-dropdown.css +48 -0
- package/theme/mergefields.css +253 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x423fe3=_0x5220;(function(_0x57058a,_0x4313e0){const _0x44febb=_0x5220,_0x34987b=_0x57058a();while(!![]){try{const _0x340daa=-parseInt(_0x44febb(0x205))/0x1*(-parseInt(_0x44febb(0x1f6))/0x2)+parseInt(_0x44febb(0x202))/0x3*(parseInt(_0x44febb(0x209))/0x4)+parseInt(_0x44febb(0x1f7))/0x5*(-parseInt(_0x44febb(0x1fc))/0x6)+-parseInt(_0x44febb(0x1fe))/0x7+-parseInt(_0x44febb(0x201))/0x8*(-parseInt(_0x44febb(0x206))/0x9)+-parseInt(_0x44febb(0x1f1))/0xa+parseInt(_0x44febb(0x204))/0xb;if(_0x340daa===_0x4313e0)break;else _0x34987b['push'](_0x34987b['shift']());}catch(_0x327a5e){_0x34987b['push'](_0x34987b['shift']());}}}(_0x4166,0xc855c));import{Command as _0x4af1e5}from'ckeditor5/src/core.js';import{findOptimalInsertionRange as _0x3ad265}from'ckeditor5/src/widget.js';function _0x4166(){const _0x419a63=['insertObject','auto','refresh','2644020VLTvfE','document','isLimit','schema','model','261194qaDIbU','207590cnxgjc','execute','change','createElement','string','138KmxWZi','mergeFieldBlock','9547167QxSMwN','isEnabled','parent','3096576TrBiVn','128058wYLXIS','editor','22761970XxfqIu','1QfmHRX','27DkkQaV','start','checkChild','4rLUjAW','isEmpty','selection'];_0x4166=function(){return _0x419a63;};return _0x4166();}function _0x5220(_0x3e36b9,_0x43b482){const _0x4166cc=_0x4166();return _0x5220=function(_0x522068,_0x1b8641){_0x522068=_0x522068-0x1f1;let _0x51a803=_0x4166cc[_0x522068];return _0x51a803;},_0x5220(_0x3e36b9,_0x43b482);}export default class i extends _0x4af1e5{[_0x423fe3(0x20e)](){const _0x22c70b=_0x423fe3,_0x42ef31=this[_0x22c70b(0x203)][_0x22c70b(0x1f5)],_0x36b79b=_0x42ef31[_0x22c70b(0x1f2)][_0x22c70b(0x20b)];this[_0x22c70b(0x1ff)]=function(_0x185420,_0x1a1c98){const _0x11a115=_0x22c70b,_0x4d6947=_0x3ad265(_0x185420,_0x1a1c98);let _0x1a230c=_0x4d6947[_0x11a115(0x207)][_0x11a115(0x200)];return _0x1a230c[_0x11a115(0x20a)]&&!_0x1a1c98[_0x11a115(0x1f4)][_0x11a115(0x1f3)](_0x1a230c)&&(_0x1a230c=_0x1a230c[_0x11a115(0x200)]),_0x1a1c98[_0x11a115(0x1f4)][_0x11a115(0x208)](_0x1a230c,_0x11a115(0x1fd));}(_0x36b79b,_0x42ef31);}[_0x423fe3(0x1f8)](_0x242960,_0x3c4075){const _0x350cda=_0x423fe3;if(!_0x242960||_0x350cda(0x1fb)!=typeof _0x242960)return;const _0x1674ec=this[_0x350cda(0x203)][_0x350cda(0x1f5)];_0x1674ec[_0x350cda(0x1f9)](_0xbee05b=>{const _0x55ffe3=_0x350cda,_0x1469da=_0xbee05b[_0x55ffe3(0x1fa)](_0x55ffe3(0x1fd),{'id':_0x242960});_0x1674ec[_0x55ffe3(0x20c)](_0x1469da,_0x1674ec[_0x55ffe3(0x1f2)][_0x55ffe3(0x20b)],null,{'setSelection':'on','findOptimalPosition':!0x1===_0x3c4075?void 0x0:_0x55ffe3(0x20d)});});}}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
* @module merge-fields/insertmergefieldcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The insert merge field element command.
|
|
11
|
+
*
|
|
12
|
+
* The command is registered by {@link module:merge-fields/mergefieldsediting~MergeFieldsEditing} as `'insertMergeField'`.
|
|
13
|
+
*
|
|
14
|
+
* To insert a merge field element at the current selection, execute the command passing the merge field id as a parameter:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* editor.execute( 'insertMergeField', 'clientName' );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export default class InsertMergeFieldCommand extends Command {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
refresh(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Inserts a new merge field element with the given `id` attribute at the current selection.
|
|
27
|
+
*
|
|
28
|
+
* @fires execute
|
|
29
|
+
*/
|
|
30
|
+
execute(mergeFieldId: string): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x41ed08=_0x85a6;(function(_0x3a1844,_0x3bb3cf){const _0x49cf05=_0x85a6,_0x508b5e=_0x3a1844();while(!![]){try{const _0x350f29=parseInt(_0x49cf05(0x199))/0x1+-parseInt(_0x49cf05(0x19a))/0x2+parseInt(_0x49cf05(0x1b1))/0x3+parseInt(_0x49cf05(0x195))/0x4*(parseInt(_0x49cf05(0x19b))/0x5)+parseInt(_0x49cf05(0x193))/0x6*(-parseInt(_0x49cf05(0x1b0))/0x7)+parseInt(_0x49cf05(0x19f))/0x8*(parseInt(_0x49cf05(0x1a7))/0x9)+parseInt(_0x49cf05(0x1af))/0xa*(-parseInt(_0x49cf05(0x1a1))/0xb);if(_0x350f29===_0x3bb3cf)break;else _0x508b5e['push'](_0x508b5e['shift']());}catch(_0x3110fa){_0x508b5e['push'](_0x508b5e['shift']());}}}(_0x2bf9,0x6a6f9));import{Command as _0xa8bfb8}from'ckeditor5/src/core.js';function _0x85a6(_0x4c4e58,_0x2d0b79){const _0x2bf9b2=_0x2bf9();return _0x85a6=function(_0x85a656,_0x1c72f5){_0x85a656=_0x85a656-0x193;let _0x403bd9=_0x2bf9b2[_0x85a656];return _0x403bd9;},_0x85a6(_0x4c4e58,_0x2d0b79);}function _0x2bf9(){const _0x735914=['createElement','refresh','editor','3888279MFtBWn','focus','deleteContent','checkChild','selection','checkAttribute','setAttribute','change','2550090pyPxdk','1369669EDEfhz','212418wNzfiV','6WbmKMS','string','3005956Xzvfjn','insertContent','execute','schema','256051bksmAH','227444RthPsl','5iVAOrl','model','isEnabled','after','8pXKZUD','getAttributes','33icbUjK','mergeField','document'];_0x2bf9=function(){return _0x735914;};return _0x2bf9();}export default class r extends _0xa8bfb8{[_0x41ed08(0x1a5)](){const _0x4ec1f1=_0x41ed08,_0x59a589=this[_0x4ec1f1(0x1a6)][_0x4ec1f1(0x19c)],_0x86e86d=_0x59a589[_0x4ec1f1(0x198)][_0x4ec1f1(0x1aa)](_0x59a589[_0x4ec1f1(0x1a3)][_0x4ec1f1(0x1ab)][_0x4ec1f1(0x1a8)],_0x4ec1f1(0x1a2));this[_0x4ec1f1(0x19d)]=_0x86e86d;}[_0x41ed08(0x197)](_0x187a06){const _0x3585ce=_0x41ed08;if(!_0x187a06||_0x3585ce(0x194)!=typeof _0x187a06)return;const _0x873a34=this[_0x3585ce(0x1a6)][_0x3585ce(0x19c)];_0x873a34[_0x3585ce(0x1ae)](_0x1cec19=>{const _0x4c9fd2=_0x3585ce;_0x873a34[_0x4c9fd2(0x1a9)](_0x873a34[_0x4c9fd2(0x1a3)][_0x4c9fd2(0x1ab)]);const _0x592210=_0x1cec19[_0x4c9fd2(0x1a4)](_0x4c9fd2(0x1a2),{'id':_0x187a06});for(const [_0x290719,_0x5d3b36]of _0x873a34[_0x4c9fd2(0x1a3)][_0x4c9fd2(0x1ab)][_0x4c9fd2(0x1a0)]())_0x873a34[_0x4c9fd2(0x198)][_0x4c9fd2(0x1ac)](_0x592210,_0x290719)&&_0x1cec19[_0x4c9fd2(0x1ad)](_0x290719,_0x5d3b36,_0x592210);_0x873a34[_0x4c9fd2(0x196)](_0x592210,_0x873a34[_0x4c9fd2(0x1a3)][_0x4c9fd2(0x1ab)],0x0,{'setSelection':_0x4c9fd2(0x19e)});});}}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
* @module merge-fields/mergefields
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import MergeFieldsEditing from './mergefieldsediting.js';
|
|
11
|
+
import MergeFieldsUI from './mergefieldsui.js';
|
|
12
|
+
/**
|
|
13
|
+
* The merge fields feature.
|
|
14
|
+
*
|
|
15
|
+
* For a detailed overview, check the {@glink features/merge-fields Merge fields} feature documentation.
|
|
16
|
+
*
|
|
17
|
+
* @extends module:core/plugin~Plugin
|
|
18
|
+
*/
|
|
19
|
+
export default class MergeFields extends Plugin {
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get requires(): readonly [typeof MergeFieldsEditing, typeof MergeFieldsUI];
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
static get pluginName(): "MergeFields";
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
static get isOfficialPlugin(): true;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
static get isPremiumPlugin(): true;
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
function _0x2ad3(){var _0x5caf9c=['MergeFields','3500704KGDPbi','2590iyNwqN','18npxoUN','752863zhMjJO','21816310fCYZqU','isPremiumPlugin','7oiGmWt','pluginName','6767106YLMybk','isOfficialPlugin','94926pvAqbO','3364bfXFJq','requires','94156lrNBYa'];_0x2ad3=function(){return _0x5caf9c;};return _0x2ad3();}function _0x2d15(_0x40a1fa,_0x5d489a){var _0x2ad32c=_0x2ad3();return _0x2d15=function(_0x2d1517,_0x2ded8b){_0x2d1517=_0x2d1517-0x1cb;var _0x5a3c83=_0x2ad32c[_0x2d1517];return _0x5a3c83;},_0x2d15(_0x40a1fa,_0x5d489a);}var _0x20df0a=_0x2d15;(function(_0x7acea2,_0x495c78){var _0x10fcd8=_0x2d15,_0x295ca0=_0x7acea2();while(!![]){try{var _0xe531e7=-parseInt(_0x10fcd8(0x1d6))/0x1+-parseInt(_0x10fcd8(0x1d1))/0x2+parseInt(_0x10fcd8(0x1ce))/0x3+-parseInt(_0x10fcd8(0x1cf))/0x4*(parseInt(_0x10fcd8(0x1d4))/0x5)+parseInt(_0x10fcd8(0x1cc))/0x6*(-parseInt(_0x10fcd8(0x1d9))/0x7)+-parseInt(_0x10fcd8(0x1d3))/0x8*(-parseInt(_0x10fcd8(0x1d5))/0x9)+parseInt(_0x10fcd8(0x1d7))/0xa;if(_0xe531e7===_0x495c78)break;else _0x295ca0['push'](_0x295ca0['shift']());}catch(_0x1a5941){_0x295ca0['push'](_0x295ca0['shift']());}}}(_0x2ad3,0xb101b));import{Plugin as _0x26a5ff}from'ckeditor5/src/core.js';import _0x949a97 from'./mergefieldsediting.js';import _0x3f7eb from'./mergefieldsui.js';export default class u extends _0x26a5ff{static get[_0x20df0a(0x1d0)](){return[_0x949a97,_0x3f7eb];}static get[_0x20df0a(0x1cb)](){var _0x2a9982=_0x20df0a;return _0x2a9982(0x1d2);}static get[_0x20df0a(0x1cd)](){return!0x0;}static get[_0x20df0a(0x1d8)](){return!0x0;}}
|
|
@@ -0,0 +1,241 @@
|
|
|
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
|
+
* @module merge-fields/mergefieldsconfig
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
10
|
+
/**
|
|
11
|
+
* The configuration of the merge fields feature.
|
|
12
|
+
*
|
|
13
|
+
* The properties defined in this config are set in the `config.mergeFields` namespace.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* ClassicEditor
|
|
17
|
+
* .create( editorElement, {
|
|
18
|
+
* mergeFields: {
|
|
19
|
+
* // Merge fields configuration.
|
|
20
|
+
* }
|
|
21
|
+
* } )
|
|
22
|
+
* .then( ... )
|
|
23
|
+
* .catch( ... );
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
27
|
+
*/
|
|
28
|
+
export interface MergeFieldsConfig {
|
|
29
|
+
/**
|
|
30
|
+
* The definitions of the merge fields that can be used in the editor.
|
|
31
|
+
* It's allowed to define them in any combination of groups and individual merge fields.
|
|
32
|
+
* The order of the definitions is respected when displaying the merge fields in the UI dropdown
|
|
33
|
+
* except that merge fields that are not assigned to any group are displayed at the
|
|
34
|
+
* very bottom of the list.
|
|
35
|
+
*/
|
|
36
|
+
definitions?: Array<GroupDefinition | MergeFieldDefinition>;
|
|
37
|
+
/**
|
|
38
|
+
* A prefix used to identify merge fields in the editor data.
|
|
39
|
+
*
|
|
40
|
+
* The list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
41
|
+
*
|
|
42
|
+
* @default '\{\{'
|
|
43
|
+
*/
|
|
44
|
+
prefix?: string;
|
|
45
|
+
/**
|
|
46
|
+
* A suffix used to identify merge fields in the editor data.
|
|
47
|
+
*
|
|
48
|
+
* The list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
49
|
+
*
|
|
50
|
+
* @default '\}\}'
|
|
51
|
+
*/
|
|
52
|
+
suffix?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The data sets that can be displayed in place of the merge fields in the editor.
|
|
55
|
+
*
|
|
56
|
+
* @default []
|
|
57
|
+
*/
|
|
58
|
+
dataSets?: Array<DataSetDefinition>;
|
|
59
|
+
/**
|
|
60
|
+
* Determines the available preview modes in the dropdown and menu bar. Possible values are:
|
|
61
|
+
*
|
|
62
|
+
* * `'$labels'` - adds the option to display the labels of the merge fields.
|
|
63
|
+
* * `'$defaultValues'` - adds the option to display the default values.
|
|
64
|
+
* * `'$dataSets'` - adds the options to display each of the configured data sets.
|
|
65
|
+
*
|
|
66
|
+
* At least one mode must be enabled. If more than one preview mode is configured,
|
|
67
|
+
* you can add `previewMergeFields` button to the toolbar to switch between them,
|
|
68
|
+
* and the menu bar button will be added automatically to the `View` category.
|
|
69
|
+
*
|
|
70
|
+
* @default [ '$labels', '$defaultValues', '$dataSets' ]
|
|
71
|
+
*/
|
|
72
|
+
previewModes?: Array<string>;
|
|
73
|
+
/**
|
|
74
|
+
* A name of the preview mode that should be active when the editor is initialized. Possible values are:
|
|
75
|
+
*
|
|
76
|
+
* * `'$labels'` - displays the labels of the merge fields,
|
|
77
|
+
* * `'$defaultValues'` - displays the default values,
|
|
78
|
+
* * one of the configured {@link module:merge-fields/mergefieldsconfig~MergeFieldsConfig#dataSets data sets} identifiers.
|
|
79
|
+
*
|
|
80
|
+
* If not set, it will default to the one of the {@link ~MergeFieldsConfig#previewModes available preview modes}, with the priority as
|
|
81
|
+
* in the list above.
|
|
82
|
+
*/
|
|
83
|
+
initialPreviewMode?: string;
|
|
84
|
+
/**
|
|
85
|
+
* A flag indicating whether the feature preview mode should interpret merge fields
|
|
86
|
+
* {@link ~DataSetDefinition#values data set values} and {@link ~MergeFieldDefinition#defaultValue default values} as HTML strings and
|
|
87
|
+
* render them as HTML.
|
|
88
|
+
*
|
|
89
|
+
* When set to `true`, the merge field value will be interpreted and rendered as HTML. For example, `'<img src="image.jpg" />'` merge
|
|
90
|
+
* field value will be previewed as the image located at given `src`.
|
|
91
|
+
*
|
|
92
|
+
* When set to `false`, the merge field value will be interpreted as a regular text. For example, `'<img src="image.jpg" />'` will be
|
|
93
|
+
* displayed exactly as defined, meaning that text `<img src="image.jpg" />` will be displayed instead of an image.
|
|
94
|
+
*
|
|
95
|
+
* By default, it is set to `false`.
|
|
96
|
+
*
|
|
97
|
+
* Read more about the security of previewing merge fields HTML values in the
|
|
98
|
+
* {@glink features/merge-fields#using-html-tags-in-merge-fields-values Merge fields feature} documentation.
|
|
99
|
+
*
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
previewHtmlValues?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Callback used to sanitize the HTML used in merge fields values when they are previewed inside the editor.
|
|
105
|
+
*
|
|
106
|
+
* We strongly recommend overwriting the default function to avoid XSS vulnerabilities.
|
|
107
|
+
*
|
|
108
|
+
* Read more about the security aspect of this feature in {@glink features/merge-fields#using-html-tags-in-merge-fields-values Merge
|
|
109
|
+
* fields feature} documentation.
|
|
110
|
+
*
|
|
111
|
+
* The function receives the input HTML (as a string), and should return an object
|
|
112
|
+
* that matches the {@link module:merge-fields/mergefieldsconfig~MergeFieldsSanitizeOutput} interface.
|
|
113
|
+
*
|
|
114
|
+
* ```ts
|
|
115
|
+
* ClassicEditor
|
|
116
|
+
* .create( editorElement, {
|
|
117
|
+
* mergeFields: {
|
|
118
|
+
* previewHtmlValues: true,
|
|
119
|
+
* sanitizeHtml( inputHtml ) {
|
|
120
|
+
* // Strip unsafe elements and attributes, e.g.:
|
|
121
|
+
* // the `<script>` elements and `on*` attributes.
|
|
122
|
+
* const outputHtml = sanitize( inputHtml );
|
|
123
|
+
*
|
|
124
|
+
* return {
|
|
125
|
+
* html: outputHtml,
|
|
126
|
+
* // true or false depending on whether the sanitizer stripped anything.
|
|
127
|
+
* hasChanged: ...
|
|
128
|
+
* };
|
|
129
|
+
* },
|
|
130
|
+
* }
|
|
131
|
+
* } )
|
|
132
|
+
* .then( ... )
|
|
133
|
+
* .catch( ... );
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* **Note:** The function is used only when the feature
|
|
137
|
+
* {@link module:merge-fields/mergefieldsconfig~MergeFieldsConfig#previewHtmlValues is configured to render previews}.
|
|
138
|
+
*/
|
|
139
|
+
sanitizeHtml?: (html: string) => MergeFieldsSanitizeOutput;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* An object returned by the {@link module:merge-fields/mergefieldsconfig~MergeFieldsConfig#sanitizeHtml} function.
|
|
143
|
+
*/
|
|
144
|
+
export interface MergeFieldsSanitizeOutput {
|
|
145
|
+
/**
|
|
146
|
+
* An output (safe) HTML that will be inserted into the {@glink framework/architecture/editing-engine editing view}.
|
|
147
|
+
*/
|
|
148
|
+
html: string;
|
|
149
|
+
/**
|
|
150
|
+
* A flag that indicates whether the output HTML is different than the input value.
|
|
151
|
+
*/
|
|
152
|
+
hasChanged: boolean;
|
|
153
|
+
}
|
|
154
|
+
export type GroupDefinition = {
|
|
155
|
+
/**
|
|
156
|
+
* The unique identifier of the group.
|
|
157
|
+
*
|
|
158
|
+
* If {@link GroupDefinition#groupLabel} is not specified, the ID will be used as a label in the UI.
|
|
159
|
+
*/
|
|
160
|
+
groupId: string;
|
|
161
|
+
/**
|
|
162
|
+
* The human-readable label of the group.
|
|
163
|
+
*
|
|
164
|
+
* It is displayed by the feature's UI.
|
|
165
|
+
*/
|
|
166
|
+
groupLabel?: string;
|
|
167
|
+
/**
|
|
168
|
+
* The array of merge fields definitions that belong to the group.
|
|
169
|
+
*/
|
|
170
|
+
definitions: Array<MergeFieldDefinition>;
|
|
171
|
+
};
|
|
172
|
+
export type MergeFieldDefinition = {
|
|
173
|
+
/**
|
|
174
|
+
* The unique identifier of the merge field.
|
|
175
|
+
*
|
|
176
|
+
* If {@link MergeFieldDefinition#label} is not specified, the ID will be used as a label.
|
|
177
|
+
*
|
|
178
|
+
* The list of allowed characters includes: `a-z`, `A-Z`, `0-9`, `_`, `.`, and `-`.
|
|
179
|
+
*/
|
|
180
|
+
id: string;
|
|
181
|
+
/**
|
|
182
|
+
* The human-readable label of the merge field.
|
|
183
|
+
*
|
|
184
|
+
* It is displayed by the feature's UI and inside the editing area.
|
|
185
|
+
*/
|
|
186
|
+
label?: string;
|
|
187
|
+
/**
|
|
188
|
+
* The type of the merge field. It determines how the merge field is rendered in the editor editing area.
|
|
189
|
+
*
|
|
190
|
+
* Possible options are `text` (meaning the merge field will be inline) and `block`.
|
|
191
|
+
*
|
|
192
|
+
* @default 'text'
|
|
193
|
+
*/
|
|
194
|
+
type?: MergeFieldType;
|
|
195
|
+
/**
|
|
196
|
+
* The height of the block merge field in pixels.
|
|
197
|
+
*
|
|
198
|
+
* It is used only for merge fields of type `block`. If unset, the default block merge field height is 120 pixels.
|
|
199
|
+
*
|
|
200
|
+
* @default 120
|
|
201
|
+
*/
|
|
202
|
+
height?: number;
|
|
203
|
+
/**
|
|
204
|
+
* Default value of the merge field.
|
|
205
|
+
*
|
|
206
|
+
* It is used if a value for given merge field has not been provided in a data set and in the default values preview mode.
|
|
207
|
+
*/
|
|
208
|
+
defaultValue?: MergeFieldDataSetValue;
|
|
209
|
+
};
|
|
210
|
+
export type DataSetDefinition = {
|
|
211
|
+
/**
|
|
212
|
+
* A unique identifier of the data set. It cannot start with `$`, as it is reserved for internal use.
|
|
213
|
+
*/
|
|
214
|
+
id: string;
|
|
215
|
+
/**
|
|
216
|
+
* A human-readable label of the data set.
|
|
217
|
+
*/
|
|
218
|
+
label?: string;
|
|
219
|
+
/**
|
|
220
|
+
* The data to be displayed in the editor in place of merge fields when the data set is previewed.
|
|
221
|
+
*
|
|
222
|
+
* The keys of this object are merge field IDs, while values are the merge field values, which can be strings or functions.
|
|
223
|
+
* If the value is specified as a function, it should return a string. The function will be evaluated each time the data set values
|
|
224
|
+
* are retrieved.
|
|
225
|
+
*
|
|
226
|
+
* ```ts
|
|
227
|
+
* const mergeFieldsConfig = {
|
|
228
|
+
* dataSets: [
|
|
229
|
+
* id: 'customDataSet',
|
|
230
|
+
* values: {
|
|
231
|
+
* companyName: 'CKSource',
|
|
232
|
+
* productName: 'CKEditor 5'
|
|
233
|
+
* }
|
|
234
|
+
* ]
|
|
235
|
+
* };
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
values: Record<string, MergeFieldDataSetValue>;
|
|
239
|
+
};
|
|
240
|
+
export type MergeFieldDataSetValue = string | ((editor: Editor) => string);
|
|
241
|
+
export type MergeFieldType = 'text' | 'block';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import type { MergeFieldDefinition, MergeFieldType } from './mergefieldsconfig.js';
|
|
7
|
+
/**
|
|
8
|
+
* The merge fields editing feature.
|
|
9
|
+
*/
|
|
10
|
+
export default class MergeFieldsEditing extends Plugin {
|
|
11
|
+
/**
|
|
12
|
+
* The current preview mode for merge fields. Determines the merge field values displayed in the editor.
|
|
13
|
+
*
|
|
14
|
+
* @observable
|
|
15
|
+
*/
|
|
16
|
+
previewMode: string;
|
|
17
|
+
/**
|
|
18
|
+
* All configured preview modes, available to be set as a value for {@link #previewMode}.
|
|
19
|
+
*/
|
|
20
|
+
readonly availablePreviewModes: Array<string>;
|
|
21
|
+
/**
|
|
22
|
+
* A flat list of all merge field definitions.
|
|
23
|
+
*/
|
|
24
|
+
flattenedMergeFieldDefinitions: Array<MergeFieldDefinition>;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "MergeFieldsEditing";
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
static get isOfficialPlugin(): true;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
static get isPremiumPlugin(): true;
|
|
37
|
+
/**
|
|
38
|
+
* @inheritDoc
|
|
39
|
+
*/
|
|
40
|
+
constructor(editor: Editor);
|
|
41
|
+
/**
|
|
42
|
+
* @inheritDoc
|
|
43
|
+
*/
|
|
44
|
+
init(): void;
|
|
45
|
+
/**
|
|
46
|
+
* @inheritDoc
|
|
47
|
+
*/
|
|
48
|
+
afterInit(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Returns an object with default merge fields values.
|
|
51
|
+
*
|
|
52
|
+
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
53
|
+
*
|
|
54
|
+
* Values defined as functions are evaluated and their result is returned.
|
|
55
|
+
*/
|
|
56
|
+
getDefaultValues(): MergeFieldsValues;
|
|
57
|
+
/**
|
|
58
|
+
* Returns an object with merge fields values defined for given data set.
|
|
59
|
+
*
|
|
60
|
+
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
61
|
+
*
|
|
62
|
+
* Values defined as functions are evaluated and their result is returned.
|
|
63
|
+
*
|
|
64
|
+
* If the data set is not found, it throws an error.
|
|
65
|
+
*
|
|
66
|
+
* @param dataSetId
|
|
67
|
+
* @param useDefaultValues If set to `true`, merge field default value will be used for these merge fields, for which the data
|
|
68
|
+
* was not defined. If default value is not configured for given merge field, `null` will be still returned.
|
|
69
|
+
*/
|
|
70
|
+
getDataSetValues(dataSetId: string, useDefaultValues?: boolean): MergeFieldsValues;
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves the label for the merge field with the given id.
|
|
73
|
+
*
|
|
74
|
+
* If the merge field definition for given id was not found, or a label was not specified, the merge field id is returned instead.
|
|
75
|
+
*/
|
|
76
|
+
getLabel(id: string): string;
|
|
77
|
+
/**
|
|
78
|
+
* Returns the default value for the merge field with the given id.
|
|
79
|
+
*
|
|
80
|
+
* If the merge field default value was specified as a callback, it will be executed and the result will be returned.
|
|
81
|
+
*
|
|
82
|
+
* If the merge field definition for given id was not found, or a default value was not specified, `null` is returned.
|
|
83
|
+
*/
|
|
84
|
+
getMergeFieldDefaultValue(id: string): string | null;
|
|
85
|
+
/**
|
|
86
|
+
* Returns the value specified for merge field with the given in given data set.
|
|
87
|
+
*
|
|
88
|
+
* If the merge field value was specified as a callback, it will be executed and the result will be returned.
|
|
89
|
+
*
|
|
90
|
+
* If the merge field definition for given id was not found, or the data set has no value for this merge field, `null` is returned.
|
|
91
|
+
*/
|
|
92
|
+
getMergeFieldValue(id: string, dataSetId: string): string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Returns the type of the merge field with the given id.
|
|
95
|
+
*
|
|
96
|
+
* Possible values are: `text`, `block`, `image`.
|
|
97
|
+
*/
|
|
98
|
+
getMergeFieldType(id: string): MergeFieldType;
|
|
99
|
+
/**
|
|
100
|
+
* Returns ids of all merge fields that are present in the document.
|
|
101
|
+
*/
|
|
102
|
+
getDocumentMergeFieldsIds(): Array<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
105
|
+
*/
|
|
106
|
+
getMergeFieldsIds(): Array<string>;
|
|
107
|
+
/**
|
|
108
|
+
* Returns the merge field definition for the given id.
|
|
109
|
+
*/
|
|
110
|
+
getDefinition(id: string): MergeFieldDefinition | null;
|
|
111
|
+
}
|
|
112
|
+
type MergeFieldsValues = Record<string, string | null>;
|
|
113
|
+
export {};
|