|
|
|
@ -1,15 +1,8 @@
|
|
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import { Redirect } from 'react-router';
|
|
|
|
|
|
|
|
|
|
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
|
|
|
|
import { getUploadActionUrl } from 'educoder';
|
|
|
|
|
|
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
import classNames from 'classnames'
|
|
|
|
|
|
|
|
|
|
import { getUploadActionUrl } from 'educoder'
|
|
|
|
|
|
|
|
|
|
import './MemoDetailEditor.css'
|
|
|
|
|
import './MemoDetailEditor.css';
|
|
|
|
|
|
|
|
|
|
require('codemirror/lib/codemirror.css');
|
|
|
|
|
|
|
|
|
@ -96,13 +89,13 @@ class MemoDetailMDEditortwo extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showEditor() {
|
|
|
|
|
$("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
|
|
|
|
|
if (this.commentMDEditor) {
|
|
|
|
|
this.commentMDEditor.cm.focus()
|
|
|
|
|
} else {
|
|
|
|
|
$('#commentInput input')[0].click()
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// $("html, body").animate({ scrollTop: $('#commentInput').offset().top - 100 }, 1000, () => {
|
|
|
|
|
// if (this.commentMDEditor) {
|
|
|
|
|
// this.commentMDEditor.cm.focus()
|
|
|
|
|
// } else {
|
|
|
|
|
// $('#commentInput input')[0].click()
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
onMockInputClick = () => {
|
|
|
|
|
this.setState({isInited: true})
|
|
|
|
|