@editora/plugins 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -5
- package/dist/a11y-checker.cjs.js +109 -0
- package/dist/a11y-checker.esm.js +509 -0
- package/dist/anchor.cjs.js +176 -0
- package/dist/anchor.esm.js +400 -0
- package/dist/background-color.cjs.js +218 -0
- package/dist/background-color.esm.js +482 -0
- package/dist/blockquote.cjs.js +1 -0
- package/dist/blockquote.esm.js +47 -0
- package/dist/bold.cjs.js +1 -0
- package/dist/bold.esm.js +44 -0
- package/dist/capitalization.cjs.js +1 -0
- package/dist/capitalization.esm.js +78 -0
- package/dist/checklist.cjs.js +1 -0
- package/dist/checklist.esm.js +305 -0
- package/dist/clear-formatting.cjs.js +1 -0
- package/dist/clear-formatting.esm.js +138 -0
- package/dist/code-sample.cjs.js +161 -0
- package/dist/code-sample.esm.js +381 -0
- package/dist/code.cjs.js +606 -0
- package/dist/code.esm.js +2164 -0
- package/dist/colorSelectionApply-C0iOfMWb.js +1 -0
- package/dist/colorSelectionApply-D8r_gV32.mjs +63 -0
- package/dist/comments.cjs.js +354 -0
- package/dist/comments.esm.js +692 -0
- package/dist/direction.cjs.js +1 -0
- package/dist/direction.esm.js +129 -0
- package/dist/document-manager.cjs.js +1 -0
- package/dist/document-manager.esm.js +6 -0
- package/dist/{documentManager-CYC9totK.mjs → documentManager-DRUc1-Cs.mjs} +3 -3
- package/dist/{documentManager-BGlu3WRB.js → documentManager-_tQQfQi9.js} +3 -3
- package/dist/editorContainerHelpers-C7kdWnS0.mjs +26 -0
- package/dist/editorContainerHelpers-CFbfiOJI.js +1 -0
- package/dist/embed-iframe.cjs.js +361 -0
- package/dist/embed-iframe.esm.js +556 -0
- package/dist/emojis.cjs.js +284 -0
- package/dist/emojis.esm.js +1080 -0
- package/dist/font-family.cjs.js +1 -0
- package/dist/font-family.esm.js +152 -0
- package/dist/font-size.cjs.js +1 -0
- package/dist/font-size.esm.js +278 -0
- package/dist/footnote.cjs.js +85 -0
- package/dist/footnote.esm.js +397 -0
- package/dist/fullscreen.cjs.js +1 -0
- package/dist/fullscreen.esm.js +73 -0
- package/dist/heading.cjs.js +1 -0
- package/dist/heading.esm.js +63 -0
- package/dist/history.cjs.js +1 -0
- package/dist/history.esm.js +246 -0
- package/dist/indent.cjs.js +1 -0
- package/dist/indent.esm.js +146 -0
- package/dist/index-Bskk414V.mjs +145 -0
- package/dist/index-D3pJyAsj.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-B-to-4j4.js → index.es-Cz1qItab.js} +1 -1
- package/dist/{index.es-BbXJ7tyO.mjs → index.es-DEcRmSTY.mjs} +1 -1
- package/dist/index.esm.js +89 -49
- package/dist/italic.cjs.js +1 -0
- package/dist/italic.esm.js +40 -0
- package/dist/line-height.cjs.js +1 -0
- package/dist/line-height.esm.js +145 -0
- package/dist/link.cjs.js +138 -0
- package/dist/link.esm.js +276 -0
- package/dist/list.cjs.js +1 -0
- package/dist/list.esm.js +102 -0
- package/dist/lite.cjs.js +1 -0
- package/dist/lite.esm.js +61 -0
- package/dist/math.cjs.js +45 -0
- package/dist/math.esm.js +249 -0
- package/dist/media-manager.cjs.js +619 -0
- package/dist/media-manager.esm.js +994 -0
- package/dist/merge-tag.cjs.js +93 -0
- package/dist/merge-tag.esm.js +412 -0
- package/dist/page-break.cjs.js +72 -0
- package/dist/page-break.esm.js +295 -0
- package/dist/plugins.css +1 -1
- package/dist/preview.cjs.js +230 -0
- package/dist/preview.esm.js +321 -0
- package/dist/print.cjs.js +254 -0
- package/dist/print.esm.js +309 -0
- package/dist/purify.es-DHhaBdbu.mjs +470 -0
- package/dist/purify.es-T2a3nLiC.js +3 -0
- package/dist/shared-config.cjs.js +1 -0
- package/dist/shared-config.esm.js +30 -0
- package/dist/special-characters.cjs.js +257 -0
- package/dist/special-characters.esm.js +772 -0
- package/dist/spell-check.cjs.js +512 -0
- package/dist/spell-check.esm.js +1013 -0
- package/dist/strikethrough.cjs.js +1 -0
- package/dist/strikethrough.esm.js +71 -0
- package/dist/table.cjs.js +35 -0
- package/dist/table.esm.js +477 -0
- package/dist/template.cjs.js +356 -0
- package/dist/template.esm.js +560 -0
- package/dist/text-alignment.cjs.js +1 -0
- package/dist/text-alignment.esm.js +105 -0
- package/dist/text-color.cjs.js +300 -0
- package/dist/text-color.esm.js +507 -0
- package/dist/underline.cjs.js +1 -0
- package/dist/underline.esm.js +34 -0
- package/index.d.ts +62 -0
- package/package.json +220 -7
- package/LICENSE +0 -21
- package/dist/index-BbORIHoM.mjs +0 -11763
- package/dist/index-C-OCBS_6.js +0 -3753
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p={all:{name:"All",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₴","₵","₶","₷","₹","₺","₼","₽","₾","₿",'"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟","‟","„","©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂","⁃","⁇","⁈","⁉","+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≈","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≠","≡","≢","≣","≤","≥","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃","←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},currency:{name:"Currency",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₵","₶","₷","₼","₾","₿"]},text:{name:"Text",characters:["©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂"]},quotation:{name:"Quotation",characters:['"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟"]},mathematical:{name:"Mathematical",characters:["+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≢","≣","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿"]},"extended-latin":{name:"Extended Latin",characters:["À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ"]},symbols:{name:"Symbols",characters:["¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃"]},arrows:{name:"Arrows",characters:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]}},g={"€":"euro","£":"pound","¥":"yen","¢":"cent","₹":"rupee","₽":"ruble","₩":"won","₿":"bitcoin",'"':"quote","'":"apostrophe","«":"left angle quote","»":"right angle quote","„":"low quote","©":"copyright","®":"registered","™":"trademark","°":"degree","§":"section","¶":"paragraph","†":"dagger","‡":"double dagger","•":"bullet","‰":"per mille","′":"prime","″":"double prime","+":"plus","-":"minus","×":"multiplication","÷":"division","=":"equals","≠":"not equal","≈":"approximately","≡":"identical","≤":"less or equal","≥":"greater or equal","±":"plus minus",À:"a grave",Á:"a acute",Â:"a circumflex",Ã:"a tilde",Ä:"a diaeresis",Ç:"c cedilla","←":"left arrow","↑":"up arrow","→":"right arrow","↓":"down arrow","↔":"left right arrow"};let h=!1;const f='[data-theme="dark"], .dark, .editora-theme-dark',b=()=>{const a=window.getSelection();if(!a||a.rangeCount===0)return null;const e=a.anchorNode;return(e instanceof HTMLElement?e:e?.parentElement)?.closest(".rte-content, .editora-content")||null},m=a=>{const e=a||b();return e?!!e.closest(f):!1},x=()=>{if(typeof document>"u")return;const a="special-characters-plugin-styles";if(document.getElementById(a))return;const e=document.createElement("style");e.id=a,e.textContent=`
|
|
2
|
+
.special-characters-overlay {
|
|
3
|
+
--rte-sc-overlay-bg: rgba(15, 23, 36, 0.56);
|
|
4
|
+
--rte-sc-dialog-bg: #ffffff;
|
|
5
|
+
--rte-sc-dialog-text: #101828;
|
|
6
|
+
--rte-sc-border: #d6dbe4;
|
|
7
|
+
--rte-sc-subtle-bg: #f7f9fc;
|
|
8
|
+
--rte-sc-subtle-hover: #eef2f7;
|
|
9
|
+
--rte-sc-muted-text: #5f6b7d;
|
|
10
|
+
--rte-sc-accent: #1f75fe;
|
|
11
|
+
--rte-sc-accent-strong: #165fd6;
|
|
12
|
+
--rte-sc-ring: rgba(31, 117, 254, 0.18);
|
|
13
|
+
position: fixed;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
background-color: var(--rte-sc-overlay-bg);
|
|
19
|
+
backdrop-filter: blur(2px);
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
z-index: 10000;
|
|
24
|
+
padding: 16px;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.special-characters-overlay.rte-ui-theme-dark {
|
|
29
|
+
--rte-sc-overlay-bg: rgba(2, 8, 20, 0.72);
|
|
30
|
+
--rte-sc-dialog-bg: #202938;
|
|
31
|
+
--rte-sc-dialog-text: #e8effc;
|
|
32
|
+
--rte-sc-border: #49566c;
|
|
33
|
+
--rte-sc-subtle-bg: #2a3444;
|
|
34
|
+
--rte-sc-subtle-hover: #344256;
|
|
35
|
+
--rte-sc-muted-text: #a5b1c5;
|
|
36
|
+
--rte-sc-accent: #58a6ff;
|
|
37
|
+
--rte-sc-accent-strong: #4598f4;
|
|
38
|
+
--rte-sc-ring: rgba(88, 166, 255, 0.22);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.special-characters-dialog {
|
|
42
|
+
background: var(--rte-sc-dialog-bg);
|
|
43
|
+
color: var(--rte-sc-dialog-text);
|
|
44
|
+
border: 1px solid var(--rte-sc-border);
|
|
45
|
+
border-radius: 12px;
|
|
46
|
+
box-shadow: 0 24px 48px rgba(10, 15, 24, 0.28);
|
|
47
|
+
max-width: 800px;
|
|
48
|
+
width: 90%;
|
|
49
|
+
max-height: 80vh;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.special-characters-header {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
align-items: center;
|
|
59
|
+
padding: 16px 20px;
|
|
60
|
+
border-bottom: 1px solid var(--rte-sc-border);
|
|
61
|
+
background: linear-gradient(180deg, rgba(127, 154, 195, 0.08) 0%, rgba(127, 154, 195, 0) 100%);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.special-characters-header h2 {
|
|
65
|
+
margin: 0;
|
|
66
|
+
font-size: 18px;
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
color: var(--rte-sc-dialog-text);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.special-characters-close {
|
|
72
|
+
background: none;
|
|
73
|
+
border: none;
|
|
74
|
+
font-size: 24px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
color: var(--rte-sc-muted-text);
|
|
77
|
+
padding: 0;
|
|
78
|
+
width: 32px;
|
|
79
|
+
height: 32px;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
border-radius: 8px;
|
|
84
|
+
transition: background-color 0.16s ease, color 0.16s ease;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.special-characters-close:hover {
|
|
88
|
+
background-color: var(--rte-sc-subtle-hover);
|
|
89
|
+
color: var(--rte-sc-dialog-text);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.special-characters-content {
|
|
93
|
+
display: flex;
|
|
94
|
+
flex: 1;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.special-characters-main-content {
|
|
99
|
+
flex: 1;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.special-characters-search {
|
|
106
|
+
padding: 16px 16px 0 16px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.special-characters-search-input {
|
|
110
|
+
width: 100%;
|
|
111
|
+
padding: 10px 12px;
|
|
112
|
+
border: 1px solid var(--rte-sc-border);
|
|
113
|
+
border-radius: 8px;
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
color: var(--rte-sc-dialog-text);
|
|
116
|
+
background-color: var(--rte-sc-subtle-bg);
|
|
117
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.special-characters-search-input::placeholder {
|
|
122
|
+
color: var(--rte-sc-muted-text);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.special-characters-search-input:focus {
|
|
126
|
+
outline: none;
|
|
127
|
+
border-color: var(--rte-sc-accent);
|
|
128
|
+
box-shadow: 0 0 0 3px var(--rte-sc-ring);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.special-characters-tabs {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
width: 180px;
|
|
135
|
+
border-right: 1px solid var(--rte-sc-border);
|
|
136
|
+
background-color: var(--rte-sc-subtle-bg);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.special-characters-tab {
|
|
140
|
+
padding: 12px 16px;
|
|
141
|
+
border: none;
|
|
142
|
+
background: none;
|
|
143
|
+
text-align: left;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
color: var(--rte-sc-muted-text);
|
|
147
|
+
border-bottom: 1px solid var(--rte-sc-border);
|
|
148
|
+
transition: all 0.2s ease;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.special-characters-tab:hover {
|
|
152
|
+
background-color: var(--rte-sc-subtle-hover);
|
|
153
|
+
color: var(--rte-sc-dialog-text);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.special-characters-tab.active {
|
|
157
|
+
background-color: var(--rte-sc-accent);
|
|
158
|
+
color: #fff;
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.special-characters-grid {
|
|
163
|
+
padding: 16px;
|
|
164
|
+
overflow-y: auto;
|
|
165
|
+
display: grid;
|
|
166
|
+
grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
|
|
167
|
+
gap: 8px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.special-characters-item {
|
|
171
|
+
width: 40px;
|
|
172
|
+
height: 40px;
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
border: 1px solid var(--rte-sc-border);
|
|
177
|
+
background: var(--rte-sc-subtle-bg);
|
|
178
|
+
border-radius: 8px;
|
|
179
|
+
cursor: pointer;
|
|
180
|
+
font-size: 18px;
|
|
181
|
+
transition: all 0.2s ease;
|
|
182
|
+
color: var(--rte-sc-dialog-text);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.special-characters-item:hover {
|
|
186
|
+
background-color: var(--rte-sc-accent);
|
|
187
|
+
border-color: var(--rte-sc-accent);
|
|
188
|
+
color: #fff;
|
|
189
|
+
transform: scale(1.05);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.special-characters-item:active {
|
|
193
|
+
transform: scale(0.95);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.special-characters-no-results {
|
|
197
|
+
grid-column: 1 / -1;
|
|
198
|
+
text-align: center;
|
|
199
|
+
color: var(--rte-sc-muted-text);
|
|
200
|
+
font-size: 14px;
|
|
201
|
+
padding: 40px 20px;
|
|
202
|
+
background-color: var(--rte-sc-subtle-bg);
|
|
203
|
+
border-radius: 8px;
|
|
204
|
+
border: 1px solid var(--rte-sc-border);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@media (max-width: 768px) {
|
|
208
|
+
.special-characters-dialog {
|
|
209
|
+
width: 95%;
|
|
210
|
+
max-height: 90vh;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.special-characters-content {
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.special-characters-tabs {
|
|
218
|
+
width: 100%;
|
|
219
|
+
border-right: none;
|
|
220
|
+
border-bottom: 1px solid var(--rte-sc-border);
|
|
221
|
+
flex-direction: row;
|
|
222
|
+
overflow-x: auto;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.special-characters-tab {
|
|
226
|
+
border-bottom: none;
|
|
227
|
+
border-right: 1px solid var(--rte-sc-border);
|
|
228
|
+
white-space: nowrap;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
`,document.head.appendChild(e)},v=a=>{const e=window.getSelection();if(e&&e.rangeCount>0){const r=e.getRangeAt(0);r.deleteContents();const c=document.createTextNode(a);r.insertNode(c),r.setStartAfter(c),r.setEndAfter(c),e.removeAllRanges(),e.addRange(r)}},y=a=>{if(typeof window>"u"||h)return;h=!0,x();let e="all",r="";const c=document.createElement("div");c.className="special-characters-overlay",m(a)&&c.classList.add("rte-ui-theme-dark");const o=document.createElement("div");o.className="special-characters-dialog",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true");const d=()=>{const s=p[e].characters.filter(t=>{if(!r.trim())return!0;const n=r.toLowerCase();return t.toLowerCase().includes(n)||(g[t]||"").toLowerCase().includes(n)});o.innerHTML=`
|
|
232
|
+
<div class="special-characters-header">
|
|
233
|
+
<h2>Insert Special Characters</h2>
|
|
234
|
+
<button class="special-characters-close">×</button>
|
|
235
|
+
</div>
|
|
236
|
+
<div class="special-characters-content">
|
|
237
|
+
<div class="special-characters-tabs">
|
|
238
|
+
${Object.keys(p).map(t=>`
|
|
239
|
+
<button class="special-characters-tab ${e===t?"active":""}" data-category="${t}">
|
|
240
|
+
${p[t].name}
|
|
241
|
+
</button>
|
|
242
|
+
`).join("")}
|
|
243
|
+
</div>
|
|
244
|
+
<div class="special-characters-main-content">
|
|
245
|
+
<div class="special-characters-search">
|
|
246
|
+
<input type="text" placeholder="Search characters..." value="${r}" class="special-characters-search-input">
|
|
247
|
+
</div>
|
|
248
|
+
<div class="special-characters-grid">
|
|
249
|
+
${s.length>0?s.map(t=>`
|
|
250
|
+
<button class="special-characters-item" data-char="${t}" title="${g[t]||t}">
|
|
251
|
+
${t}
|
|
252
|
+
</button>
|
|
253
|
+
`).join(""):`<div class="special-characters-no-results">No characters found for "${r}"</div>`}
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
`,o.querySelector(".special-characters-close")?.addEventListener("click",l),o.querySelectorAll(".special-characters-tab").forEach(t=>{t.addEventListener("click",n=>{const i=n.target.getAttribute("data-category");i&&(e=i,d())})}),o.querySelector(".special-characters-search-input")?.addEventListener("input",t=>{r=t.target.value,d()}),o.querySelectorAll(".special-characters-item").forEach(t=>{t.addEventListener("click",n=>{const i=n.target.getAttribute("data-char");i&&(v(i),l())})})},l=()=>{c.parentNode&&c.parentNode.removeChild(c),h=!1,document.removeEventListener("keydown",u)},u=s=>{s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),l())};c.addEventListener("click",s=>{s.target===c&&l()}),document.addEventListener("keydown",u),d(),c.appendChild(o),document.body.appendChild(c)},w=()=>({name:"specialCharacters",toolbar:[{label:"Special Characters",command:"insertSpecialCharacter",icon:'<svg width="24" height="24" focusable="false"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"></path></svg>'}],commands:{insertSpecialCharacter:(a,e)=>{const r=e?.contentElement instanceof HTMLElement?e.contentElement:b();return y(r),!0}},keymap:{}});exports.SpecialCharactersPlugin=w;
|