Skip to content

Commit dedfcbd

Browse files
committed
Fixes.
1 parent f8ba8af commit dedfcbd

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
var ContainerAnnotation = require('substance/model/ContainerAnnotation');
4-
// var Fragmenter = require('../../model/Fragmenter');
4+
var Fragmenter = require('substance/model/Fragmenter');
55

66
function Highlight() {
77
Highlight.super.apply(this, arguments);
@@ -11,8 +11,6 @@ ContainerAnnotation.extend(Highlight);
1111

1212
Highlight.static.name = 'highlight';
1313

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;
1715

1816
module.exports = Highlight;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
'use strict';
22

33
var Highlight = require('./Highlight');
4+
var HighlightCommand = require('./HighlightCommand');
5+
var HighlightTool = require('./HighlightTool');
46

57
module.exports = {
68
name: 'highlight',
79
configure: function(config) {
810
config.addNode(Highlight);
11+
config.addCommand(HighlightCommand);
12+
config.addTool(HighlightTool);
13+
config.addIcon(HighlightCommand.static.name, { 'fontawesome': 'fa-pencil' });
914
}
1015
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
'use strict';
22

3-
var AnnotationTool = require('../../ui/AnnotationTool');
3+
var AnnotationTool = require('substance/ui/AnnotationTool');
44

55
function HighlightTool() {
66
HighlightTool.super.apply(this, arguments);
77
}
88
AnnotationTool.extend(HighlightTool);
99

10-
HighlightTool.static.name = 'higlight';
10+
HighlightTool.static.name = 'highlight';
1111

1212
module.exports = HighlightTool;

0 commit comments

Comments
 (0)