mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-17 13:52:04 +00:00
Service provider and other cleanup
- Removed old 'exposeTranslations' system to instead use new component option system. - Extracted validation rules into their own service provider. - Cleaned up some formatting/comments in the repos.
This commit is contained in:
parent
5e01c30882
commit
66917520cb
10 changed files with 45 additions and 47 deletions
resources/js/components
|
@ -13,6 +13,7 @@ class MarkdownEditor {
|
|||
|
||||
this.pageId = this.$opts.pageId;
|
||||
this.textDirection = this.$opts.textDirection;
|
||||
this.imageUploadErrorText = this.$opts.imageUploadErrorText;
|
||||
|
||||
this.markdown = new MarkdownIt({html: true});
|
||||
this.markdown.use(mdTasksLists, {label: true});
|
||||
|
@ -373,7 +374,7 @@ class MarkdownEditor {
|
|||
const newContent = `[](${resp.data.url})`;
|
||||
replaceContent(placeHolderText, newContent);
|
||||
}).catch(err => {
|
||||
window.$events.emit('error', trans('errors.image_upload_error'));
|
||||
window.$events.emit('error', context.imageUploadErrorText);
|
||||
replaceContent(placeHolderText, selectedText);
|
||||
console.log(err);
|
||||
});
|
||||
|
@ -492,7 +493,7 @@ class MarkdownEditor {
|
|||
this.cm.focus();
|
||||
DrawIO.close();
|
||||
}).catch(err => {
|
||||
window.$events.emit('error', trans('errors.image_upload_error'));
|
||||
window.$events.emit('error', this.imageUploadErrorText);
|
||||
console.log(err);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue