@@ -12,17 +12,21 @@ class CKEditor5 extends PureComponent {
1212 onError: PropTypes.func,
1313 renderError: PropTypes.func,
1414 renderLoading: PropTypes.func,
15- onChange: propTypes.func,
16- initialData: propTypes.string,
17- maxHeight: propTypes.number,
18- editorConfig: propTypes.object,
19- style: propTypes.object,
20- onFocus: propTypes.func,
21- onBlur: propTypes.func,
22- disableTooltips: propTypes.bool,
23- height: propTypes.number,
24- androidHardwareAccelerationDisabled: propTypes.bool,
25- fontFamily: propTypes.string,
15+ onChange: PropTypes.func,
16+ initialData: PropTypes.string,
17+ maxHeight: PropTypes.number,
18+ editorConfig: PropTypes.object,
19+ style: PropTypes.object,
20+ onFocus: PropTypes.func,
21+ onBlur: PropTypes.func,
22+ disableTooltips: PropTypes.bool,
23+ height: PropTypes.number,
24+ androidHardwareAccelerationDisabled: PropTypes.bool,
25+ fontFamily: PropTypes.string,
26+ colors: PropTypes.object,
27+ toolbarBorderSize: PropTypes.string,
28+ editorFocusBorderSize: PropTypes.string,
29+ placeHolderText: PropTypes.string
2630 }
2731
2832 static defaultProps = {
@@ -69,7 +73,7 @@ class CKEditor5 extends PureComponent {
6973 render() {
7074 const {
7175 maxHeight, editorConfig, style, initialData, renderLoading, disableTooltips, height,
72- androidHardwareAccelerationDisabled, fontFamily,
76+ androidHardwareAccelerationDisabled, fontFamily, colors, toolbarBorderSize, editorFocusBorderSize, placeHolderText
7377 } = this.props;
7478 return (
7579 <WebView
@@ -99,19 +103,38 @@ class CKEditor5 extends PureComponent {
99103 height: ${height}px;
100104 max-height: ${maxHeight || height}px;
101105 }
106+ .ck.ck-editor__main>.ck-editor__editable {
107+ background: ${colors.backgroundColor};
108+ color: ${colors.white};
109+ font-family: ${fontFamily || '-apple-system, "Helvetica Neue", "Lucida Grande"'};
110+ border-style: none;
111+ }
112+ .ck .ck-toolbar {
113+ background: ${colors.offContentBackground};
114+ border: ${toolbarBorderSize};
115+ }
116+ .ck.ck-reset_all, .ck.ck-reset_all * {
117+ color: ${colors.white}
118+ }
119+ .ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused {
120+ border: ${editorFocusBorderSize};
121+ }
122+ .ck-toolbar .ck-on .ck.ck-icon, .ck-toolbar .ck-on .ck.ck-icon * {
123+ color: ${colors.bg5} !important;
124+ }
125+ .ck-toolbar .ck-button:hover .ck.ck-icon, .ck-toolbar .ck-button:hover .ck.ck-icon * {
126+ color: ${colors.bg5};
127+ }
102128 ${disableTooltips ? `
103129 .ck.ck-button .ck.ck-tooltip {
104130 display: none;
105131 }
106- body {
107- font-family: ${fontFamily || 'Arial, Helvetica, sans-serif'};
108- }
109132 ` : ''}
110133 </style>
111134 </head>
112135
113136 <body>
114- <textarea name="editor1" id="editor1"></textarea>
137+ <textarea name="editor1" placeholder="${placeHolderText}" id="editor1"></textarea>
115138 <script>
116139 ClassicEditor
117140 .create( document.querySelector( '#editor1' ), ${JSON.stringify(editorConfig || {})} )
0 commit comments