@@ -16,6 +16,7 @@ import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';
16
16
import { Icon } from 'office-ui-fabric-react/lib/Icon' ;
17
17
import { elementContains } from 'office-ui-fabric-react/lib/Utilities' ;
18
18
import * as telemetry from '../../common/telemetry' ;
19
+ import { initializeIcons } from 'office-ui-fabric-react/lib/Icons' ;
19
20
20
21
21
22
const TOOLBARPADDING : number = 28 ;
@@ -27,6 +28,9 @@ const TOOLBARPADDING: number = 28;
27
28
* - Block quotes only work on single lines. This is a frequently-requested feature with Quill that isn't available yet.
28
29
* - Tables aren't supported yet. I'll gladly add table formatting support if users request it.
29
30
*/
31
+
32
+ initializeIcons ( ) ;
33
+
30
34
export class RichText extends React . Component < IRichTextProps , IRichTextState > {
31
35
private _quillElem : ReactQuill = undefined ;
32
36
private _wrapperRef : HTMLDivElement = undefined ;
@@ -36,7 +40,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
36
40
private ddStyleOpts = [ {
37
41
key : 0 ,
38
42
text : strings . HeaderNormalText ,
39
- data : { }
43
+ data : { }
40
44
} , {
41
45
key : 2 ,
42
46
text : strings . HeaderH2 ,
@@ -439,11 +443,13 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
439
443
Quill . register ( SizeClass , true ) ;
440
444
441
445
return (
442
- < div ref = { ( ref ) => this . _wrapperRef = ref } className = { `${ styles . richtext && this . state . editing ? 'ql-active' : undefined } ${ this . props . className } ` } >
446
+ < div ref = { ( ref ) => this . _wrapperRef = ref } className = { `${ styles . richtext && this . state . editing ? 'ql-active' : '' } ${ this . props . className } ` } >
443
447
< div id = { this . _toolbarId } style = { { top :this . state . wrapperTop } } >
444
448
{
445
449
showStyles && (
446
- < Dropdown className = { `${ styles . headerDropDown } ${ styles . toolbarDropDown } ` }
450
+ < Dropdown
451
+ id = "DropDownStyles"
452
+ className = { `${ styles . headerDropDown } ${ styles . toolbarDropDown } ` }
447
453
onRenderCaretDown = { ( ) => < Icon className = { styles . toolbarSubmenuCaret } iconName = "CaretDownSolid8" /> }
448
454
selectedKey = { this . state . formats . header || 0 }
449
455
options = { this . ddStyleOpts }
@@ -492,6 +498,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
492
498
{
493
499
showAlign && (
494
500
< Dropdown className = { `${ styles . toolbarDropDown } ` }
501
+ id = "DropDownAlign"
495
502
onRenderCaretDown = { ( ) => < Icon className = { styles . toolbarSubmenuCaret } iconName = "CaretDownSolid8" /> }
496
503
selectedKey = { this . state . formats . align || 'left' }
497
504
options = { this . ddAlignOpts }
@@ -504,6 +511,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
504
511
{
505
512
showList && (
506
513
< Dropdown className = { styles . toolbarDropDown }
514
+ id = "DropDownLists"
507
515
onRenderCaretDown = { ( ) => < Icon className = { styles . toolbarSubmenuCaret } iconName = "CaretDownSolid8" /> }
508
516
selectedKey = { this . state . formats . list }
509
517
options = { this . ddListOpts }
0 commit comments