Skip to content

Commit 7c2f373

Browse files
authored
[elsa] 指定ol和ul对应样式的适配范围 (#106)
1 parent 3bc879f commit 7c2f373

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

framework/elsa/fit-elsa-react/src/components/note/TextEditor.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {useShapeContext} from '@/components/DefaultRoot.jsx';
1616
import {EditorToolbar} from '@/components/note/EditorToolBar.jsx';
1717
import PropTypes from 'prop-types';
1818
import {TOOL_BAR_SIZE} from '@/components/note/const.js';
19-
import {useTranslation} from 'react-i18next';
2019
import {ResizeButton} from '@/components/note/ResizeButton.jsx';
2120
import {EVENT_TYPE, isPointInRect} from '@fit-elsa/elsa-core';
2221

@@ -33,7 +32,6 @@ import {EVENT_TYPE, isPointInRect} from '@fit-elsa/elsa-core';
3332
*/
3433
const _TextEditor = ({text, style, dispatch, isFocused, isInDragging}) => {
3534
const shape = useShapeContext();
36-
const {t} = useTranslation();
3735
const shapeDiv = shape.drawer.parent;
3836
const [isEditing, setIsEditing] = useState(false); // 控制编辑状态
3937
const editorRef = useRef(null); // 创建一个ref

framework/elsa/fit-elsa-react/src/components/note/editor.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ body {
33
line-height: 1.4;
44
}
55

6-
ol, ul {
6+
.mce-content-body ol,
7+
.mce-content-body ul {
78
display: block !important;
89
margin-block-start: 1em !important;
910
margin-block-end: 1em !important;
1011
padding-inline-start: 40px !important;
1112
unicode-bidi: isolate !important;
1213
}
1314

14-
ol {
15+
.mce-content-body ol {
1516
list-style-type: decimal !important;
1617
}
1718

18-
ul {
19+
.mce-content-body ul {
1920
list-style-type: disc !important;
2021
}
2122

0 commit comments

Comments
 (0)