This commit is contained in:
caishi 2020-05-09 11:54:17 +08:00
parent 72cff809e5
commit d4957c8c9c
3 changed files with 14 additions and 14 deletions

View File

@ -558,19 +558,20 @@
_this.setToolbar();
editormd.loadScript(loadPath + "marked.min", function () {
// editormd.loadScript(loadPath + "marked.min", function () {
// });
editormd.$marked = marked;
editormd.$marked = marked;
if (settings.previewCodeHighlight) {
editormd.loadScript(loadPath + "prettify.min", function () {
loadFlowChartOrSequenceDiagram();
});
}
else {
if (settings.previewCodeHighlight) {
editormd.loadScript(loadPath + "prettify.min", function () {
loadFlowChartOrSequenceDiagram();
}
});
});
}
else {
loadFlowChartOrSequenceDiagram();
}
});
@ -1429,7 +1430,6 @@
if (timer === null) {
return this;
}
this.previewContainer.find("." + editormd.classNames.tex).each(function () {
var tex = $(this);
editormd.$katex.render(tex.text(), tex[0]);

View File

@ -20,7 +20,7 @@ import Certifiedprofessional from './modules/modals/Certifiedprofessional';
import Loading from './Loading'
import Loadable from 'react-loadable';
import marked from './common/marked'
import moment from 'moment'
@ -33,7 +33,7 @@ import { initAxiosInterceptors } from './AppConfig'
import { Provider } from 'react-redux';
import configureStore from './redux/stores/configureStore';
const store = configureStore();
window.marked = marked;
const theme = createMuiTheme({
palette: {
primary: {

View File

@ -168,7 +168,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
}
},
onload: function () {
setEditorInstance(editor_instance)
setEditorInstance(this)
}
})