hjm 5 years ago
parent 591685c296
commit f8665b8a1f

@ -72,6 +72,13 @@ html, body {
/* 某些情况下被cm盖住了 */ /* 某些情况下被cm盖住了 */
z-index: 99; z-index: 99;
} }
/* 图片点击放大的场景,隐藏图片链接 */
.editormd-image-click-expand .editormd-image-dialog {
height: 234px !important;
}
.editormd-image-click-expand .editormd-image-dialog .image-link {
display: none;
}
/* 解决鼠标框选时,左边第一列没高亮的问题 */ /* 解决鼠标框选时,左边第一列没高亮的问题 */
.CodeMirror .CodeMirror-lines pre.CodeMirror-line, .CodeMirror .CodeMirror-lines pre.CodeMirror-line-like { .CodeMirror .CodeMirror-lines pre.CodeMirror-line, .CodeMirror .CodeMirror-lines pre.CodeMirror-line-like {
padding: 0 12px ; padding: 0 12px ;

@ -250,7 +250,7 @@ class CommonReply extends Component{
} }
`}</style> `}</style>
<MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么" <MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么"
height={160} showError={true} height={160} showError={true} imageExpand={true}
replyComment={this.replyComment} replyComment={this.replyComment}
commentsLength={comments ? comments.length : 0} commentsLength={comments ? comments.length : 0}
></MemoDetailMDEditor> ></MemoDetailMDEditor>

@ -130,7 +130,7 @@ class MemoDetailMDEditor extends Component {
} }
} }
render() { render() {
const { match, history, memo, placeholder, className } = this.props const { match, history, memo, placeholder, className, imageExpand } = this.props
const { isInited, errorMsg } = this.state const { isInited, errorMsg } = this.state
if (!memo) { if (!memo) {
return <div></div> return <div></div>
@ -185,7 +185,8 @@ class MemoDetailMDEditor extends Component {
` `
} */} } */}
</style> </style>
<div nhname={`new_message_${memo.id}`} className={`commentInput commentInputs ${className}`} <div nhname={`new_message_${memo.id}`}
className={`commentInput commentInputs ${className} ${imageExpand && 'editormd-image-click-expand' }`}
style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} > style={{ padding: '30px',boxSizing:"border-box", display: isInited ? '' : 'none', paddingBottom: '40px' }} >
<div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px' <div id="memo_comment_editorMd" className="editorMD" style={{ marginBottom: '0px'
, border: errorMsg ? '1px solid red' : '1px solid #ddd'}}> , border: errorMsg ? '1px solid red' : '1px solid #ddd'}}>

@ -317,14 +317,14 @@ export default class TPMMDEditor extends Component {
let { let {
showError showError
} = this.state; } = this.state;
let { mdID, className, noStorage } = this.props; let { mdID, className, noStorage, imageExpand } = this.props;
let _style = {} let _style = {}
if (showError) { if (showError) {
_style.border = '1px solid red' _style.border = '1px solid red'
} }
return ( return (
<React.Fragment> <React.Fragment>
<div className={`df ${className}`} > <div className={`df ${className} ${imageExpand && 'editormd-image-click-expand' }`} >
{/* padding10-20 */} {/* padding10-20 */}
<div className="edu-back-greyf5 radius4" id={`mdEditor_${mdID}`} style={{..._style}}> <div className="edu-back-greyf5 radius4" id={`mdEditor_${mdID}`} style={{..._style}}>
<textarea style={{display: 'none'}} id={`mdEditors_${mdID}`} name="content"></textarea> <textarea style={{display: 'none'}} id={`mdEditors_${mdID}`} name="content"></textarea>

Loading…
Cancel
Save