@@ -197,8 +197,8 @@ export class TipTapEditor extends TipTapEditorBase {
197
197
/**
198
198
* @override
199
199
*/
200
- async startEditor ( ) {
201
- await super . startEditor ( )
200
+ async startEditor ( ) {
201
+ await super . startEditor ( ) ;
202
202
203
203
if ( this . editor ) {
204
204
this . editor . on ( "focus" , this . closeLinkDialog ) ;
@@ -337,7 +337,9 @@ export class TipTapEditor extends TipTapEditorBase {
337
337
}
338
338
339
339
renderBoldButton ( prefix = "" ) {
340
- const boldEnabled = this . starterKitOptions . bold !== false || Boolean ( this . editor ?. commands . toggleBold ) ;
340
+ const boldEnabled =
341
+ this . starterKitOptions . bold !== false ||
342
+ Boolean ( this . editor ?. commands . toggleBold ) ;
341
343
342
344
if ( ! boldEnabled ) return html `` ;
343
345
@@ -389,7 +391,9 @@ export class TipTapEditor extends TipTapEditorBase {
389
391
}
390
392
391
393
renderItalicButton ( prefix = "" ) {
392
- const italicEnabled = this . starterKitOptions . italic !== false || Boolean ( this . editor ?. commands . toggleItalic ) ;
394
+ const italicEnabled =
395
+ this . starterKitOptions . italic !== false ||
396
+ Boolean ( this . editor ?. commands . toggleItalic ) ;
393
397
394
398
if ( ! italicEnabled ) return html `` ;
395
399
@@ -445,7 +449,9 @@ export class TipTapEditor extends TipTapEditorBase {
445
449
}
446
450
447
451
renderStrikeButton ( prefix = "" ) {
448
- const strikeEnabled = this . starterKitOptions . rhinoStrike !== false || Boolean ( this . editor ?. commands . toggleStrike ) ;
452
+ const strikeEnabled =
453
+ this . starterKitOptions . rhinoStrike !== false ||
454
+ Boolean ( this . editor ?. commands . toggleStrike ) ;
449
455
450
456
if ( ! strikeEnabled ) return html `` ;
451
457
@@ -500,7 +506,9 @@ export class TipTapEditor extends TipTapEditorBase {
500
506
}
501
507
502
508
renderLinkButton ( prefix = "" ) {
503
- const linkEnabled = this . starterKitOptions . rhinoLink !== false || Boolean ( this . editor ?. commands . setLink ) ;
509
+ const linkEnabled =
510
+ this . starterKitOptions . rhinoLink !== false ||
511
+ Boolean ( this . editor ?. commands . setLink ) ;
504
512
505
513
if ( ! linkEnabled ) return html `` ;
506
514
@@ -558,7 +566,9 @@ export class TipTapEditor extends TipTapEditorBase {
558
566
}
559
567
560
568
renderHeadingButton ( prefix = "" ) {
561
- const headingEnabled = this . starterKitOptions . heading !== false || Boolean ( this . editor ?. commands . toggleHeading ) ;
569
+ const headingEnabled =
570
+ this . starterKitOptions . heading !== false ||
571
+ Boolean ( this . editor ?. commands . toggleHeading ) ;
562
572
563
573
if ( ! headingEnabled ) return html `` ;
564
574
@@ -615,7 +625,9 @@ export class TipTapEditor extends TipTapEditorBase {
615
625
}
616
626
617
627
renderBlockquoteButton ( prefix = "" ) {
618
- const blockQuoteEnabled = this . starterKitOptions . blockquote !== false || Boolean ( this . editor ?. commands . toggleBlockquote ) ;
628
+ const blockQuoteEnabled =
629
+ this . starterKitOptions . blockquote !== false ||
630
+ Boolean ( this . editor ?. commands . toggleBlockquote ) ;
619
631
620
632
if ( ! blockQuoteEnabled ) return html `` ;
621
633
@@ -672,7 +684,9 @@ export class TipTapEditor extends TipTapEditorBase {
672
684
}
673
685
674
686
renderCodeBlockButton ( prefix = "" ) {
675
- const codeBlockEnabled = this . starterKitOptions . codeBlock !== false || Boolean ( this . editor ?. commands . toggleCodeBlock ) ;
687
+ const codeBlockEnabled =
688
+ this . starterKitOptions . codeBlock !== false ||
689
+ Boolean ( this . editor ?. commands . toggleCodeBlock ) ;
676
690
677
691
if ( ! codeBlockEnabled ) return html `` ;
678
692
@@ -728,7 +742,9 @@ export class TipTapEditor extends TipTapEditorBase {
728
742
}
729
743
730
744
renderBulletListButton ( prefix = "" ) {
731
- const bulletListEnabled = this . starterKitOptions . bulletList !== false || Boolean ( this . editor ?. commands . toggleBulletList ) ;
745
+ const bulletListEnabled =
746
+ this . starterKitOptions . bulletList !== false ||
747
+ Boolean ( this . editor ?. commands . toggleBulletList ) ;
732
748
733
749
if ( ! bulletListEnabled ) return html `` ;
734
750
@@ -791,7 +807,9 @@ export class TipTapEditor extends TipTapEditorBase {
791
807
}
792
808
793
809
renderOrderedListButton ( prefix = "" ) {
794
- const orderedListEnabled = this . starterKitOptions . orderedList !== false || Boolean ( this . editor ?. commands . toggleOrderedList ) ;
810
+ const orderedListEnabled =
811
+ this . starterKitOptions . orderedList !== false ||
812
+ Boolean ( this . editor ?. commands . toggleOrderedList ) ;
795
813
796
814
if ( ! orderedListEnabled ) return html `` ;
797
815
@@ -856,7 +874,9 @@ export class TipTapEditor extends TipTapEditorBase {
856
874
}
857
875
858
876
renderAttachmentButton ( prefix = "" ) {
859
- const attachmentEnabled = this . starterKitOptions . rhinoAttachment !== false || Boolean ( this . editor ?. commands . setAttachment ) ;
877
+ const attachmentEnabled =
878
+ this . starterKitOptions . rhinoAttachment !== false ||
879
+ Boolean ( this . editor ?. commands . setAttachment ) ;
860
880
861
881
if ( ! attachmentEnabled ) return html `` ;
862
882
@@ -917,7 +937,9 @@ export class TipTapEditor extends TipTapEditorBase {
917
937
}
918
938
919
939
renderUndoButton ( prefix = "" ) {
920
- const undoEnabled = this . starterKitOptions . history !== false || Boolean ( this . editor ?. commands . undo ) ;
940
+ const undoEnabled =
941
+ this . starterKitOptions . history !== false ||
942
+ Boolean ( this . editor ?. commands . undo ) ;
921
943
922
944
if ( ! undoEnabled ) return html `` ;
923
945
@@ -971,7 +993,8 @@ export class TipTapEditor extends TipTapEditorBase {
971
993
renderDecreaseIndentation ( prefix = "" ) {
972
994
// Decrease / increase indentation are special cases in that they rely on built-in editor
973
995
// commands and not commands added by extensions.
974
- const decreaseIndentationEnabled = this . starterKitOptions . decreaseIndentation !== false // || Boolean(this.editor?.commands.liftListItem);
996
+ const decreaseIndentationEnabled =
997
+ this . starterKitOptions . decreaseIndentation !== false ; // || Boolean(this.editor?.commands.liftListItem);
975
998
976
999
if ( ! decreaseIndentationEnabled ) return html `` ;
977
1000
@@ -1027,7 +1050,8 @@ export class TipTapEditor extends TipTapEditorBase {
1027
1050
renderIncreaseIndentation ( prefix = "" ) {
1028
1051
// Decrease / increase indentation are special cases in that they rely on built-in editor
1029
1052
// commands and not commands added by extensions.
1030
- const increaseIndentationEnabled = this . starterKitOptions . increaseIndentation !== false // || Boolean(this.editor?.commands.sinkListItem);
1053
+ const increaseIndentationEnabled =
1054
+ this . starterKitOptions . increaseIndentation !== false ; // || Boolean(this.editor?.commands.sinkListItem);
1031
1055
1032
1056
if ( ! increaseIndentationEnabled ) return html `` ;
1033
1057
@@ -1081,7 +1105,9 @@ export class TipTapEditor extends TipTapEditorBase {
1081
1105
}
1082
1106
1083
1107
renderRedoButton ( prefix = "" ) {
1084
- const redoEnabled = this . starterKitOptions . history !== false || Boolean ( this . editor ?. commands . redo ) ;
1108
+ const redoEnabled =
1109
+ this . starterKitOptions . history !== false ||
1110
+ Boolean ( this . editor ?. commands . redo ) ;
1085
1111
1086
1112
if ( ! redoEnabled ) return html `` ;
1087
1113
0 commit comments