Drag 'n Drop Inline Images Frontend

Review Request #6510 — Created Oct. 26, 2014 and discarded — Latest diff uploaded

Information

Review Board
master

Reviewers

Adding support for dragging and dropping images into the markdown editor. Instead of having upload their image first and then link to that image, users can simply drag-and-drop their image file into the markdown editor. This will upload the image to reviewboard and insert a link to that image in the editor.

These changes focus on the frontend work and include:

  • Extending the DnDUploaderView to support multiple overlays on the page. Multiple DropTargets can be registered with the DnDOverlay instance.
  • Extending the TextEditorView to support dragging and dropping images
  • Adding a resource for UserFileAttachments

Tested in Chrome 38.0.2125.122, Firefox 32.0.2, Safari 8.0, Internet Explorer 11.0.9600

All existing unit tests pass.

  • Added tests for the changes done to the TextEditorView (testing the appendText method and the Drag and Drop functionality).
  • Added tests for serialization and parsing of the UserFileAttachment resource.
  • Added tests for the DnDUploader functionality.

    Loading...