Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
3.99k stars 612 forks source link

Add a plugin for uploading files(not images) #1289

Closed humam-abd closed 1 year ago

humam-abd commented 2 years ago

Closes #739 & Closes #1287 Hey @Alex-D, This is a plugin for uploading files(not images). This is working fine on chrome as well as firefox browsers. Please take your time to review this.

humam-abd commented 2 years ago

Local Testing

https-admin-galilee-test-dyd-solutions-groups-6-admin-1-newcourse

humam-abd commented 2 years ago

Documentation

How to use it?

<-- Import Trumbowyg plugins... -->
<script src="trumbowyg/dist/plugins/uploadfile/trumbowyg.uploadfile.js"></script>

Then you can use the new button definition uploadfile


$('#my-editor').trumbowyg({
    btns: [
        ['uploadfile']
    ],
    plugins: {
        uploadfile: {
            // Some uploadfile plugin options(same as upload plugin except `imageWidthModalEdit`)
        }
    }
});
humam-abd commented 2 years ago

Hey,

Same as here: #987 (comment)

Can you add documentation and a demo?

Hey @Alex-D, Checkout the demo and documentation i just added. Thanks.

Alex-D commented 1 year ago

Thank you :)

I think I will merge that with the existing Upload plugin