Coder Social home page Coder Social logo

Comments (4)

linkesch avatar linkesch commented on August 11, 2024

Interesting idea. I wasn't familiar with the jQuery File Upload until now, but it looks like a way to go. I like the idea of shifting responsibilities to other plugins and focusing only on doing core features right.

Maybe a good solution would be to allow developers to choose - if someone prefers basic jQuery ajax, they can use it, or they can choose jQuery File Upload instead.

from medium-editor-insert-plugin.

abitdodgy avatar abitdodgy commented on August 11, 2024

I would have a stab at this, but at the moment I'm out of my depth. I work mostly in Ruby, and JavaScript isn't exactly my forte. I'm reading through the code right now, and there are a lot of helpful comments.

Is it possible in theory to hijack the upload method and refer it to another library like jQuery file upload where we can bridge the two plugins programatically?

https://github.com/orthes/medium-editor-insert-plugin/blob/master/src/js/medium-editor-insert-images.js#L135-L152

Would the bulk of the work happen in medium-editor-insert-images.js? Do I need to touch the medium-editor-insert-plugin.js file?

from medium-editor-insert-plugin.

linkesch avatar linkesch commented on August 11, 2024

Everything regarding the file upload should be in  medium-editor-insert-images.js file

from medium-editor-insert-plugin.

linkesch avatar linkesch commented on August 11, 2024

I made possible to override upload function (67f3910), so if you want, you can replace jQuery ajax with something more sophisticated.

$('.editable').mediumInsert({
  editor: editor,
  addons: {
    images: {
      uploadFile: function ($placeholder, file, that) {
        // DO WHATEVER YOU WANT HERE
      }
    }
  }
});

from medium-editor-insert-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.