@editora/template 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +356 -0
- package/dist/index.esm.js +560 -0
- package/package.json +35 -0
- package/src/TemplatePlugin.native.ts +908 -0
- package/src/index.ts +1 -0
- package/src/types/dompurify.d.ts +1 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("dompurify");let o=null,d=null,s=null,n=null,p="",m="",g="insert";const M=[{id:"formal-letter",name:"Formal Letter",category:"Letters",description:"Professional business letter template",html:`<p><strong>{{ Company Name }}</strong></p>
|
|
2
|
+
<p>{{ Today }}</p>
|
|
3
|
+
<p>Dear {{ first_name }} {{ last_name }},</p>
|
|
4
|
+
<p>I hope this letter finds you well. [Your letter content here]</p>
|
|
5
|
+
<p>Thank you for your time and consideration.</p>
|
|
6
|
+
<p>Sincerely,<br>Your Name</p>`},{id:"meeting-notes",name:"Meeting Notes",category:"Notes",description:"Template for meeting notes with attendees and action items",html:`<h2>Meeting Notes - {{ today }}</h2>
|
|
7
|
+
<p><strong>Attendees:</strong> [List attendees]</p>
|
|
8
|
+
<p><strong>Agenda:</strong></p>
|
|
9
|
+
<ul>
|
|
10
|
+
<li>[Item 1]</li>
|
|
11
|
+
<li>[Item 2]</li>
|
|
12
|
+
<li>[Item 3]</li>
|
|
13
|
+
</ul>
|
|
14
|
+
<p><strong>Action Items:</strong></p>
|
|
15
|
+
<ul>
|
|
16
|
+
<li>[Owner]: [Task] - [Due Date]</li>
|
|
17
|
+
</ul>
|
|
18
|
+
<p><strong>Next Meeting:</strong> [Date]</p>`},{id:"proposal",name:"Project Proposal",category:"Business",description:"Structured project proposal template",html:`<h1>Project Proposal</h1>
|
|
19
|
+
<h2>Executive Summary</h2>
|
|
20
|
+
<p>[Summary of the proposal]</p>
|
|
21
|
+
<h2>Objectives</h2>
|
|
22
|
+
<ul>
|
|
23
|
+
<li>[Objective 1]</li>
|
|
24
|
+
<li>[Objective 2]</li>
|
|
25
|
+
</ul>
|
|
26
|
+
<h2>Scope</h2>
|
|
27
|
+
<p>[Project scope details]</p>
|
|
28
|
+
<h2>Timeline</h2>
|
|
29
|
+
<p>[Project timeline]</p>
|
|
30
|
+
<h2>Budget</h2>
|
|
31
|
+
<p>[Budget details]</p>
|
|
32
|
+
<h2>Contact</h2>
|
|
33
|
+
<p>{{ first_name }} {{ last_name }}<br>{{ email }}<br>{{ phone }}</p>`},{id:"faq",name:"FAQ Template",category:"Documentation",description:"FAQ document structure",html:`<h1>Frequently Asked Questions</h1>
|
|
34
|
+
<h2>General Questions</h2>
|
|
35
|
+
<h3>Q: What is this about?</h3>
|
|
36
|
+
<p>A: [Answer here]</p>
|
|
37
|
+
<h3>Q: Who should use this?</h3>
|
|
38
|
+
<p>A: [Answer here]</p>
|
|
39
|
+
<h2>Technical Questions</h2>
|
|
40
|
+
<h3>Q: How do I get started?</h3>
|
|
41
|
+
<p>A: [Answer here]</p>
|
|
42
|
+
<h3>Q: What are the requirements?</h3>
|
|
43
|
+
<p>A: [Answer here]</p>`}];let w=[...M];const y=()=>w,k=()=>{const t=new Set(w.map(e=>e.category));return Array.from(t)},R=t=>{const e=t.toLowerCase();return w.filter(r=>r.name.toLowerCase().includes(e)||r.description?.toLowerCase().includes(e)||r.tags?.some(l=>l.toLowerCase().includes(e)))},L=t=>S.sanitize(t,{ALLOWED_TAGS:["p","br","strong","em","u","h1","h2","h3","h4","ul","ol","li","blockquote","table","thead","tbody","tr","th","td","a","span"],ALLOWED_ATTR:["href","target","class","data-key","data-category"]});function D(t){d=document.createElement("div"),d.className="rte-dialog-overlay",N(t)&&d.classList.add("rte-ui-theme-dark"),d.addEventListener("click",()=>c()),o=document.createElement("div"),o.className="rte-dialog rte-template-dialog",o.addEventListener("click",r=>r.stopPropagation());const e=k();e.length>0&&!p&&(p=e[0]),b(),d.appendChild(o),document.body.appendChild(d),P()}const H='[data-theme="dark"], .dark, .editora-theme-dark',A=()=>{const t=window.getSelection();if(!t||t.rangeCount===0)return null;const e=t.anchorNode;return(e instanceof HTMLElement?e:e?.parentElement)?.closest(".rte-content, .editora-content")||null},N=t=>{const e=t||A();return e?!!e.closest(H):!1};function b(){if(!o)return;const t=k(),e=T();o.innerHTML=`
|
|
44
|
+
<div class="rte-dialog-header">
|
|
45
|
+
<h2>Insert Template</h2>
|
|
46
|
+
<button class="rte-dialog-close" aria-label="Close">✕</button>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="rte-dialog-body">
|
|
50
|
+
<!-- Search -->
|
|
51
|
+
<input
|
|
52
|
+
type="text"
|
|
53
|
+
placeholder="Search templates..."
|
|
54
|
+
value="${m}"
|
|
55
|
+
class="rte-input rte-template-search"
|
|
56
|
+
aria-label="Search templates"
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
<!-- Category Tabs -->
|
|
60
|
+
<div class="rte-tabs">
|
|
61
|
+
${t.map(r=>`
|
|
62
|
+
<button class="rte-tab ${p===r?"active":""}" data-category="${r}">
|
|
63
|
+
${r}
|
|
64
|
+
</button>
|
|
65
|
+
`).join("")}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Template List -->
|
|
69
|
+
<div class="rte-template-list">
|
|
70
|
+
${e.length>0?e.map(r=>`
|
|
71
|
+
<div
|
|
72
|
+
class="rte-template-item ${n?.id===r.id?"selected":""}"
|
|
73
|
+
data-template-id="${r.id}"
|
|
74
|
+
>
|
|
75
|
+
<div class="template-name">${r.name}</div>
|
|
76
|
+
${r.description?`<div class="template-description">${r.description}</div>`:""}
|
|
77
|
+
</div>
|
|
78
|
+
`).join(""):'<div class="rte-empty-state">No templates found</div>'}
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<!-- Preview -->
|
|
82
|
+
${n?`
|
|
83
|
+
<div class="rte-template-preview">
|
|
84
|
+
<strong>Preview:</strong>
|
|
85
|
+
<div class="template-preview-content">${n.html}</div>
|
|
86
|
+
</div>
|
|
87
|
+
`:""}
|
|
88
|
+
|
|
89
|
+
<!-- Insert Mode Toggle -->
|
|
90
|
+
<div class="rte-insert-mode">
|
|
91
|
+
<label>
|
|
92
|
+
<input type="radio" name="insertMode" value="insert" ${g==="insert"?"checked":""} />
|
|
93
|
+
Insert at cursor
|
|
94
|
+
</label>
|
|
95
|
+
<label>
|
|
96
|
+
<input type="radio" name="insertMode" value="replace" ${g==="replace"?"checked":""} />
|
|
97
|
+
Replace document
|
|
98
|
+
</label>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="rte-dialog-footer">
|
|
103
|
+
<button class="rte-button-secondary rte-cancel-btn">Cancel</button>
|
|
104
|
+
<button class="rte-button-primary rte-insert-btn" ${n?"":"disabled"}>
|
|
105
|
+
${g==="insert"?"Insert":"Replace"}
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
`,j()}function I(){if(!o)return;o.innerHTML=`
|
|
109
|
+
<div class="rte-dialog-header">
|
|
110
|
+
<h2>Replace Document?</h2>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="rte-dialog-body">
|
|
113
|
+
<p>This will replace your current document content. Continue?</p>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="rte-dialog-footer">
|
|
116
|
+
<button class="rte-button-secondary rte-cancel-warning-btn">Cancel</button>
|
|
117
|
+
<button class="rte-button-primary rte-confirm-replace-btn">Replace</button>
|
|
118
|
+
</div>
|
|
119
|
+
`;const t=o.querySelector(".rte-cancel-warning-btn"),e=o.querySelector(".rte-confirm-replace-btn");t?.addEventListener("click",()=>b()),e?.addEventListener("click",()=>q())}function T(){const t=y();return m.trim()?R(m):p?t.filter(e=>e.category===p):t}function j(){if(!o)return;o.querySelector(".rte-dialog-close")?.addEventListener("click",()=>c()),o.querySelector(".rte-cancel-btn")?.addEventListener("click",()=>c()),o.querySelector(".rte-insert-btn")?.addEventListener("click",()=>x());const l=o.querySelector(".rte-template-search");l?.addEventListener("input",a=>{m=a.target.value,E()}),l?.addEventListener("keydown",a=>{a.key==="Enter"&&n?x():a.key==="Escape"&&c()}),o.querySelectorAll(".rte-tab").forEach(a=>{a.addEventListener("click",()=>{const i=a.getAttribute("data-category");i&&(p=i,m="",E())})}),o.querySelectorAll(".rte-template-item").forEach(a=>{a.addEventListener("click",()=>{const i=a.getAttribute("data-template-id");if(i){const u=y().find(v=>v.id===i);u&&(n=u,b())}}),a.addEventListener("dblclick",()=>{const i=a.getAttribute("data-template-id");if(i){const u=y().find(v=>v.id===i);u&&(n=u,x())}})}),o.querySelectorAll('input[name="insertMode"]').forEach(a=>{a.addEventListener("change",i=>{g=i.target.value,b()})})}function E(){const t=T();t.length>0?(!n||!t.find(e=>e.id===n.id))&&(n=t[0]):n=null,b()}function x(){if(n)if(g==="replace"){let t=null;if(s){let e=s.startContainer;for(;e&&e!==document.body;){if(e.nodeType===Node.ELEMENT_NODE){const r=e;if(r.getAttribute("contenteditable")==="true"){t=r;break}}e=e.parentNode}}if(t||(t=document.querySelector('[contenteditable="true"]')),t?.innerHTML?.trim()){I();return}C(n),c()}else V(n),c()}function q(){n&&(C(n),c())}function V(t){if(s){const f=window.getSelection();f&&(f.removeAllRanges(),f.addRange(s))}const e=window.getSelection();if(!e||e.rangeCount===0)return;const r=e.getRangeAt(0),l=document.createRange().createContextualFragment(L(t.html));r.deleteContents(),r.insertNode(l);const h=document.createRange();h.setStartAfter(r.endContainer),h.collapse(!0),e.removeAllRanges(),e.addRange(h)}function C(t){let e=null;if(s){let r=s.startContainer;for(;r&&r!==document.body;){if(r.nodeType===Node.ELEMENT_NODE){const l=r;if(l.getAttribute("contenteditable")==="true"){e=l;break}}r=r.parentNode}}e||(e=document.querySelector('[contenteditable="true"]')),e&&(e.innerHTML=L(t.html),e.dispatchEvent(new Event("input",{bubbles:!0})))}function c(){d&&(d.remove(),d=null),o=null,s=null,m=""}function $(t){const e=window.getSelection();e&&e.rangeCount>0?s=e.getRangeAt(0).cloneRange():s=null;const r=T();r.length>0&&!n&&(n=r[0]);const l=t?.contentElement instanceof HTMLElement?t.contentElement:A();D(l)}function P(){if(typeof document>"u")return;const t="template-plugin-dialog-styles";if(document.getElementById(t))return;const e=document.createElement("style");e.id=t,e.textContent=`
|
|
120
|
+
.rte-dialog-overlay {
|
|
121
|
+
--rte-tmpl-overlay-bg: rgba(15, 23, 36, 0.56);
|
|
122
|
+
--rte-tmpl-dialog-bg: #fff;
|
|
123
|
+
--rte-tmpl-dialog-text: #101828;
|
|
124
|
+
--rte-tmpl-border: #d6dbe4;
|
|
125
|
+
--rte-tmpl-subtle-bg: #f7f9fc;
|
|
126
|
+
--rte-tmpl-subtle-hover: #eef2f7;
|
|
127
|
+
--rte-tmpl-muted-text: #5f6b7d;
|
|
128
|
+
--rte-tmpl-accent: #1976d2;
|
|
129
|
+
--rte-tmpl-accent-strong: #1565c0;
|
|
130
|
+
--rte-tmpl-ring: rgba(31, 117, 254, 0.18);
|
|
131
|
+
position: fixed;
|
|
132
|
+
top: 0;
|
|
133
|
+
left: 0;
|
|
134
|
+
right: 0;
|
|
135
|
+
bottom: 0;
|
|
136
|
+
background-color: var(--rte-tmpl-overlay-bg);
|
|
137
|
+
backdrop-filter: blur(2px);
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: center;
|
|
141
|
+
z-index: 10000;
|
|
142
|
+
padding: 16px;
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
}
|
|
145
|
+
.rte-dialog-overlay.rte-ui-theme-dark {
|
|
146
|
+
--rte-tmpl-overlay-bg: rgba(2, 8, 20, 0.72);
|
|
147
|
+
--rte-tmpl-dialog-bg: #202938;
|
|
148
|
+
--rte-tmpl-dialog-text: #e8effc;
|
|
149
|
+
--rte-tmpl-border: #49566c;
|
|
150
|
+
--rte-tmpl-subtle-bg: #2a3444;
|
|
151
|
+
--rte-tmpl-subtle-hover: #344256;
|
|
152
|
+
--rte-tmpl-muted-text: #a5b1c5;
|
|
153
|
+
--rte-tmpl-accent: #58a6ff;
|
|
154
|
+
--rte-tmpl-accent-strong: #4598f4;
|
|
155
|
+
--rte-tmpl-ring: rgba(88, 166, 255, 0.22);
|
|
156
|
+
}
|
|
157
|
+
.rte-template-dialog {
|
|
158
|
+
background: var(--rte-tmpl-dialog-bg);
|
|
159
|
+
color: var(--rte-tmpl-dialog-text);
|
|
160
|
+
border: 1px solid var(--rte-tmpl-border);
|
|
161
|
+
border-radius: 12px;
|
|
162
|
+
box-shadow: 0 24px 48px rgba(10, 15, 24, 0.28);
|
|
163
|
+
width: 600px;
|
|
164
|
+
max-height: 700px;
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
}
|
|
169
|
+
.rte-dialog-header {
|
|
170
|
+
display: flex;
|
|
171
|
+
justify-content: space-between;
|
|
172
|
+
align-items: center;
|
|
173
|
+
padding: 16px 20px;
|
|
174
|
+
border-bottom: 1px solid var(--rte-tmpl-border);
|
|
175
|
+
background: linear-gradient(180deg, rgba(127, 154, 195, 0.08) 0%, rgba(127, 154, 195, 0) 100%);
|
|
176
|
+
}
|
|
177
|
+
.rte-dialog-header h2 {
|
|
178
|
+
margin: 0;
|
|
179
|
+
font-size: 18px;
|
|
180
|
+
font-weight: 600;
|
|
181
|
+
color: var(--rte-tmpl-dialog-text);
|
|
182
|
+
}
|
|
183
|
+
.rte-dialog-close {
|
|
184
|
+
background: none;
|
|
185
|
+
border: none;
|
|
186
|
+
font-size: 24px;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
color: var(--rte-tmpl-muted-text);
|
|
189
|
+
padding: 0;
|
|
190
|
+
width: 32px;
|
|
191
|
+
height: 32px;
|
|
192
|
+
display: flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
justify-content: center;
|
|
195
|
+
border-radius: 8px;
|
|
196
|
+
transition: background-color 0.16s ease, color 0.16s ease;
|
|
197
|
+
}
|
|
198
|
+
.rte-dialog-close:hover {
|
|
199
|
+
background-color: var(--rte-tmpl-subtle-hover);
|
|
200
|
+
color: var(--rte-tmpl-dialog-text);
|
|
201
|
+
}
|
|
202
|
+
.rte-dialog-body {
|
|
203
|
+
padding: 20px;
|
|
204
|
+
flex: 1;
|
|
205
|
+
overflow-y: auto;
|
|
206
|
+
}
|
|
207
|
+
.rte-input {
|
|
208
|
+
width: 100%;
|
|
209
|
+
padding: 8px 12px;
|
|
210
|
+
border: 1px solid var(--rte-tmpl-border);
|
|
211
|
+
border-radius: 4px;
|
|
212
|
+
font-size: 14px;
|
|
213
|
+
box-sizing: border-box;
|
|
214
|
+
background: var(--rte-tmpl-subtle-bg);
|
|
215
|
+
color: var(--rte-tmpl-dialog-text);
|
|
216
|
+
}
|
|
217
|
+
.rte-input:focus {
|
|
218
|
+
outline: none;
|
|
219
|
+
border-color: var(--rte-tmpl-accent);
|
|
220
|
+
}
|
|
221
|
+
.rte-tabs {
|
|
222
|
+
display: flex;
|
|
223
|
+
gap: 8px;
|
|
224
|
+
margin-top: 12px;
|
|
225
|
+
border-bottom: 1px solid var(--rte-tmpl-border);
|
|
226
|
+
padding-bottom: 8px;
|
|
227
|
+
}
|
|
228
|
+
.rte-tab {
|
|
229
|
+
padding: 6px 12px;
|
|
230
|
+
border: none;
|
|
231
|
+
background: none;
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
font-size: 14px;
|
|
234
|
+
color: var(--rte-tmpl-muted-text);
|
|
235
|
+
border-bottom: 2px solid transparent;
|
|
236
|
+
transition: all 0.2s;
|
|
237
|
+
}
|
|
238
|
+
.rte-tab:hover {
|
|
239
|
+
color: var(--rte-tmpl-dialog-text);
|
|
240
|
+
}
|
|
241
|
+
.rte-tab.active {
|
|
242
|
+
color: var(--rte-tmpl-accent);
|
|
243
|
+
border-bottom-color: var(--rte-tmpl-accent);
|
|
244
|
+
font-weight: 600;
|
|
245
|
+
}
|
|
246
|
+
.rte-template-list {
|
|
247
|
+
border: 1px solid var(--rte-tmpl-border);
|
|
248
|
+
border-radius: 4px;
|
|
249
|
+
max-height: 250px;
|
|
250
|
+
overflow-y: auto;
|
|
251
|
+
margin: 12px 0;
|
|
252
|
+
background: var(--rte-tmpl-subtle-bg);
|
|
253
|
+
}
|
|
254
|
+
.rte-template-item {
|
|
255
|
+
padding: 12px;
|
|
256
|
+
border-bottom: 1px solid var(--rte-tmpl-border);
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
transition: background-color 0.2s;
|
|
259
|
+
background: none;
|
|
260
|
+
}
|
|
261
|
+
.rte-template-item:last-child {
|
|
262
|
+
border-bottom: none;
|
|
263
|
+
}
|
|
264
|
+
.rte-template-item:hover,
|
|
265
|
+
.rte-template-item.selected {
|
|
266
|
+
background-color: var(--rte-tmpl-subtle-hover);
|
|
267
|
+
}
|
|
268
|
+
.template-name {
|
|
269
|
+
font-weight: 600;
|
|
270
|
+
color: var(--rte-tmpl-dialog-text);
|
|
271
|
+
margin-bottom: 4px;
|
|
272
|
+
}
|
|
273
|
+
.template-description {
|
|
274
|
+
font-size: 12px;
|
|
275
|
+
color: var(--rte-tmpl-muted-text);
|
|
276
|
+
}
|
|
277
|
+
.rte-template-preview {
|
|
278
|
+
padding: 12px;
|
|
279
|
+
background-color: var(--rte-tmpl-subtle-bg);
|
|
280
|
+
border: 1px solid var(--rte-tmpl-border);
|
|
281
|
+
border-radius: 4px;
|
|
282
|
+
margin-top: 12px;
|
|
283
|
+
max-height: 200px;
|
|
284
|
+
overflow-y: auto;
|
|
285
|
+
}
|
|
286
|
+
.template-preview-content {
|
|
287
|
+
font-size: 13px;
|
|
288
|
+
line-height: 1.5;
|
|
289
|
+
margin-top: 8px;
|
|
290
|
+
}
|
|
291
|
+
.template-preview-content * {
|
|
292
|
+
margin: 4px 0;
|
|
293
|
+
}
|
|
294
|
+
.rte-insert-mode {
|
|
295
|
+
margin-top: 12px;
|
|
296
|
+
padding: 12px;
|
|
297
|
+
background-color: var(--rte-tmpl-subtle-bg);
|
|
298
|
+
border-radius: 4px;
|
|
299
|
+
display: flex;
|
|
300
|
+
gap: 16px;
|
|
301
|
+
}
|
|
302
|
+
.rte-insert-mode label {
|
|
303
|
+
display: flex;
|
|
304
|
+
align-items: center;
|
|
305
|
+
cursor: pointer;
|
|
306
|
+
font-size: 14px;
|
|
307
|
+
}
|
|
308
|
+
.rte-insert-mode input {
|
|
309
|
+
margin-right: 6px;
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
}
|
|
312
|
+
.rte-empty-state {
|
|
313
|
+
padding: 40px;
|
|
314
|
+
text-align: center;
|
|
315
|
+
color: var(--rte-tmpl-muted-text);
|
|
316
|
+
font-size: 14px;
|
|
317
|
+
}
|
|
318
|
+
.rte-dialog-footer {
|
|
319
|
+
padding: 16px 20px;
|
|
320
|
+
border-top: 1px solid var(--rte-tmpl-border);
|
|
321
|
+
background: var(--rte-tmpl-subtle-bg);
|
|
322
|
+
display: flex;
|
|
323
|
+
justify-content: flex-end;
|
|
324
|
+
gap: 12px;
|
|
325
|
+
}
|
|
326
|
+
.rte-button-primary {
|
|
327
|
+
padding: 8px 16px;
|
|
328
|
+
border: none;
|
|
329
|
+
border-radius: 4px;
|
|
330
|
+
font-size: 14px;
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
background-color: var(--rte-tmpl-accent);
|
|
333
|
+
color: white;
|
|
334
|
+
transition: all 0.2s;
|
|
335
|
+
}
|
|
336
|
+
.rte-button-primary:hover:not([disabled]) {
|
|
337
|
+
background-color: var(--rte-tmpl-accent-strong);
|
|
338
|
+
}
|
|
339
|
+
.rte-button-primary[disabled] {
|
|
340
|
+
opacity: 0.5;
|
|
341
|
+
cursor: not-allowed;
|
|
342
|
+
}
|
|
343
|
+
.rte-button-secondary {
|
|
344
|
+
padding: 8px 16px;
|
|
345
|
+
border: 1px solid var(--rte-tmpl-border);
|
|
346
|
+
border-radius: 4px;
|
|
347
|
+
font-size: 14px;
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
background-color: var(--rte-tmpl-subtle-bg);
|
|
350
|
+
color: var(--rte-tmpl-dialog-text);
|
|
351
|
+
transition: all 0.2s;
|
|
352
|
+
}
|
|
353
|
+
.rte-button-secondary:hover {
|
|
354
|
+
background-color: var(--rte-tmpl-subtle-hover);
|
|
355
|
+
}
|
|
356
|
+
`,document.head.appendChild(e)}const z=()=>({name:"template",toolbar:[{label:"Template",command:"insertTemplate",icon:'<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path fill-rule="evenodd" clip-rule="evenodd" d="M3 3V9H21V3H3ZM19 5H5V7H19V5Z" fill="#000000"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M3 11V21H11V11H3ZM9 13H5V19H9V13Z" fill="#000000"></path> <path d="M21 11H13V13H21V11Z" fill="#000000"></path> <path d="M13 15H21V17H13V15Z" fill="#000000"></path> <path d="M21 19H13V21H21V19Z" fill="#000000"></path> </g></svg>'}],commands:{insertTemplate:(t,e)=>($(e),!0)},keymap:{}});exports.TemplatePlugin=z;
|