This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make default text content of img blocks a little camera emoji
Summary: **what is the change?:** We don't allow pasting whitespace-only blocks - see #231 In the past we set the 'src' as the text content of an 'img' block when pasting/converting HTML, but sometimes the 'src' is really long and can even crash the editor. Plus that's not really what users expect when they paste an image. An empty string as a default would be better but the code in `convertFromHTML` needs refactored and for now I don't want to touch it. The camera emoji is a cute and easy fix. **why make this change?:** Right now images are being dropped by `convertFromHTML **test plan:** Manual testing with examples/draft-0-10-0/convertFromHTML/convert.html We should do a follow-up change to add a test that catches this. **issue:** #1377 *Before* submitting a pull request, please make sure the following is done... 1. Fork the repo and create your branch from `master`. 2. If you've added code that should be tested, add tests! 3. If you've changed APIs, update the documentation. 4. Ensure that: * The test suite passes (`npm test`) * Your code lints (`npm run lint`) and passes Flow (`npm run flow`) * You have followed the [testing guidelines](https://github.com/facebook/draft-js/wiki/Testing-for-Pull-Requests) 5. If you haven't already, complete the [CLA](https://code.facebook.com/cla). Please use the simple form below as a guideline for describing your pull request. Thanks for contributing to Draft.js! - **Summary** [...] **Test Plan** [...] Closes #1378 Differential Revision: D5804382 fbshipit-source-id: f465a1a92155b02c5650acb9622e27e4e3714492
- Loading branch information