File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
container-annotation/highlight Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
var ContainerAnnotation = require ( 'substance/model/ContainerAnnotation' ) ;
4
- // var Fragmenter = require('../.. /model/Fragmenter');
4
+ var Fragmenter = require ( 'substance /model/Fragmenter' ) ;
5
5
6
6
function Highlight ( ) {
7
7
Highlight . super . apply ( this , arguments ) ;
@@ -11,8 +11,6 @@ ContainerAnnotation.extend(Highlight);
11
11
12
12
Highlight . static . name = 'highlight' ;
13
13
14
- // a hint that makes in case of overlapping annotations that this
15
- // annotation gets fragmented more often
16
- // Strong.static.fragmentation = Fragmenter.ANY;
14
+ Highlight . static . fragmentation = Fragmenter . SHOULD_NOT_SPLIT ;
17
15
18
16
module . exports = Highlight ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
var Highlight = require ( './Highlight' ) ;
4
+ var HighlightCommand = require ( './HighlightCommand' ) ;
5
+ var HighlightTool = require ( './HighlightTool' ) ;
4
6
5
7
module . exports = {
6
8
name : 'highlight' ,
7
9
configure : function ( config ) {
8
10
config . addNode ( Highlight ) ;
11
+ config . addCommand ( HighlightCommand ) ;
12
+ config . addTool ( HighlightTool ) ;
13
+ config . addIcon ( HighlightCommand . static . name , { 'fontawesome' : 'fa-pencil' } ) ;
9
14
}
10
15
} ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var AnnotationTool = require ( '../.. /ui/AnnotationTool' ) ;
3
+ var AnnotationTool = require ( 'substance /ui/AnnotationTool' ) ;
4
4
5
5
function HighlightTool ( ) {
6
6
HighlightTool . super . apply ( this , arguments ) ;
7
7
}
8
8
AnnotationTool . extend ( HighlightTool ) ;
9
9
10
- HighlightTool . static . name = 'higlight ' ;
10
+ HighlightTool . static . name = 'highlight ' ;
11
11
12
12
module . exports = HighlightTool ;
You can’t perform that action at this time.
0 commit comments