@@ -16,6 +16,7 @@ import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';
1616import { Icon } from 'office-ui-fabric-react/lib/Icon' ;
1717import { elementContains } from 'office-ui-fabric-react/lib/Utilities' ;
1818import * as telemetry from '../../common/telemetry' ;
19+ import { initializeIcons } from 'office-ui-fabric-react/lib/Icons' ;
1920
2021
2122const TOOLBARPADDING : number = 28 ;
@@ -27,6 +28,9 @@ const TOOLBARPADDING: number = 28;
2728 * - Block quotes only work on single lines. This is a frequently-requested feature with Quill that isn't available yet.
2829 * - Tables aren't supported yet. I'll gladly add table formatting support if users request it.
2930 */
31+
32+ initializeIcons ( ) ;
33+
3034export class RichText extends React . Component < IRichTextProps , IRichTextState > {
3135 private _quillElem : ReactQuill = undefined ;
3236 private _wrapperRef : HTMLDivElement = undefined ;
@@ -36,7 +40,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
3640 private ddStyleOpts = [ {
3741 key : 0 ,
3842 text : strings . HeaderNormalText ,
39- data : { }
43+ data : { }
4044 } , {
4145 key : 2 ,
4246 text : strings . HeaderH2 ,
@@ -439,11 +443,13 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
439443 Quill . register ( SizeClass , true ) ;
440444
441445 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 } ` } >
443447 < div id = { this . _toolbarId } style = { { top :this . state . wrapperTop } } >
444448 {
445449 showStyles && (
446- < Dropdown className = { `${ styles . headerDropDown } ${ styles . toolbarDropDown } ` }
450+ < Dropdown
451+ id = "DropDownStyles"
452+ className = { `${ styles . headerDropDown } ${ styles . toolbarDropDown } ` }
447453 onRenderCaretDown = { ( ) => < Icon className = { styles . toolbarSubmenuCaret } iconName = "CaretDownSolid8" /> }
448454 selectedKey = { this . state . formats . header || 0 }
449455 options = { this . ddStyleOpts }
@@ -492,6 +498,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
492498 {
493499 showAlign && (
494500 < Dropdown className = { `${ styles . toolbarDropDown } ` }
501+ id = "DropDownAlign"
495502 onRenderCaretDown = { ( ) => < Icon className = { styles . toolbarSubmenuCaret } iconName = "CaretDownSolid8" /> }
496503 selectedKey = { this . state . formats . align || 'left' }
497504 options = { this . ddAlignOpts }
@@ -504,6 +511,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
504511 {
505512 showList && (
506513 < Dropdown className = { styles . toolbarDropDown }
514+ id = "DropDownLists"
507515 onRenderCaretDown = { ( ) => < Icon className = { styles . toolbarSubmenuCaret } iconName = "CaretDownSolid8" /> }
508516 selectedKey = { this . state . formats . list }
509517 options = { this . ddListOpts }
0 commit comments