Skip to content

Commit 33a9420

Browse files
committed
feat: taas job editor improvements
deploy it to TEST01
1 parent 2de03a6 commit 33a9420

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

src/components/TuiEditor/TuiEditor.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
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,
@@ -33,7 +33,7 @@
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{

src/components/TuiEditor/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
}

src/projects/detail/components/DescriptionField/index.jsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,30 @@ import React from 'react'
66
import PropTypes from 'prop-types'
77

88
import TuiEditor from '../../../../components/TuiEditor'
9+
import './DescriptionField.scss'
910

1011
const 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

0 commit comments

Comments
 (0)