@@ -10,6 +10,7 @@ import { formatsSpecs } from "@html_editor/utils/formatting";
10
10
import { closestElement } from "@html_editor/utils/dom_traversal" ;
11
11
import { removeStyle } from "@html_editor/utils/dom" ;
12
12
import { isTextNode } from "@html_editor/utils/dom_info" ;
13
+ import { omit } from "@web/core/utils/objects" ;
13
14
14
15
export class HighlightPlugin extends Plugin {
15
16
static id = "highlight" ;
@@ -170,6 +171,17 @@ formatsSpecs.highlight = {
170
171
} ;
171
172
172
173
class HighlightToolbarButton extends Component {
174
+ static props = {
175
+ applyHighlight : Function ,
176
+ applyHighlightStyle : Function ,
177
+ getHighlightState : Function ,
178
+ getSelection : Function ,
179
+ previewHighlight : Function ,
180
+ previewHighlightStyle : Function ,
181
+ revertHighlight : Function ,
182
+ revertHighlightStyle : Function ,
183
+ title : String ,
184
+ } ;
173
185
static template = xml `
174
186
<button t-ref="root" class="btn btn-light" t-on-click="openHighlightConfigurator">
175
187
<i class="fa oi oi-text-effect oi-fw py-1"/>
@@ -181,7 +193,7 @@ class HighlightToolbarButton extends Component {
181
193
this . componentStack = useStackingComponentState ( ) ;
182
194
this . componentStack . push ( HighlightConfigurator , {
183
195
componentStack : this . componentStack ,
184
- ...this . props ,
196
+ ...omit ( this . props , "title" ) ,
185
197
} ) ;
186
198
this . configuratorPopover = usePopover ( StackingComponent , {
187
199
onClose : ( ) => {
0 commit comments