File tree Expand file tree Collapse file tree 4 files changed +44
-6
lines changed
projects/detail/components/DescriptionField Expand file tree Collapse file tree 4 files changed +44
-6
lines changed Original file line number Diff line number Diff line change 88 all : revert ;
99 font-size : 24px ;
1010 }
11- }
11+ }
1212
13- b ,
13+ b ,
1414 i ,
15- s ,
15+ s ,
1616 hr ,
1717 blockquote ,
1818 ul ,
3333 // add style for heading list in headings selection popup, because 'all:revert' has been setted before
3434 .te- heading- add ul {
3535 list-style : none ;
36- }
36+ }
3737
3838 // hide uplodd file
3939 .tui-editor-popup {
Original file line number Diff line number Diff line change 11/*
2- * TuiEditor
2+ * TuiEditor
33 * wrap toast-ui editor with react and support react 15
44 */
55
@@ -132,7 +132,7 @@ TuiEditor.propTypes = {
132132 // use default htmlSanitizer
133133 useDefaultHTMLSanitizer : PropTypes . bool ,
134134 // toolbar items.
135- toolbarItems : PropTypes . arrayOf ( PropTypes . object ) ,
135+ toolbarItems : PropTypes . arrayOf ( PropTypes . oneOfType ( PropTypes . object , PropTypes . string ) ) ,
136136 // Array of plugins. A plugin can be either a function or an array in the form of [function, options].
137137 plugins : PropTypes . arrayOf ( PropTypes . object ) ,
138138 // Using extended Autolinks specified in GFM spec
Original file line number Diff line number Diff line change 1+ @import ' ~tc-ui/src/styles/tc-includes' ;
2+
3+ .description-editor {
4+ :global {
5+ .tui- editor- contents {
6+ code {
7+ background-color : transparent ;
8+ color : inherit ;
9+ }
10+
11+ pre {
12+ background-color : transparent ;
13+ color : inherit ;
14+ padding : 0 ;
15+ }
16+ }
17+ }
18+ }
Original file line number Diff line number Diff line change @@ -6,10 +6,30 @@ import React from 'react'
66import PropTypes from 'prop-types'
77
88import TuiEditor from '../../../../components/TuiEditor'
9+ import './DescriptionField.scss'
910
1011const DescriptionField = ( props ) => (
1112 < TuiEditor
1213 { ...props }
14+ toolbarItems = { [
15+ 'heading' ,
16+ 'bold' ,
17+ 'italic' ,
18+ 'strike' ,
19+ 'code' ,
20+ 'divider' ,
21+ 'quote' ,
22+ 'codeblock' ,
23+ 'hr' ,
24+ 'divider' ,
25+ 'ul' ,
26+ 'ol' ,
27+ 'divider' ,
28+ 'image' ,
29+ 'link' ,
30+ ] }
31+ plugins = { [ ] }
32+ styleName = "description-editor"
1333 previewStyle = "vertical"
1434 height = "400px"
1535 hideModeSwitch
You can’t perform that action at this time.
0 commit comments