@@ -4,6 +4,7 @@ var MarkdownSelectionActions = require('../actions/MarkdownSelectionActions');
4
4
5
5
var MarkdownEditorStore = Reflux . createStore ( {
6
6
init : function ( ) {
7
+
7
8
this . currentSelection = null ;
8
9
this . listenTo ( MarkdownEditorActions . makeBold , this . handleMakeBold ) ;
9
10
this . listenTo ( MarkdownEditorActions . makeItalic , this . handleMakeItalic ) ;
@@ -17,36 +18,36 @@ var MarkdownEditorStore = Reflux.createStore({
17
18
this . listenTo ( MarkdownEditorActions . setSelection , this . handleSetSelection ) ;
18
19
} ,
19
20
20
- handleMakeBold : function ( ) {
21
- this . trigger ( { action : 'bold' , currentSelection : this . currentSelection } ) ;
21
+ handleMakeBold : function ( instanceRef ) {
22
+ this . trigger ( { action : 'bold' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
22
23
} ,
23
24
24
- handleMakeItalic : function ( ) {
25
- this . trigger ( { action : 'italic' , currentSelection : this . currentSelection } ) ;
25
+ handleMakeItalic : function ( instanceRef ) {
26
+ this . trigger ( { action : 'italic' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
26
27
} ,
27
28
28
- handleMakeLink : function ( ) {
29
- this . trigger ( { action : 'link' , currentSelection : this . currentSelection } ) ;
29
+ handleMakeLink : function ( instanceRef ) {
30
+ this . trigger ( { action : 'link' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
30
31
} ,
31
32
32
- handleMakeUnderline : function ( ) {
33
- this . trigger ( { action : 'underline' , currentSelection : this . currentSelection } ) ;
33
+ handleMakeUnderline : function ( instanceRef ) {
34
+ this . trigger ( { action : 'underline' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
34
35
} ,
35
36
36
- handleMakeHeader : function ( ) {
37
- this . trigger ( { action : 'header' , currentSelection : this . currentSelection } ) ;
37
+ handleMakeHeader : function ( instanceRef ) {
38
+ this . trigger ( { action : 'header' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
38
39
} ,
39
40
40
- handleMakeSubHeader : function ( ) {
41
- this . trigger ( { action : 'subheader' , currentSelection : this . currentSelection } ) ;
41
+ handleMakeSubHeader : function ( instanceRef ) {
42
+ this . trigger ( { action : 'subheader' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
42
43
} ,
43
44
44
- handleMakeList : function ( ) {
45
- this . trigger ( { action : 'list' , currentSelection : this . currentSelection } ) ;
45
+ handleMakeList : function ( instanceRef ) {
46
+ this . trigger ( { action : 'list' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
46
47
} ,
47
48
48
- handleMakeImage : function ( ) {
49
- this . trigger ( { action : 'image' , currentSelection : this . currentSelection } ) ;
49
+ handleMakeImage : function ( instanceRef ) {
50
+ this . trigger ( { action : 'image' , currentSelection : this . currentSelection , instanceRef : instanceRef } ) ;
50
51
} ,
51
52
52
53
handleClearSelection : function ( ) {
0 commit comments