@aquera/nile-elements 1.5.8 → 1.6.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/README.md +6 -0
- package/dist/index.js +85 -46
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +24 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-link.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-link.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rte-link.esm.js +59 -44
- package/dist/nile-rich-text-editor/utils/inline-utils.cjs.js +1 -1
- package/dist/nile-rich-text-editor/utils/inline-utils.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/utils/inline-utils.esm.js +1 -1
- package/dist/src/nile-dropdown/nile-dropdown.js +4 -2
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +24 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +6 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +62 -24
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-link.d.ts +12 -0
- package/dist/src/nile-rich-text-editor/nile-rte-link.js +239 -130
- package/dist/src/nile-rich-text-editor/nile-rte-link.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-link.test.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-link.test.js +469 -0
- package/dist/src/nile-rich-text-editor/nile-rte-link.test.js.map +1 -0
- package/dist/src/nile-rich-text-editor/utils/inline-utils.js +13 -4
- package/dist/src/nile-rich-text-editor/utils/inline-utils.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-dropdown/nile-dropdown.ts +5 -3
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +24 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +66 -26
- package/src/nile-rich-text-editor/nile-rte-link.test.ts +682 -0
- package/src/nile-rich-text-editor/nile-rte-link.ts +195 -100
- package/src/nile-rich-text-editor/utils/inline-utils.ts +11 -4
- package/vscode-html-custom-data.json +16 -2
|
@@ -8,12 +8,15 @@ export class NileRteLink extends LitElement {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@property({ attribute: false }) editorEl!: HTMLElement;
|
|
11
|
-
@property({ type: Boolean }) newTab = false;
|
|
12
|
-
@property({ type:
|
|
13
|
-
@property({ type:
|
|
14
|
-
|
|
11
|
+
@property({ type: Boolean, reflect: true, attribute: true }) newTab = false;
|
|
12
|
+
@property({ type: Boolean, reflect: true, attribute: true }) disabled = false;
|
|
13
|
+
@property({ type: Boolean, reflect: true, attribute: true }) showTextSupport = false;
|
|
14
|
+
@property({ type: String, reflect: true, attribute: true }) placeholder = 'Type or paste link here';
|
|
15
|
+
@property({ type: String, reflect: true, attribute: true }) textPlaceholder = 'Display text';
|
|
16
|
+
@property({ type: String, reflect: true, attribute: true }) label = 'Link';
|
|
15
17
|
|
|
16
18
|
@state() private linkValue = '';
|
|
19
|
+
@state() private textValue = '';
|
|
17
20
|
@state() private hasActiveLink = false;
|
|
18
21
|
@state() private popoverStyle = '';
|
|
19
22
|
|
|
@@ -30,41 +33,57 @@ export class NileRteLink extends LitElement {
|
|
|
30
33
|
|
|
31
34
|
this.injectCss(`
|
|
32
35
|
nile-popover.rte-link-popover::part(popover) {
|
|
33
|
-
min-width:
|
|
36
|
+
min-width: 340px;
|
|
37
|
+
max-width: 420px;
|
|
34
38
|
background: white;
|
|
35
|
-
border: 1px solid var(--nile-colors-neutral-400,var(--ng-componentcolors-utility-gray-400));
|
|
36
|
-
border-radius:
|
|
39
|
+
border: 1px solid var(--nile-colors-neutral-400, var(--ng-componentcolors-utility-gray-400));
|
|
40
|
+
border-radius: 8px;
|
|
37
41
|
padding: 0;
|
|
38
42
|
gap: 0;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
height: auto;
|
|
45
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.link-popup-wrap {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
gap: 12px;
|
|
52
|
+
padding: 12px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.link-popup-wrap nile-input {
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.link-popup-wrap .link-input-row {
|
|
60
|
+
width: 100%;
|
|
39
61
|
}
|
|
40
62
|
|
|
41
|
-
.link-popup {
|
|
63
|
+
.link-popup-wrap .link-actions-row {
|
|
42
64
|
display: flex;
|
|
43
|
-
align-items:
|
|
44
|
-
gap:
|
|
45
|
-
|
|
65
|
+
align-items: flex-end;
|
|
66
|
+
gap: 4px;
|
|
67
|
+
width: 100%;
|
|
46
68
|
}
|
|
47
69
|
|
|
48
|
-
.link-input {
|
|
70
|
+
.link-popup-wrap .link-actions-row nile-input {
|
|
49
71
|
flex: 1;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
border:
|
|
56
|
-
|
|
72
|
+
min-width: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
nile-button.rte-link-button::part(base) {
|
|
77
|
+
border: none;
|
|
78
|
+
height: 32px;
|
|
79
|
+
width: 32px;
|
|
80
|
+
}
|
|
81
|
+
nile-button.rte-edit-button::part(base) {
|
|
82
|
+
border: none;
|
|
83
|
+
height: 32px;
|
|
84
|
+
width: 32px;
|
|
85
|
+
flex-shrink: 0;
|
|
57
86
|
}
|
|
58
|
-
nile-button.rte-link-button::part(base) {
|
|
59
|
-
border: none;
|
|
60
|
-
height: 32px;
|
|
61
|
-
width: 32px;
|
|
62
|
-
}
|
|
63
|
-
nile-button.rte-edit-button::part(base) {
|
|
64
|
-
border: none;
|
|
65
|
-
height: 38px;
|
|
66
|
-
width: 38px;
|
|
67
|
-
}
|
|
68
87
|
`);
|
|
69
88
|
}
|
|
70
89
|
|
|
@@ -84,7 +103,7 @@ export class NileRteLink extends LitElement {
|
|
|
84
103
|
}
|
|
85
104
|
|
|
86
105
|
private displayUrl(url: string): string {
|
|
87
|
-
return url
|
|
106
|
+
return url;
|
|
88
107
|
}
|
|
89
108
|
|
|
90
109
|
private getSelectionRect(): DOMRect | null {
|
|
@@ -134,6 +153,7 @@ export class NileRteLink extends LitElement {
|
|
|
134
153
|
window.removeEventListener('scroll', this.onScroll, true);
|
|
135
154
|
|
|
136
155
|
this.linkValue = '';
|
|
156
|
+
this.textValue = '';
|
|
137
157
|
this.selectionRange = null;
|
|
138
158
|
this.activeAnchor = null;
|
|
139
159
|
this.hasActiveLink = false;
|
|
@@ -147,9 +167,12 @@ export class NileRteLink extends LitElement {
|
|
|
147
167
|
|
|
148
168
|
|
|
149
169
|
|
|
150
|
-
private onOpen() {
|
|
170
|
+
private onOpen = () => {
|
|
171
|
+
if (this.disabled) return;
|
|
172
|
+
|
|
151
173
|
const sel = document.getSelection();
|
|
152
174
|
if (!sel || sel.rangeCount === 0) return;
|
|
175
|
+
if (!this.editorEl.contains(sel.getRangeAt(0).commonAncestorContainer)) return;
|
|
153
176
|
|
|
154
177
|
this.selectionRange = sel.getRangeAt(0).cloneRange();
|
|
155
178
|
this.activeAnchor = null;
|
|
@@ -169,40 +192,91 @@ export class NileRteLink extends LitElement {
|
|
|
169
192
|
? this.displayUrl(this.activeAnchor.href)
|
|
170
193
|
: '';
|
|
171
194
|
|
|
195
|
+
if (this.showTextSupport) {
|
|
196
|
+
if (this.activeAnchor) {
|
|
197
|
+
this.textValue = this.activeAnchor.textContent || '';
|
|
198
|
+
} else if (!this.selectionRange.collapsed) {
|
|
199
|
+
this.textValue = this.selectionRange.toString();
|
|
200
|
+
} else {
|
|
201
|
+
this.textValue = '';
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
172
205
|
this.positionPopover();
|
|
173
206
|
this.openPopover();
|
|
174
207
|
|
|
175
208
|
requestAnimationFrame(() => {
|
|
176
|
-
this.
|
|
209
|
+
const inputs = this.querySelectorAll('nile-input');
|
|
210
|
+
const target = inputs.length > 1 ? inputs[1] : inputs[0];
|
|
211
|
+
(target as any)?.focus();
|
|
177
212
|
});
|
|
178
213
|
}
|
|
179
214
|
|
|
180
215
|
|
|
181
216
|
|
|
182
|
-
private onInputKeydown(e: KeyboardEvent) {
|
|
217
|
+
private onInputKeydown = (e: KeyboardEvent) => {
|
|
183
218
|
if (e.key !== 'Escape' && e.key !== 'Enter') return;
|
|
184
|
-
|
|
185
219
|
e.preventDefault();
|
|
186
220
|
e.stopPropagation();
|
|
187
|
-
|
|
188
221
|
if (e.key === 'Escape') {
|
|
189
222
|
this.closePopover();
|
|
190
223
|
return;
|
|
191
224
|
}
|
|
192
|
-
|
|
193
225
|
this.isApplying = true;
|
|
194
226
|
try {
|
|
195
227
|
this.applyLink();
|
|
196
228
|
} finally {
|
|
197
229
|
this.isApplying = false;
|
|
198
230
|
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
private onInputBlur() {
|
|
231
|
+
};
|
|
232
|
+
private onInputBlur = () => {
|
|
203
233
|
if (this.ignoreBlur || this.isApplying) return;
|
|
204
|
-
|
|
205
|
-
|
|
234
|
+
requestAnimationFrame(() => {
|
|
235
|
+
if (this.ignoreBlur || this.isApplying) return;
|
|
236
|
+
const pop = this.querySelector('nile-popover');
|
|
237
|
+
if (pop?.matches(':focus-within')) return;
|
|
238
|
+
this.closePopover();
|
|
239
|
+
});
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
private onLinkInput = (e: CustomEvent) => {
|
|
243
|
+
this.linkValue = e.detail.value;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
private onTextInput = (e: CustomEvent) => {
|
|
247
|
+
this.textValue = e.detail.value;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
private onPopoverMousedown = () => {
|
|
251
|
+
this.ignoreBlur = true;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
private onPopoverMouseup = () => {
|
|
255
|
+
this.ignoreBlur = false;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
private onToolbarButtonMousedown = (e: Event) => {
|
|
259
|
+
e.preventDefault();
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
private onActionMousedown = (e: Event) => {
|
|
263
|
+
e.preventDefault();
|
|
264
|
+
this.ignoreBlur = true;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
private onApplyClick = () => {
|
|
268
|
+
this.isApplying = true;
|
|
269
|
+
this.applyLink();
|
|
270
|
+
this.isApplying = false;
|
|
271
|
+
this.ignoreBlur = false;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
private onUnlinkClick = () => {
|
|
275
|
+
this.isApplying = true;
|
|
276
|
+
this.onRemove();
|
|
277
|
+
this.isApplying = false;
|
|
278
|
+
this.ignoreBlur = false;
|
|
279
|
+
};
|
|
206
280
|
|
|
207
281
|
|
|
208
282
|
|
|
@@ -211,19 +285,12 @@ export class NileRteLink extends LitElement {
|
|
|
211
285
|
|
|
212
286
|
let url = this.linkValue.trim();
|
|
213
287
|
if (!url) return;
|
|
214
|
-
|
|
215
|
-
let parsed: URL;
|
|
216
|
-
try {
|
|
217
|
-
parsed = new URL(url, window.location.href);
|
|
218
|
-
if (!['http:', 'https:', 'mailto:', 'tel:'].includes(parsed.protocol)) return;
|
|
219
|
-
} catch {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
url = parsed.href;
|
|
224
|
-
|
|
225
288
|
|
|
226
|
-
|
|
289
|
+
if (/^javascript:/i.test(url)) return;
|
|
290
|
+
|
|
291
|
+
if (!/^(https?:\/\/|mailto:|tel:|\/)/i.test(url)) {
|
|
292
|
+
url = `https://${url}`;
|
|
293
|
+
}
|
|
227
294
|
|
|
228
295
|
this.editorEl.focus();
|
|
229
296
|
|
|
@@ -233,9 +300,17 @@ export class NileRteLink extends LitElement {
|
|
|
233
300
|
sel.removeAllRanges();
|
|
234
301
|
sel.addRange(this.selectionRange);
|
|
235
302
|
|
|
303
|
+
const displayText = this.showTextSupport && this.textValue.trim()
|
|
304
|
+
? this.textValue.trim()
|
|
305
|
+
: '';
|
|
306
|
+
|
|
236
307
|
if (this.activeAnchor) {
|
|
237
308
|
this.activeAnchor.href = url;
|
|
238
309
|
|
|
310
|
+
if (displayText) {
|
|
311
|
+
this.activeAnchor.textContent = displayText;
|
|
312
|
+
}
|
|
313
|
+
|
|
239
314
|
if (this.newTab) {
|
|
240
315
|
this.activeAnchor.target = '_blank';
|
|
241
316
|
this.activeAnchor.rel = 'noopener noreferrer';
|
|
@@ -256,7 +331,11 @@ export class NileRteLink extends LitElement {
|
|
|
256
331
|
link.removeAttribute('rel');
|
|
257
332
|
}
|
|
258
333
|
|
|
259
|
-
if (
|
|
334
|
+
if (displayText) {
|
|
335
|
+
this.selectionRange.deleteContents();
|
|
336
|
+
link.textContent = displayText;
|
|
337
|
+
this.selectionRange.insertNode(link);
|
|
338
|
+
} else if (this.selectionRange.collapsed) {
|
|
260
339
|
link.textContent = url;
|
|
261
340
|
this.selectionRange.insertNode(link);
|
|
262
341
|
} else {
|
|
@@ -292,58 +371,74 @@ export class NileRteLink extends LitElement {
|
|
|
292
371
|
}
|
|
293
372
|
|
|
294
373
|
render() {
|
|
374
|
+
const iconColor = this.disabled
|
|
375
|
+
? 'var(--nile-colors-neutral-500, var(--ng-colors-fg-disabled-subtle))'
|
|
376
|
+
: 'var(--nile-colors-dark-900, var(--ng-colors-text-primary-900))';
|
|
377
|
+
|
|
295
378
|
return html`
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
379
|
+
<nile-lite-tooltip content=${this.label}>
|
|
380
|
+
<nile-button
|
|
381
|
+
variant="tertiary"
|
|
382
|
+
size="small"
|
|
383
|
+
?disabled=${this.disabled}
|
|
384
|
+
@mousedown=${this.onToolbarButtonMousedown}
|
|
385
|
+
@click=${this.onOpen}
|
|
386
|
+
class="rte-link-button"
|
|
387
|
+
>
|
|
388
|
+
<nile-icon name="link_2" color=${iconColor}></nile-icon>
|
|
389
|
+
</nile-button>
|
|
390
|
+
</nile-lite-tooltip>
|
|
307
391
|
|
|
308
392
|
<nile-popover
|
|
309
393
|
class="rte-link-popover"
|
|
310
394
|
.arrow=${false}
|
|
311
395
|
style=${this.popoverStyle}
|
|
312
|
-
@mousedown=${
|
|
313
|
-
@mouseup=${
|
|
396
|
+
@mousedown=${this.onPopoverMousedown}
|
|
397
|
+
@mouseup=${this.onPopoverMouseup}
|
|
314
398
|
>
|
|
315
|
-
<div class="link-popup">
|
|
316
|
-
|
|
317
|
-
class="link-input"
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
399
|
+
<div class="link-popup-wrap">
|
|
400
|
+
${this.showTextSupport ? html`
|
|
401
|
+
<div class="link-input-row">
|
|
402
|
+
<nile-input
|
|
403
|
+
label="Text"
|
|
404
|
+
placeholder=${this.textPlaceholder}
|
|
405
|
+
.value=${this.textValue}
|
|
406
|
+
@nile-input=${this.onTextInput}
|
|
407
|
+
@keydown=${this.onInputKeydown}
|
|
408
|
+
@nile-blur=${this.onInputBlur}
|
|
409
|
+
></nile-input>
|
|
410
|
+
</div>
|
|
411
|
+
` : null}
|
|
412
|
+
<div class="link-actions-row">
|
|
413
|
+
<nile-input
|
|
414
|
+
label=${this.showTextSupport ? 'URL' : ''}
|
|
415
|
+
placeholder=${this.placeholder}
|
|
416
|
+
.value=${this.linkValue}
|
|
417
|
+
@nile-input=${this.onLinkInput}
|
|
418
|
+
@keydown=${this.onInputKeydown}
|
|
419
|
+
@nile-blur=${this.onInputBlur}
|
|
420
|
+
></nile-input>
|
|
421
|
+
${this.hasActiveLink ? html`
|
|
422
|
+
<nile-button
|
|
423
|
+
size="small"
|
|
424
|
+
variant="tertiary"
|
|
425
|
+
class="rte-edit-button"
|
|
426
|
+
@mousedown=${this.onActionMousedown}
|
|
427
|
+
@click=${this.onApplyClick}
|
|
428
|
+
>
|
|
429
|
+
<nile-icon name="pencil"></nile-icon>
|
|
430
|
+
</nile-button>
|
|
431
|
+
<nile-button
|
|
432
|
+
size="small"
|
|
433
|
+
variant="tertiary"
|
|
434
|
+
class="rte-edit-button"
|
|
435
|
+
@mousedown=${this.onActionMousedown}
|
|
436
|
+
@click=${this.onUnlinkClick}
|
|
437
|
+
>
|
|
438
|
+
<nile-icon name="unlink"></nile-icon>
|
|
439
|
+
</nile-button>
|
|
440
|
+
` : null}
|
|
441
|
+
</div>
|
|
347
442
|
</div>
|
|
348
443
|
</nile-popover>
|
|
349
444
|
`;
|
|
@@ -163,13 +163,20 @@ export function toggleInlineTag(
|
|
|
163
163
|
}
|
|
164
164
|
} else {
|
|
165
165
|
textNodes.forEach(txt => {
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
166
|
+
const inProtected = txt.parentElement?.closest('.mention, nile-mention');
|
|
167
|
+
if (inProtected) return;
|
|
168
|
+
const inAnchor = txt.parentElement?.closest('a');
|
|
169
|
+
if (inAnchor && tag === 'span') return;
|
|
168
170
|
const wrapper = document.createElement(tag);
|
|
169
171
|
if (attrs)
|
|
170
172
|
Object.entries(attrs).forEach(([k, v]) => wrapper.setAttribute(k, v));
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
if (inAnchor) {
|
|
174
|
+
inAnchor.insertBefore(wrapper, txt);
|
|
175
|
+
wrapper.appendChild(txt);
|
|
176
|
+
} else {
|
|
177
|
+
txt.parentNode?.insertBefore(wrapper, txt);
|
|
178
|
+
wrapper.appendChild(txt);
|
|
179
|
+
}
|
|
173
180
|
});
|
|
174
181
|
}
|
|
175
182
|
|
|
@@ -3931,7 +3931,7 @@
|
|
|
3931
3931
|
},
|
|
3932
3932
|
{
|
|
3933
3933
|
"name": "nile-rich-text-editor",
|
|
3934
|
-
"description": "Events:\n\n * `nile-change` {`CustomEvent<{ content: string; mention: any; }>`} - \n\nAttributes:\n\n * `value` {`string`} - \n\n * `noStyles` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `singlelineeditor` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `mentions` - \n\n * `whitelist` {`string[]`} - \n\nProperties:\n\n * `value` {`string`} - \n\n * `noStyles` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `singleLineEditor` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `mentions` - \n\n * `whitelist` {`string[]`} - \n\n * `content` {`string`} - \n\n * `editorEl` {`HTMLElement`} - \n\n * `previewEl` {`HTMLElement | null`} - \n\n * `toolbarEl` {`HTMLElement | null`} - \n\n * `lastRange` {`Range | null`} - \n\n * `buttonMap` {`Map<string, HTMLElement[]>`} - \n\n * `headingSelect` {`HTMLSelectElement | null`} - \n\n * `fontSelect` {`HTMLSelectElement | null`} - \n\n * `colorInput` {`HTMLInputElement | null`} - \n\n * `bgColorInput` {`HTMLInputElement | null`} - \n\n * `colorSwatchEl` {`HTMLElement | null`} - \n\n * `bgSwatchEl` {`HTMLElement | null`} - \n\n * `containerEl` {`HTMLElement | null`} - \n\n * `mentionsEl` {`HTMLElement | null`} - \n\n * `onEditorKeydown` - \n\n * `onSelectionChange` - ",
|
|
3934
|
+
"description": "Events:\n\n * `nile-change` {`CustomEvent<{ content: string; mention: any; }>`} - \n\nAttributes:\n\n * `value` {`string`} - \n\n * `noStyles` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `singlelineeditor` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `mentions` - \n\n * `whitelist` {`string[]`} - \n\nProperties:\n\n * `value` {`string`} - \n\n * `noStyles` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `singleLineEditor` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `mentions` - \n\n * `whitelist` {`string[]`} - \n\n * `content` {`string`} - \n\n * `editorEl` {`HTMLElement`} - \n\n * `previewEl` {`HTMLElement | null`} - \n\n * `toolbarEl` {`HTMLElement | null`} - \n\n * `lastRange` {`Range | null`} - \n\n * `buttonMap` {`Map<string, HTMLElement[]>`} - \n\n * `headingSelect` {`HTMLSelectElement | null`} - \n\n * `fontSelect` {`HTMLSelectElement | null`} - \n\n * `colorInput` {`HTMLInputElement | null`} - \n\n * `bgColorInput` {`HTMLInputElement | null`} - \n\n * `colorSwatchEl` {`HTMLElement | null`} - \n\n * `bgSwatchEl` {`HTMLElement | null`} - \n\n * `containerEl` {`HTMLElement | null`} - \n\n * `linkEl` {`HTMLElement | null`} - \n\n * `mentionsEl` {`HTMLElement | null`} - \n\n * `onEditorClick` - \n\n * `onEditorInput` - \n\n * `onEditorMouseup` - \n\n * `onEditorKeyup` - \n\n * `onEditorKeydown` - \n\n * `onSelectionChange` - ",
|
|
3935
3935
|
"attributes": [
|
|
3936
3936
|
{
|
|
3937
3937
|
"name": "value",
|
|
@@ -4010,17 +4010,31 @@
|
|
|
4010
4010
|
},
|
|
4011
4011
|
{
|
|
4012
4012
|
"name": "nile-rte-link",
|
|
4013
|
-
"description": "Events:\n\n * `nile-link-changed` {`CustomEvent<{ href: string; }>`} - \n\nAttributes:\n\n * `newTab` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `label` {`string`} - \n\nProperties:\n\n * `editorEl` {`HTMLElement`} - \n\n * `newTab` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `label` {`string`} - \n\n * `linkValue` {`string`} - \n\n * `hasActiveLink` {`boolean`} - \n\n * `popoverStyle` {`string`} - \n\n * `selectionRange` {`Range | null`} - \n\n * `activeAnchor` {`HTMLAnchorElement | null`} - \n\n * `ignoreBlur` {`boolean`} - \n\n * `isApplying` {`boolean`} - \n\n * `onScroll` - ",
|
|
4013
|
+
"description": "Events:\n\n * `nile-link-changed` {`CustomEvent<{ href: string; }>`} - \n\nAttributes:\n\n * `newTab` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `showTextSupport` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `textPlaceholder` {`string`} - \n\n * `label` {`string`} - \n\nProperties:\n\n * `editorEl` {`HTMLElement`} - \n\n * `newTab` {`boolean`} - \n\n * `disabled` {`boolean`} - \n\n * `showTextSupport` {`boolean`} - \n\n * `placeholder` {`string`} - \n\n * `textPlaceholder` {`string`} - \n\n * `label` {`string`} - \n\n * `linkValue` {`string`} - \n\n * `textValue` {`string`} - \n\n * `hasActiveLink` {`boolean`} - \n\n * `popoverStyle` {`string`} - \n\n * `selectionRange` {`Range | null`} - \n\n * `activeAnchor` {`HTMLAnchorElement | null`} - \n\n * `ignoreBlur` {`boolean`} - \n\n * `isApplying` {`boolean`} - \n\n * `onScroll` - \n\n * `onOpen` - \n\n * `onInputKeydown` - \n\n * `onInputBlur` - \n\n * `onLinkInput` - \n\n * `onTextInput` - \n\n * `onPopoverMousedown` - \n\n * `onPopoverMouseup` - \n\n * `onToolbarButtonMousedown` - \n\n * `onActionMousedown` - \n\n * `onApplyClick` - \n\n * `onUnlinkClick` - ",
|
|
4014
4014
|
"attributes": [
|
|
4015
4015
|
{
|
|
4016
4016
|
"name": "newTab",
|
|
4017
4017
|
"description": "`newTab` {`boolean`} - \n\nProperty: newTab\n\nDefault: false",
|
|
4018
4018
|
"valueSet": "v"
|
|
4019
4019
|
},
|
|
4020
|
+
{
|
|
4021
|
+
"name": "disabled",
|
|
4022
|
+
"description": "`disabled` {`boolean`} - \n\nProperty: disabled\n\nDefault: false",
|
|
4023
|
+
"valueSet": "v"
|
|
4024
|
+
},
|
|
4025
|
+
{
|
|
4026
|
+
"name": "showTextSupport",
|
|
4027
|
+
"description": "`showTextSupport` {`boolean`} - \n\nProperty: showTextSupport\n\nDefault: false",
|
|
4028
|
+
"valueSet": "v"
|
|
4029
|
+
},
|
|
4020
4030
|
{
|
|
4021
4031
|
"name": "placeholder",
|
|
4022
4032
|
"description": "`placeholder` {`string`} - \n\nProperty: placeholder\n\nDefault: Type or paste link here"
|
|
4023
4033
|
},
|
|
4034
|
+
{
|
|
4035
|
+
"name": "textPlaceholder",
|
|
4036
|
+
"description": "`textPlaceholder` {`string`} - \n\nProperty: textPlaceholder\n\nDefault: Display text"
|
|
4037
|
+
},
|
|
4024
4038
|
{
|
|
4025
4039
|
"name": "label",
|
|
4026
4040
|
"description": "`label` {`string`} - \n\nProperty: label\n\nDefault: Link"
|