File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -518,6 +518,19 @@ class SnippetNoteDetail extends React.Component {
518
518
] )
519
519
}
520
520
521
+ handleWrapLineButtonClick ( e ) {
522
+ context . popup ( [
523
+ {
524
+ label : 'on' ,
525
+ click : ( e ) => this . handleWrapLineItemClick ( e , true )
526
+ } ,
527
+ {
528
+ label : 'off' ,
529
+ click : ( e ) => this . handleWrapLineItemClick ( e , false )
530
+ }
531
+ ] )
532
+ }
533
+
521
534
handleIndentSizeItemClick ( e , indentSize ) {
522
535
const { config, dispatch } = this . props
523
536
const editor = Object . assign ( { } , config . editor , {
@@ -550,6 +563,22 @@ class SnippetNoteDetail extends React.Component {
550
563
} )
551
564
}
552
565
566
+ handleWrapLineItemClick ( e , lineWrapping ) {
567
+ const { config, dispatch } = this . props
568
+ const editor = Object . assign ( { } , config . editor , {
569
+ lineWrapping
570
+ } )
571
+ ConfigManager . set ( {
572
+ editor
573
+ } )
574
+ dispatch ( {
575
+ type : 'SET_CONFIG' ,
576
+ config : {
577
+ editor
578
+ }
579
+ } )
580
+ }
581
+
553
582
focus ( ) {
554
583
this . refs . description . focus ( )
555
584
}
You can’t perform that action at this time.
0 commit comments