Removed external fonts from page forms and remove initial form flicker
Showing
2 changed files
with
7 additions
and
3 deletions
| 1 | module.exports = { | 1 | module.exports = { |
| 2 | selector: '#html-editor', | 2 | selector: '#html-editor', |
| 3 | content_css: [ | 3 | content_css: [ |
| 4 | - '/css/styles.css', | 4 | + '/css/styles.css' |
| 5 | - '//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300' | ||
| 6 | ], | 5 | ], |
| 7 | body_class: 'page-content', | 6 | body_class: 'page-content', |
| 8 | relative_urls: false, | 7 | relative_urls: false, |
| ... | @@ -133,7 +132,7 @@ module.exports = { | ... | @@ -133,7 +132,7 @@ module.exports = { |
| 133 | formData.append('file', file, remoteFilename); | 132 | formData.append('file', file, remoteFilename); |
| 134 | formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content')); | 133 | formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content')); |
| 135 | 134 | ||
| 136 | - xhr.open('POST', '/upload/image'); | 135 | + xhr.open('POST', '/images/gallery/upload'); |
| 137 | xhr.onload = function () { | 136 | xhr.onload = function () { |
| 138 | if (xhr.status === 200 || xhr.status === 201) { | 137 | if (xhr.status === 200 || xhr.status === 201) { |
| 139 | var result = JSON.parse(xhr.responseText); | 138 | var result = JSON.parse(xhr.responseText); |
| ... | @@ -141,6 +140,7 @@ module.exports = { | ... | @@ -141,6 +140,7 @@ module.exports = { |
| 141 | } else { | 140 | } else { |
| 142 | console.log('An error occured uploading the image'); | 141 | console.log('An error occured uploading the image'); |
| 143 | console.log(xhr.responseText); | 142 | console.log(xhr.responseText); |
| 143 | + editor.dom.remove(id); | ||
| 144 | } | 144 | } |
| 145 | }; | 145 | }; |
| 146 | xhr.send(formData); | 146 | xhr.send(formData); | ... | ... |
-
Please register or sign in to post a comment