1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

Image upload for WYSIWYG editor

Fixes #106
This commit is contained in:
Harvey Kandola 2018-06-06 16:53:31 +01:00
parent b828145163
commit b34e41f65c
4 changed files with 103 additions and 2 deletions

View file

@ -42,6 +42,9 @@ export default Component.extend({
statusbar: false,
inline: true,
paste_data_images: true,
images_upload_handler: function (blobInfo, success, failure) { // eslint-disable-line no-unused-vars
success("data:" + blobInfo.blob().type + ";base64," + blobInfo.base64());
},
image_advtab: true,
image_caption: true,
media_live_embeds: true,
@ -98,14 +101,14 @@ export default Component.extend({
'advlist autolink lists link image charmap print hr anchor pagebreak',
'searchreplace wordcount visualblocks visualchars code codesample fullscreen',
'insertdatetime media nonbreaking save table directionality',
'template paste textcolor colorpicker textpattern imagetools'
'template paste textcolor colorpicker textpattern imagetools uploadimage'
],
menu: {},
menubar: false,
toolbar1:
'formatselect fontsizeselect | bold italic underline strikethrough superscript subscript | forecolor backcolor link unlink',
toolbar2:
'outdent indent bullist numlist | alignleft aligncenter alignright alignjustify | table image media codesample',
'outdent indent bullist numlist | alignleft aligncenter alignright alignjustify | table uploadimage image media codesample',
save_onsavecallback: function () {
Mousetrap.trigger('ctrl+s');
}