@innoviatech/lexical-text-editor 2.0.6 → 3.0.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.
Files changed (111) hide show
  1. package/README.md +390 -241
  2. package/dist/components/AlignmentSelectionList.js +19 -0
  3. package/dist/components/ColorPicker.js +30 -0
  4. package/dist/components/ContentPreview.js +11 -0
  5. package/dist/components/DisplayControls.d.ts +16 -0
  6. package/dist/components/DropdownList.js +18 -0
  7. package/dist/components/FindReplaceModal.d.ts +11 -0
  8. package/dist/components/FindReplaceModal.js +120 -0
  9. package/dist/components/FontSelectionList.d.ts +17 -0
  10. package/dist/components/FontSelectionList.js +17 -0
  11. package/dist/components/HeadingSelectionList.js +19 -0
  12. package/dist/components/ImageComponent.d.ts +1 -0
  13. package/dist/components/ImageComponent.js +111 -0
  14. package/dist/components/InsertDropdownList.js +17 -0
  15. package/dist/components/LexicalTextEditor.d.ts +11 -0
  16. package/dist/components/LexicalTextEditor.js +128 -0
  17. package/dist/components/LinkModal.js +47 -0
  18. package/dist/components/Separator.js +4 -0
  19. package/dist/components/SourceView.d.ts +13 -0
  20. package/dist/components/SourceView.js +50 -0
  21. package/dist/components/StatusBar.d.ts +14 -0
  22. package/dist/components/StatusBar.js +30 -0
  23. package/dist/components/ToolbarOverflowModal.d.ts +15 -0
  24. package/dist/components/common/Dialog.js +27 -0
  25. package/dist/components/common/Popover.d.ts +10 -1
  26. package/dist/components/common/Popover.js +37 -0
  27. package/dist/components/common/Tooltip.d.ts +7 -0
  28. package/dist/components/common/Tooltip.js +20 -0
  29. package/dist/components/ui/button.js +35 -0
  30. package/dist/components/ui/command.js +33 -0
  31. package/dist/components/ui/dialog.js +35 -0
  32. package/dist/components/ui/input.js +6 -0
  33. package/dist/components/ui/popover.js +16 -0
  34. package/dist/components/ui/scroll-area.js +12 -0
  35. package/dist/components/ui/tooltip.js +16 -0
  36. package/dist/constants/index.d.ts +23 -1
  37. package/dist/constants/index.js +224 -0
  38. package/dist/index.d.ts +11 -0
  39. package/dist/index.esm.js +1 -1
  40. package/dist/index.esm.js.map +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/index.js.map +1 -1
  43. package/dist/lexical-editor.css +1 -1
  44. package/dist/lib/utils.js +5 -0
  45. package/dist/nodes/ExtendedTextNode.js +140 -0
  46. package/dist/nodes/ImageNode.d.ts +5 -1
  47. package/dist/nodes/ImageNode.js +149 -0
  48. package/dist/nodes/VideoNode.js +80 -0
  49. package/dist/nodes/YoutubeNode.js +64 -0
  50. package/dist/plugins/CodeBlockPlugin.d.ts +1 -0
  51. package/dist/plugins/CodeBlockPlugin.js +88 -0
  52. package/dist/plugins/ColorPlugin.js +47 -0
  53. package/dist/plugins/CustomOnChangePlugin.js +33 -0
  54. package/dist/plugins/FontFamilyPlugin.d.ts +1 -0
  55. package/dist/plugins/FontFamilyPlugin.js +53 -0
  56. package/dist/plugins/FontSizePlugin.d.ts +1 -0
  57. package/dist/plugins/FontSizePlugin.js +48 -0
  58. package/dist/plugins/ImagePlugin.d.ts +3 -1
  59. package/dist/plugins/ImagePlugin.js +91 -0
  60. package/dist/plugins/ListPlugin.js +44 -0
  61. package/dist/plugins/TablePlugin.d.ts +1 -0
  62. package/dist/plugins/TablePlugin.js +92 -0
  63. package/dist/plugins/ToolbarPlugin.d.ts +14 -1
  64. package/dist/plugins/ToolbarPlugin.js +381 -0
  65. package/dist/plugins/VideoPlugin.js +49 -0
  66. package/dist/plugins/YoutubePlugin.js +30 -0
  67. package/dist/tsconfig.tsbuildinfo +1 -0
  68. package/editor_screenshot.png +0 -0
  69. package/package.json +11 -4
  70. package/googlebd703883f12c69e4.html +0 -1
  71. package/rollup.config.js +0 -55
  72. package/src/components/AlignmentSelectionList.tsx +0 -61
  73. package/src/components/ColorPicker.tsx +0 -66
  74. package/src/components/ContentPreview.tsx +0 -51
  75. package/src/components/DropdownList.tsx +0 -57
  76. package/src/components/HeadingSelectionList.tsx +0 -61
  77. package/src/components/ImageComponent.tsx +0 -140
  78. package/src/components/InsertDropdownList.tsx +0 -36
  79. package/src/components/LexicalTextEditor.tsx +0 -119
  80. package/src/components/LinkModal.tsx +0 -127
  81. package/src/components/Separator.tsx +0 -7
  82. package/src/components/common/Dialog.tsx +0 -47
  83. package/src/components/common/Popover.tsx +0 -87
  84. package/src/components/common/Tooltip.tsx +0 -43
  85. package/src/components/ui/button.tsx +0 -58
  86. package/src/components/ui/command.tsx +0 -183
  87. package/src/components/ui/dialog.tsx +0 -142
  88. package/src/components/ui/input.tsx +0 -21
  89. package/src/components/ui/popover.tsx +0 -46
  90. package/src/components/ui/scroll-area.tsx +0 -56
  91. package/src/components/ui/tooltip.tsx +0 -59
  92. package/src/constants/index.tsx +0 -177
  93. package/src/index.ts +0 -6
  94. package/src/lib/utils.ts +0 -6
  95. package/src/nodes/ExtendedTextNode.tsx +0 -185
  96. package/src/nodes/ImageNode.tsx +0 -195
  97. package/src/nodes/VideoNode.tsx +0 -134
  98. package/src/nodes/YoutubeNode.tsx +0 -101
  99. package/src/plugins/ColorPlugin.tsx +0 -85
  100. package/src/plugins/CustomOnChangePlugin.tsx +0 -50
  101. package/src/plugins/ImagePlugin.tsx +0 -118
  102. package/src/plugins/ListPlugin.tsx +0 -58
  103. package/src/plugins/ToolbarPlugin.tsx +0 -500
  104. package/src/plugins/VideoPlugin.tsx +0 -100
  105. package/src/plugins/YoutubePlugin.tsx +0 -83
  106. package/src/styles/lexical-editor.css +0 -1053
  107. package/src/types/global.d.ts +0 -34
  108. package/src/types/other.d.ts +0 -11
  109. package/src/types/react-icons.d.ts +0 -11
  110. package/tailwind.config.js +0 -10
  111. package/tsconfig.json +0 -32
@@ -1,1053 +0,0 @@
1
-
2
- /* Minimal Reset */
3
-
4
-
5
- .lexical-text-editor * {
6
- box-sizing: border-box;
7
- font-family: inherit;
8
- }
9
-
10
- .lexical-text-editor {
11
- height: fit-content;
12
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
13
- }
14
-
15
- .lexical-text-editor button {
16
- background: transparent;
17
- border: 1px solid transparent;
18
- cursor: pointer;
19
- }
20
-
21
-
22
-
23
- .lexical-text-editor a {
24
- font-weight: 500;
25
- color: #646cff;
26
- text-decoration: inherit;
27
- }
28
- .lexical-text-editor a:hover {
29
- color: #535bf2;
30
- }
31
-
32
- .lexical-text-editor {
33
- scrollbar-width: thin;
34
- font-size: 16px !important;
35
- scrollbar-color: rgb(156 163 175) transparent;
36
- background-color: #fff;
37
- border: 1px solid #e5e7eb;
38
- border-radius: 0.5rem;
39
- padding-bottom: 0.5rem;
40
- color: black;
41
- }
42
-
43
- .lexical-text-editor input{
44
- background-color: #fff;
45
- color: black;
46
- outline: none;
47
- }
48
-
49
- .link-editor-buttons input{
50
- background-color: #220909;
51
- color: black;
52
- stroke: black;
53
- outline: none;
54
- }
55
-
56
- .lexical-text-editor input:focus{
57
- border: 1px solid #676666;
58
- }
59
-
60
- /* display: 'flex', flexWrap: 'wrap',
61
- gap: 6, justifyContent: 'start', alignItems: 'center', */
62
-
63
- .lexical-toolbar-wrapper{
64
- display: flex;
65
- flex-wrap: wrap;
66
- gap: 6px;
67
- row-gap: 12px;
68
- justify-content: center;
69
- align-items: center;
70
- }
71
-
72
- .lexical-toolbar-wrapper.useScroll{
73
- flex-wrap: nowrap;
74
- }
75
-
76
-
77
-
78
- .lexical-text-editor::-webkit-scrollbar {
79
- width: 6px;
80
- }
81
-
82
- .lexical-text-editor::-webkit-scrollbar-track {
83
- background: transparent;
84
- }
85
-
86
- .lexical-text-editor::-webkit-scrollbar-thumb {
87
- background-color: rgb(156 163 175);
88
- border-radius: 3px;
89
- }
90
-
91
- .lexical-text-editor::-webkit-scrollbar-thumb:hover {
92
- background-color: rgb(107 114 128);
93
- }
94
-
95
- .lexical-text-editor [contenteditable="true"] {
96
- outline: none;
97
- }
98
-
99
- .lexical-text-editor h1 {
100
- font-size: 32px;
101
- margin: 8px 0;
102
- font-weight: bold;
103
- }
104
-
105
- .lexical-text-editor h2 {
106
- font-size: 28.8px;
107
- margin: 8px 0;
108
- font-weight: bold;
109
- }
110
-
111
- .lexical-text-editor h3 {
112
- font-size: 25.6px;
113
- margin: 3.2px 0;
114
- font-weight: bold;
115
- }
116
-
117
- .lexical-text-editor h4 {
118
- font-size: 22.4px;
119
- margin: 3.2px 0;
120
- font-weight: bold;
121
- }
122
-
123
- .lexical-text-editor h5 {
124
- font-size: 19.2px;
125
- margin: 3.2px 0;
126
- font-weight: bold;
127
- }
128
-
129
- .lexical-text-editor h6 {
130
- font-size: 16px;
131
- margin: 3.2px 0;
132
- font-weight: bold;
133
- }
134
-
135
- .scrollbar-thin {
136
- scrollbar-width: thin;
137
- scrollbar-color: #a5acb6 transparent;
138
- }
139
-
140
- .scrollbar-thin::-webkit-scrollbar {
141
- width: 4px;
142
- height: 4px;
143
- }
144
-
145
- .scrollbar-thin::-webkit-scrollbar-track {
146
- background: transparent;
147
- }
148
-
149
- .scrollbar-thin::-webkit-scrollbar-thumb {
150
- background-color: #a5acb6;
151
- border-radius: 9999px;
152
- }
153
-
154
-
155
-
156
- /* ---------------------------- */
157
-
158
- .lexical-editor-container {
159
- position: relative;
160
- box-sizing: border-box;
161
- }
162
-
163
- .lexical-toolbar-container {
164
- padding-left: 0.5rem;
165
- padding-right: 0.5rem;
166
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
167
- }
168
-
169
- .lexical-editor-inner {
170
- position: relative;
171
- height: 100%;
172
- }
173
-
174
- .lexical-content-editable {
175
- scrollbar-width: thin;
176
- scrollbar-color: rgb(156 163 175) transparent;
177
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
178
- text-align: start;
179
- width: 100%;
180
- height: 100%;
181
- font-size: 14px;
182
- padding: 8px;
183
- overflow: auto;
184
- outline: 0;
185
- box-sizing: border-box;
186
- background-color: white;
187
- color: black;
188
- }
189
-
190
- .lexical-placeholder {
191
- position: absolute;
192
- color: #999;
193
- top: 8px;
194
- left: 10px;
195
- font-size: 14px;
196
- pointer-events: none;
197
- user-select: none;
198
- }
199
-
200
- .lexical-content-editable::-webkit-scrollbar {
201
- width: 8px;
202
- height: 8px;
203
- }
204
-
205
- .lexical-content-editable::-webkit-scrollbar-track {
206
- background: #f1f1f1;
207
- border-radius: 4px;
208
- }
209
-
210
- .lexical-content-editable::-webkit-scrollbar-thumb {
211
- background: #c1c1c1;
212
- border-radius: 4px;
213
- }
214
-
215
- .lexical-content-editable::-webkit-scrollbar-thumb:hover {
216
- background: #a8a8a8;
217
- }
218
-
219
- .lexical-bold {
220
- font-weight: bold;
221
- }
222
-
223
- .lexical-underline {
224
- text-decoration: underline;
225
- }
226
-
227
- .lexical-italic {
228
- font-style: italic;
229
- }
230
-
231
- .lexical-strikethrough {
232
- text-decoration: line-through;
233
- }
234
-
235
- .lexical-underline-strikethrough {
236
- text-decoration: underline line-through;
237
- }
238
-
239
- .lexical-uppercase {
240
- text-transform: uppercase;
241
- }
242
-
243
- .lexical-lowercase {
244
- text-transform: lowercase;
245
- }
246
-
247
- .lexical-capitalize {
248
- text-transform: capitalize;
249
- }
250
-
251
- .lexical-code {
252
- background-color: #f3f4f6;
253
- border: 1px solid #d1d5db;
254
- padding: 0 0.25rem;
255
- border-radius: 0.25rem;
256
- font-size: 0.875rem;
257
- font-family: monospace;
258
- color: #000;
259
- }
260
-
261
- .lexical-paragraph {
262
- margin-bottom: 0.5rem;
263
- }
264
-
265
- .lexical-list-ul {
266
- list-style-type: disc;
267
- list-style-position: inside;
268
- padding-left: 1.5rem;
269
- }
270
-
271
- .lexical-list-ol {
272
- list-style-type: decimal;
273
- list-style-position: inside;
274
- padding-left: 1.5rem;
275
- }
276
-
277
- .lexical-listitem {
278
- margin-bottom: 0.25rem;
279
- }
280
-
281
- .lexical-quote {
282
- border-left: 4px solid #9ca3af;
283
- padding-left: 1rem;
284
- font-style: italic;
285
- color: #374151;
286
- background-color: #f9fafb;
287
- padding-top: 0.5rem;
288
- padding-bottom: 0.5rem;
289
- border-top-right-radius: 0.25rem;
290
- border-bottom-right-radius: 0.25rem;
291
- }
292
-
293
- .lexical-link {
294
- color: #2563eb;
295
- text-decoration: underline;
296
- }
297
-
298
- .lexical-link:hover {
299
- color: #1e40af;
300
- }
301
-
302
-
303
-
304
- /* --------------------------------------- HeadingSelectionList Start --------------------------------------------- */
305
-
306
-
307
-
308
- /* --------------------------------------------- HeadingSelectionList End ------------------------------------------ */
309
-
310
-
311
- /* ------------------------------------------- Button Component ------------------------------------------------ */
312
-
313
-
314
- /* ===========================================
315
- Base Button (matches shadcn/ui + Tailwind)
316
- =========================================== */
317
- .lexical-text-editor .lexical-btn {
318
- cursor: pointer;
319
- display: inline-flex;
320
- align-items: center;
321
- justify-content: flex-start;
322
- width: 100%;
323
-
324
- /* Sizing identical to Tailwind’s size-8 + px-3 py-2 */
325
- padding: 8px 12px;
326
- height: 32px; /* size-8 = 2rem = 32px */
327
- border-radius: 6px;
328
-
329
- /* Typography */
330
- font-size: 14px;
331
- font-weight: 500;
332
- white-space: nowrap;
333
-
334
- /* Colors from shadcn toolbar buttons */
335
- background: white;
336
- color: rgb(75 85 99); /* text-gray-600 */
337
-
338
- /* Interaction */
339
- transition: all 0.15s ease;
340
- user-select: none;
341
- border: none;
342
-
343
- /* Ensures icon + label spacing matches previous */
344
- gap: 8px;
345
- outline: none;
346
- }
347
-
348
-
349
- /* ===========================================
350
- Icon behavior (same as shadcn)
351
- =========================================== */
352
- .lexical-text-editor .lexical-btn svg {
353
- pointer-events: none;
354
- flex-shrink: 0;
355
- width: 16px; /* shadcn default svg size */
356
- height: 16px;
357
- }
358
-
359
- .lexical-text-editor .lexical-btn svg[class*="size-"] {
360
- /* if custom sizes were applied, keep them */
361
- width: auto;
362
- height: auto;
363
- }
364
-
365
- /* ===========================================
366
- Label spacing identical to Tailwind ml-2
367
- =========================================== */
368
- .lexical-text-editor .lexical-btn .label {
369
- margin-left: 8px;
370
- }
371
-
372
- /* ===========================================
373
- Toolbar (inactive)
374
- =========================================== */
375
- .lexical-text-editor .lexical-btn.toolbar {
376
- background: white;
377
- color: rgb(75 85 99); /* gray-600 */
378
- }
379
-
380
- .lexical-text-editor .lexical-btn.toolbar:hover {
381
- background: rgba(241, 245, 249, 0.8); /* slate-100/80 */
382
- }
383
-
384
- /* ===========================================
385
- Toolbar Active (matches shadcn toolbarActive)
386
- =========================================== */
387
- .lexical-text-editor .lexical-btn.toolbar-active {
388
- background: rgb(241 245 249); /* slate-100 */
389
- color: rgb(17 24 39); /* gray-900 */
390
- }
391
-
392
- /* ===========================================
393
- Disabled (shadcn behavior)
394
- =========================================== */
395
- .lexical-text-editor .lexical-btn:disabled {
396
- opacity: 0.5;
397
- pointer-events: none;
398
- }
399
-
400
- /******************************
401
- * SIZE
402
- ******************************/
403
- .lexical-text-editor .size-8 {
404
- width: 32px !important;
405
- height: 32px !important;
406
- }
407
-
408
-
409
- .lexical-text-editor .toolbar {
410
- display: inline-flex;
411
- justify-content: flex-start;
412
- align-items: center;
413
- border-radius: 8px;
414
- background-color: #ffffff;
415
- color: #374151;
416
- transition: background 0.15s ease, border-color 0.15s ease;
417
- cursor: pointer;
418
- }
419
-
420
- .lexical-text-editor .toolbar.icon {
421
- display: inline-flex;
422
- justify-content: center !important;
423
- align-items: center;
424
- }
425
-
426
- .lexical-text-editor .toolbar:hover:not(:disabled) {
427
- background-color: #f3f4f6;
428
- }
429
-
430
-
431
- .lexical-text-editor .toolbarActive {
432
- display: inline-flex;
433
- justify-content: center;
434
- align-items: center;
435
- border-radius: 0.5rem;
436
- background-color: #eef2ff;
437
- cursor: pointer;
438
- padding: 0;
439
- }
440
-
441
-
442
- .lexical-text-editor button:disabled {
443
- opacity: 0.5;
444
- cursor: not-allowed;
445
- background-color: #f9fafb;
446
- }
447
-
448
-
449
-
450
-
451
-
452
- /* ------------------------ Button Component ------------------------------- */
453
-
454
-
455
-
456
-
457
-
458
- /* ----------------------------- Popover ------------------------------- */
459
-
460
-
461
- /* ================================================
462
- POPOVER WRAPPER
463
- ================================================ */
464
- .lexical-text-editor .popover-root {
465
- position: relative;
466
- display: inline-block;
467
- }
468
-
469
- /* Trigger element wrapper (no styling by default) */
470
- .lexical-text-editor .popover-trigger {
471
- display: inline-block;
472
- }
473
-
474
- /* ================================================
475
- POPOVER CONTENT PANEL
476
- ================================================ */
477
- .lexical-text-editor .popover-content {
478
- position: absolute;
479
- top: calc(100% + 4px);
480
-
481
- background: white;
482
- border-radius: 6px;
483
- padding: 8px;
484
-
485
-
486
- box-shadow:
487
- 0px 2px 6px rgba(0, 0, 0, 0.12),
488
- 0px 0px 0px 1px rgba(0, 0, 0, 0.04);
489
-
490
- z-index: 9999;
491
- animation: popoverFadeIn 0.15s ease;
492
- }
493
-
494
- /* Alignment options */
495
- .lexical-text-editor .popover-content.align-start { left: 0; }
496
- .lexical-text-editor .popover-content.align-center { left: 50%; transform: translateX(-50%); }
497
- .lexical-text-editor .popover-content.align-end { right: 0; }
498
-
499
- /* Fade-in animation */
500
- @keyframes popoverFadeIn {
501
- from { opacity: 0; transform: translateY(-3px); }
502
- to { opacity: 1; transform: translateY(0); }
503
- }
504
-
505
-
506
-
507
- /* ============================
508
- WRAPPER
509
- ============================ */
510
- .lexical-text-editor .heading-select {
511
- position: relative;
512
- display: inline-block;
513
- }
514
-
515
- /* ============================
516
- TRIGGER BUTTON (matches old style)
517
- ============================ */
518
- .lexical-text-editor .heading-trigger {
519
- border: 1px solid #e5e7eb; /* gray-100 */
520
- height: 32px; /* size-8 */
521
- padding: 8px;
522
- justify-content: space-between;
523
- background-color: white;
524
- }
525
-
526
- /* Chevron rotation same as before */
527
- .lexical-text-editor .heading-trigger .chevron {
528
- transition: transform 0.15s ease;
529
- }
530
-
531
- .lexical-text-editor .heading-trigger .chevron.rotated {
532
- transform: rotate(180deg);
533
- }
534
-
535
- /* ============================
536
- DROPDOWN PANEL (PopoverContent)
537
- ============================ */
538
- .lexical-text-editor .heading-dropdown {
539
- position: absolute;
540
- top: calc(100% + 4px);
541
- left: 0;
542
-
543
- background: white;
544
- border-radius: 6px;
545
- padding: 8px;
546
-
547
- display: flex;
548
- flex-direction: column;
549
- gap: 4px;
550
-
551
- width: max-content;
552
- box-shadow:
553
- 0px 2px 6px rgba(0, 0, 0, 0.12),
554
- 0px 0px 0px 1px rgba(0, 0, 0, 0.04);
555
-
556
- z-index: 9999;
557
- animation: dropdownFadeIn 0.15s ease;
558
- }
559
-
560
- @keyframes dropdownFadeIn {
561
- from { opacity: 0; transform: translateY(-3px); }
562
- to { opacity: 1; transform: translateY(0); }
563
- }
564
-
565
-
566
-
567
-
568
-
569
-
570
-
571
-
572
- /* ----------------------------- Popover ------------------------------- */
573
-
574
-
575
-
576
-
577
- /* -------------------------------- Color Picker Wrapper ----------------------------- */
578
-
579
-
580
-
581
-
582
-
583
- /* Wrapper */
584
- .color-picker-wrapper {
585
- position: relative;
586
- display: inline-block;
587
- }
588
-
589
- .toolbar:hover:not(:disabled) {
590
- background-color: #f3f4f6;
591
- }
592
-
593
- .lexical-color-popover {
594
- z-index: 99;
595
- border-radius: 0.5rem;
596
- pointer-events: none;
597
- opacity: 0;
598
- margin-top: 10px;
599
- transform: scale(0.95) translateY(-4px);
600
- transform-origin: top left;
601
- transition: opacity 0.15s ease, transform 0.15s ease;
602
- }
603
-
604
- .lexical-color-popover.open {
605
- opacity: 1;
606
- pointer-events: auto;
607
- transform: scale(1) translateY(0);
608
- }
609
-
610
-
611
-
612
-
613
-
614
-
615
-
616
- /* -------------------------------- Color Picker Wrapper ----------------------------- */
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
-
625
- /* ----------------------------- Image Node ------------------------------------------ */
626
-
627
-
628
- .lexical-text-editor-dialog {
629
-
630
- /* Buttons */
631
- .lte-icon-btn {
632
- background: none;
633
- border: none;
634
- padding: 6px;
635
- border-radius: 4px;
636
- cursor: pointer;
637
- display: flex;
638
- align-items: center;
639
- }
640
-
641
- .lte-icon-btn:hover {
642
- background: #e5e5e5;
643
- }
644
-
645
- .lte-outline-btn {
646
- background: #f8f8f8;
647
- border: 1px solid #ccc;
648
- padding: 8px 12px;
649
- border-radius: 4px;
650
- cursor: pointer;
651
- color: black;
652
- width: fit-content;
653
- margin: 0 auto;
654
- font-size: 14px;
655
- }
656
-
657
- .lte-outline-btn:hover {
658
- background: #eee;
659
- }
660
-
661
- .lte-primary-btn {
662
- background-color: #2563eb !important;
663
- color: white;
664
- padding: 8px 14px;
665
- border-radius: 4px;
666
- border: none;
667
- cursor: pointer;
668
- }
669
-
670
- .lte-primary-btn:hover {
671
- background: #1d4ed8;
672
- }
673
-
674
- .lte-primary-btn:disabled {
675
- opacity: 0.5;
676
- cursor: not-allowed;
677
- }
678
-
679
- /* Inputs */
680
- .lte-input {
681
- width: 100%;
682
- padding: 8px 10px;
683
- border-radius: 4px;
684
- border: 1px solid #d0d0d0;
685
- background-color: #fff;
686
- }
687
-
688
- /* Divider */
689
- .lte-divider {
690
- display: flex;
691
- align-items: center;
692
- margin: 12px 0;
693
- color: #777;
694
- font-size: 13px;
695
- }
696
-
697
- .lte-divider::before,
698
- .lte-divider::after {
699
- content: "";
700
- height: 1px;
701
- flex: 1;
702
- background: #ccc;
703
- }
704
-
705
- .lte-divider span {
706
- padding: 0 8px;
707
- }
708
-
709
- /* File name */
710
- .lte-file-name {
711
- font-size: 13px;
712
- color: #666;
713
- }
714
-
715
- /* Dialog Overlay */
716
- .lte-dialog-overlay {
717
- position: fixed;
718
- inset: 0;
719
- background: rgba(0,0,0,0.5);
720
- display: flex;
721
- align-items: center;
722
- justify-content: center;
723
- z-index: 50;
724
- }
725
-
726
- /* Dialog */
727
- .lte-dialog {
728
- background: white;
729
- width: 100%;
730
- max-width: 420px;
731
- padding: 20px;
732
- margin: 10px;
733
- border-radius: 8px;
734
- position: relative;
735
- }
736
-
737
- .lte-dialog.preview{
738
- max-width: 1024px;
739
- width: 100%;
740
- }
741
-
742
-
743
- .lte-dialog-header {
744
- font-size: 18px;
745
- font-weight: 600;
746
- margin-bottom: 10px;
747
- color: #333;
748
- }
749
-
750
- .lte-dialog-body {
751
- display: flex;
752
- flex-direction: column;
753
- gap: 12px;
754
- padding: 10px 0;
755
- }
756
-
757
- .lte-dialog-footer {
758
- margin-top: 12px;
759
- display: flex;
760
- justify-content: flex-end;
761
- }
762
-
763
- .lte-dialog-close {
764
- position: absolute;
765
- top: 10px;
766
- right: 18px;
767
- background: none;
768
- color: #000;
769
- border: none;
770
- font-size: 26px;
771
- cursor: pointer;
772
- opacity: 0.7;
773
- padding: 0;
774
- outline: none;
775
- }
776
-
777
- .lte-dialog-close:hover {
778
- opacity: 1;
779
- }
780
-
781
- .lte-hidden {
782
- display: none;
783
- }
784
- }
785
-
786
-
787
-
788
- /* ----------------------------- Image Node ------------------------------------------ */
789
-
790
-
791
-
792
- /****************************
793
- TOOLBAR BUTTON
794
- ****************************/
795
- .lexical-text-editor .lte-toolbar-btn {
796
- display: flex;
797
- align-items: center;
798
- gap: 4px;
799
-
800
- padding: 6px 10px;
801
-
802
- border-radius: 6px;
803
- border: 1px solid #e5e7eb;
804
- background: #ffffff;
805
-
806
- cursor: pointer;
807
- user-select: none;
808
- transition: 0.15s ease;
809
- }
810
-
811
- .lexical-text-editor .lte-toolbar-btn:hover {
812
- background: #f3f4f6;
813
- }
814
-
815
- .lexical-text-editor .lte-toolbar-btn-active {
816
- background: #e0e7ff;
817
- border-color: #6366f1;
818
- }
819
-
820
- /****************************
821
- PREVIEW SECTION
822
- ****************************/
823
- .lexical-text-editor .lte-preview-container {
824
- width: 100%;
825
- max-height: 80vh;
826
- overflow-y: auto;
827
-
828
- background: white;
829
- border: 1px solid #e5e7eb;
830
- border-radius: 8px;
831
-
832
- padding: 2vw;
833
- min-height: 400px;
834
- }
835
-
836
- .lexical-text-editor .lte-preview-title {
837
- padding-bottom: 6px;
838
- margin-bottom: 14px;
839
- text-align: start;
840
- border-bottom: 2px solid #e5e7eb;
841
-
842
- font-weight: 600;
843
- font-size: 15px;
844
- }
845
-
846
- /****************************
847
- HTML PREVIEW CONTENT
848
- ****************************/
849
- .lexical-text-editor-html-preview {
850
- max-width: none;
851
- line-height: 1.6;
852
- text-align: start;
853
- }
854
-
855
-
856
- /* ==================================== Link Modal ============================================ */
857
-
858
-
859
-
860
-
861
-
862
- /* ✅ Everything is scoped under .lexical-text-editor */
863
- .lexical-text-editor-link.link-editor-container {
864
- position: absolute;
865
- bottom: -50px;
866
- right: 20px;
867
- z-index: 99;
868
- display: flex;
869
- gap: 8px;
870
- align-items: center;
871
-
872
- background: white;
873
- border: 1px solid #e5e7eb;
874
- border-radius: 12px;
875
-
876
- padding: 6px 10px;
877
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
878
- }
879
-
880
- @media (min-width: 640px) {
881
- .lexical-text-editor-link.link-editor-container {
882
- bottom: -60px;
883
- padding: 8px 14px;
884
- }
885
- }
886
-
887
- /* Input area */
888
- .lexical-text-editor-link .link-editor-input-wrapper {
889
- min-width: 200px;
890
- flex: 1;
891
- }
892
-
893
- .lexical-text-editor-link .link-editor-input {
894
- width: 100%;
895
- height: 32px;
896
- font-size: 14px;
897
- padding: 4px 8px;
898
-
899
- border: 1px solid #d1d5db;
900
- border-radius: 6px;
901
- background-color: white;
902
- outline: none;
903
- }
904
-
905
- .lexical-text-editor-link .link-editor-input:focus {
906
- border-color: #2563eb;
907
- }
908
-
909
- /* URL Preview (non-edit mode) */
910
- .lexical-text-editor-link .link-editor-url {
911
- display: block;
912
- font-size: 14px;
913
- color: #2563eb;
914
- text-decoration: underline;
915
- text-align: start;
916
- max-width: 100%;
917
- overflow: hidden;
918
- white-space: nowrap;
919
- text-overflow: ellipsis;
920
- }
921
-
922
- /* Buttons */
923
- .lexical-text-editor-link .link-editor-buttons {
924
- display: flex;
925
- gap: 4px;
926
- }
927
-
928
- .lexical-text-editor-link .link-editor-btn {
929
- height: 32px;
930
- width: 32px;
931
-
932
- display: flex;
933
- align-items: center;
934
- justify-content: center;
935
-
936
- border: none;
937
- border-radius: 6px;
938
- background: transparent;
939
-
940
- cursor: pointer;
941
- transition: background 0.2s ease;
942
- }
943
-
944
-
945
- .lexical-text-editor-link .link-editor-btn:hover {
946
- background: #f3f4f6;
947
- }
948
-
949
-
950
-
951
-
952
-
953
-
954
- /* ==================================== Link Modal ============================================ */
955
-
956
-
957
- /* ========================== Tooltips ============================= */
958
- .Lexical-Tooltip-Wrapper {
959
- display: inline-block;
960
- position: relative;
961
- }
962
-
963
- /* Absolute positioning */
964
- .Lexical-Tooltip-Tip {
965
- position: absolute;
966
- border-radius: 4px;
967
- left: 50%;
968
- transform: translateX(-50%);
969
- padding: 8px 12px;
970
- color: white;
971
- background: #5a5a5a;
972
- font-size: 12px;
973
- font-family: sans-serif;
974
- line-height: 1;
975
- z-index: 100;
976
- white-space: nowrap;
977
- transition: all 0.5s;
978
- }
979
-
980
-
981
-
982
- /* CSS border triangles */
983
- .Lexical-Tooltip-Tip::before {
984
- content: " ";
985
- left: 50%;
986
- border: solid transparent;
987
- height: 0;
988
- width: 0;
989
- position: absolute;
990
- pointer-events: none;
991
- border-width: 6px;
992
- margin-left: calc(6px * -1);
993
- }
994
-
995
- /* Absolute positioning */
996
- .Lexical-Tooltip-Tip.top {
997
- top: calc(35px * -1);
998
- }
999
- /* CSS border triangles */
1000
- .Lexical-Tooltip-Tip.top::before {
1001
- top: 100%;
1002
- border-top-color: #5a5a5a;
1003
- }
1004
-
1005
- /* Absolute positioning */
1006
- .Lexical-Tooltip-Tip.right {
1007
- left: calc(100% + 30px);
1008
- top: 50%;
1009
- transform: translateX(0) translateY(-50%);
1010
- }
1011
- /* CSS border triangles */
1012
- .Lexical-Tooltip-Tip.right::before {
1013
- left: calc(6px * -1);
1014
- top: 50%;
1015
- transform: translateX(0) translateY(-50%);
1016
- border-right-color: #5a5a5a;
1017
- }
1018
-
1019
- /* Absolute positioning */
1020
- .Lexical-Tooltip-Tip.bottom {
1021
- bottom: calc(35px * -1);
1022
- }
1023
- /* CSS border triangles */
1024
- .Lexical-Tooltip-Tip.bottom::before {
1025
- bottom: 100%;
1026
- border-bottom-color: #5a5a5a;
1027
- }
1028
-
1029
- /* Absolute positioning */
1030
- .Lexical-Tooltip-Tip.left {
1031
- left: auto;
1032
- right: calc(100% + 30px);
1033
- top: 50%;
1034
- transform: translateX(0) translateY(-50%);
1035
- }
1036
- /* CSS border triangles */
1037
- .Lexical-Tooltip-Tip.left::before {
1038
- left: auto;
1039
- right: calc(6px * -2);
1040
- top: 50%;
1041
- transform: translateX(0) translateY(-50%);
1042
- border-left-color: #5a5a5a;
1043
- }
1044
-
1045
-
1046
-
1047
-
1048
-
1049
-
1050
-
1051
-
1052
-
1053
- /* ========================== Tooltips ============================= */