|
|
|
@ -24,7 +24,7 @@ import '../../forums/RightSection.css'
|
|
|
|
|
import './TopicDetail.css'
|
|
|
|
|
import '../common/courseMessage.css'
|
|
|
|
|
import { Pagination, Tooltip } from 'antd'
|
|
|
|
|
import { bytesToSize, ConditionToolTip } from 'educoder'
|
|
|
|
|
import { bytesToSize, ConditionToolTip, markdownToHTML, MarkdownToHtml } from 'educoder'
|
|
|
|
|
import SendToCourseModal from '../coursesPublic/modal/SendToCourseModal'
|
|
|
|
|
import CBreadcrumb from '../common/CBreadcrumb'
|
|
|
|
|
import { generateComments, generateChildComments, _findById, handleContentBeforeCreateNew, addNewComment
|
|
|
|
@ -87,15 +87,6 @@ class TopicDetail extends Component {
|
|
|
|
|
replies_count: response.data.data.total_replies_count
|
|
|
|
|
}, {...this.state.memo})
|
|
|
|
|
}, () => {
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", {
|
|
|
|
|
htmlDecode: "style,script,iframe", // you can filter tags decode
|
|
|
|
|
taskList: true,
|
|
|
|
|
tex: true, // 默认不解析
|
|
|
|
|
flowChart: true, // 默认不解析
|
|
|
|
|
sequenceDiagram: true // 默认不解析
|
|
|
|
|
});
|
|
|
|
|
}, 200)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// const { memo_replies, memo } = response.data;
|
|
|
|
@ -181,13 +172,13 @@ class TopicDetail extends Component {
|
|
|
|
|
// md渲染content,等xhr执行完(即memoLoading变化),memo.content更新后初始化md
|
|
|
|
|
|
|
|
|
|
setTimeout(()=>{
|
|
|
|
|
var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", {
|
|
|
|
|
htmlDecode: "style,script,iframe", // you can filter tags decode
|
|
|
|
|
taskList: true,
|
|
|
|
|
tex: true, // 默认不解析
|
|
|
|
|
flowChart: true, // 默认不解析
|
|
|
|
|
sequenceDiagram: true // 默认不解析
|
|
|
|
|
});
|
|
|
|
|
// var shixunDescr = window.editormd.markdownToHTML("memo_content_editorMd", {
|
|
|
|
|
// htmlDecode: "style,script,iframe", // you can filter tags decode
|
|
|
|
|
// taskList: true,
|
|
|
|
|
// tex: true, // 默认不解析
|
|
|
|
|
// flowChart: true, // 默认不解析
|
|
|
|
|
// sequenceDiagram: true // 默认不解析
|
|
|
|
|
// });
|
|
|
|
|
}, 200)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -629,13 +620,8 @@ class TopicDetail extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="padding40 memoContent new_li">
|
|
|
|
|
<div id="memo_content_editorMd" className="new_li">
|
|
|
|
|
<textarea style={{'display': 'none'}}>
|
|
|
|
|
{memo.content}
|
|
|
|
|
</textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<MarkdownToHtml content={memo.content}></MarkdownToHtml>
|
|
|
|
|
</div>
|
|
|
|
|
{/* style={{ paddingTop: '0px'}} */}
|
|
|
|
|
<div className="padding40 bor-bottom-greyE" >
|
|
|
|
|
<div className="mt10 mb20">
|
|
|
|
|
{/* ${memo.user_praise ? '' : ''} */}
|
|
|
|
|