@@ -369,7 +369,7 @@ export class ToolbarState implements UiLifeCycles {
369369 name : 'HTML' ,
370370 text : action + ' html' ,
371371 icon,
372- right : iconHtml ,
372+ right : iconHtml ,
373373 onSelect : ( ) => {
374374 et . buffer ( { ...ctx . onBeforeAction ?.( htmlAction , action ) , action, format : 'html' } ) ;
375375 } ,
@@ -462,7 +462,7 @@ export class ToolbarState implements UiLifeCycles {
462462 name : 'HTML' ,
463463 text : 'paste html' ,
464464 icon,
465- right : iconHtml ,
465+ right : iconHtml ,
466466 onSelect : ( ) => {
467467 et . buffer ( { ...ctx . onBeforeAction ?.( htmlAction , 'paste' ) , action : 'paste' , format : 'html' } ) ;
468468 } ,
@@ -533,10 +533,7 @@ export class ToolbarState implements UiLifeCycles {
533533 et . buffer ( { ...ctx . onBeforeAction ?.( copyTextOnlyAction , 'copy' ) , action : 'copy' , format : 'text' } ) ;
534534 } ,
535535 } ;
536- const children : MenuItem [ ] = [
537- copyAction ,
538- copyTextOnlyAction ,
539- ] ;
536+ const children : MenuItem [ ] = [ copyAction , copyTextOnlyAction ] ;
540537 if ( ! ctx . hideStyleActions ) {
541538 const copyStyleAction : MenuItem = {
542539 name : 'Copy style' ,
@@ -580,11 +577,7 @@ export class ToolbarState implements UiLifeCycles {
580577 name : 'Cut' ,
581578 icon : ( ) => < Iconista width = { 16 } height = { 16 } set = "tabler" icon = "scissors" /> ,
582579 expand : 5 ,
583- children : [
584- cutAction ,
585- cutTextAction ,
586- this . copyAsMenu ( 'cut' , ctx ) ,
587- ] ,
580+ children : [ cutAction , cutTextAction , this . copyAsMenu ( 'cut' , ctx ) ] ,
588581 } ;
589582 } ;
590583
@@ -604,10 +597,7 @@ export class ToolbarState implements UiLifeCycles {
604597 et . buffer ( { ...ctx . onBeforeAction ?.( pasteTextAction , 'paste' ) , action : 'paste' , format : 'text' } ) ;
605598 } ,
606599 } ;
607- const children : MenuItem [ ] = [
608- pasteAction ,
609- pasteTextAction ,
610- ] ;
600+ const children : MenuItem [ ] = [ pasteAction , pasteTextAction ] ;
611601 if ( ! ctx . hideStyleActions ) {
612602 const pasteStyleAction : MenuItem = {
613603 name : 'Paste style' ,
@@ -639,11 +629,7 @@ export class ToolbarState implements UiLifeCycles {
639629 icon : ( ) => < Iconista width = { 16 } height = { 16 } set = "lucide" icon = "copy" /> ,
640630 expand : 0 ,
641631 sepBefore : true ,
642- children : [
643- copyMenu ,
644- cutMenu ,
645- pasteMenu ,
646- ] ,
632+ children : [ copyMenu , cutMenu , pasteMenu ] ,
647633 } ;
648634 } ;
649635
@@ -1504,24 +1490,24 @@ export class ToolbarState implements UiLifeCycles {
15041490 name : 'Select block' ,
15051491 icon : ( ) => < Iconista width = { 16 } height = { 16 } set = "bootstrap" icon = "cursor-text" /> ,
15061492 onSelect : ( ) => {
1507- let start = block . start . clone ( ) ;
1493+ const start = block . start . clone ( ) ;
15081494 if ( ! start . isAbsStart ( ) ) start . step ( 1 ) ;
15091495 et . cursor ( { at : [ start , block . end ] } ) ;
15101496 } ,
15111497 } ,
15121498 this . clipboardMenu ( {
15131499 hideStyleActions : true ,
15141500 onBeforeAction : ( item , action ) => {
1515- let start = block . start . clone ( ) ;
1516- if ( ! start . isAbsStart ( ) && ( action === 'paste' ) ) start . step ( 1 ) ;
1501+ const start = block . start . clone ( ) ;
1502+ if ( ! start . isAbsStart ( ) && action === 'paste' ) start . step ( 1 ) ;
15171503 return {
15181504 at : [ start , block . end ] ,
15191505 } ;
15201506 } ,
15211507 } ) ,
15221508 ] ,
15231509 } ,
1524-
1510+
15251511 secondBrain ( ) ,
15261512 ] ,
15271513 } ;
@@ -1535,5 +1521,5 @@ export interface LeafBlockMenuCtx {
15351521
15361522export interface ClipboardMenuCtx {
15371523 hideStyleActions ?: boolean ;
1538- onBeforeAction ?: ( item : MenuItem , action : 'cut' | 'copy' | 'paste' ) => ( void | Partial < BufferDetail > ) ;
1524+ onBeforeAction ?: ( item : MenuItem , action : 'cut' | 'copy' | 'paste' ) => void | Partial < BufferDetail > ;
15391525}
0 commit comments