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