Removed CKEditor 5 because it was of little use and doubled the code size of root.js

Word wrap and Save to code editor.
This commit is contained in:
Tomas Bures 2018-11-22 15:21:15 +01:00
parent a993c06aaf
commit 3bb235a585
12 changed files with 417 additions and 82 deletions

View file

@ -118,7 +118,7 @@ export default class CUD extends Component {
}
}
async submitHandler() {
async doSave(stayOnPage) {
const t = this.props.t;
let exportedData = {};
@ -145,8 +145,14 @@ export default class CUD extends Component {
});
if (submitResponse) {
if (this.props.entity) {
if (stayOnPage) {
this.enableForm();
this.clearFormStatusMessage();
this.setFlashMessage('success', t('templateSaved'));
} else if (this.props.entity) {
this.navigateToWithFlashMessage('/templates', 'success', t('templateSaved'));
} else {
this.navigateToWithFlashMessage(`/templates/${submitResponse}/edit`, 'success', t('templateSaved'));
}
@ -156,6 +162,14 @@ export default class CUD extends Component {
}
}
async save() {
await this.doSave(true);
}
async submitHandler() {
await this.doSave(false);
}
async extractPlainText() {
const typeKey = this.getFormValue('type');
const exportedData = await this.templateTypes[typeKey].exportHTMLEditorData(this);