-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Good copy/pasting support #9
Comments
I also think copy/paste should strip all blocks which aren't allowed in the current field. At the moment, if you paste some text with a list or a link in a field which doesn't allow them (no buttons), they will remain and appear in the output. |
After struggling with this and arriving where I'm at in 58866cd, obvious difficulties I can think of:
For now I've started normalising content after insertion, via |
This is under way at #50. I've made good progress, but I'm sure there are a lot of edge cases this is not handling. |
Fixed by #50. I have more testing to do but this looks fairly solid so far. The PR is only/mostly about removing styles that are not allowed, and isn't much concerned with ensuring that retained styles actually are what they are meant to be. I'll open separate issue(s) for that, and document gotchas next. |
Expected behavior
IMAGE
entities are created, but come with anunstyled
block instead of atomic. This should be normalised.IMAGE
andLINK
are available in the first place. They should be removed if necessary (both from the block, and the entity map).Unexpected behavior
[ ] Be smart about pasting of uppercase text? IS SHOUTING ALLOWED? WHAT IF YOU COPY/PASTE AN H2?Example big content to copy paste:
http://kiwibank.co.nz/personal-banking/investments/term-deposits/
http://kiwibank.co.nz/personal-banking/investments/notice-saver/
http://kiwibank.co.nz/personal-banking/kiwisaver/what-is-kiwisaver/
https://www.kiwibank.co.nz/about-us/legal-docs/#kiwibanks-quarterly-disclosure-statements-and-the-annual-reports-of-kiwibank-and-its-related-entities - The content inside an accordion block will be a rich text area so need to be able to probably build this content in a rich text field…i.e.. heading, doc link, heading, doc link, terms and conditions etc.
https://www.kiwibank.co.nz/personal-banking/credit-cards/low-interest-cards/low-rate-mastercard/ - this page has an example of the inline rates that get loaded from the current api
https://www.kiwibank.co.nz/about-us/security/common-banking-frauds-and-scams/card-fraud/
https://www.kiwibank.co.nz/personal-banking/home-loans/getting-a-home-loan/first-home-buyers/should-you-buy/ - ignore custom things like the grid with two columns of text. look at the big blocks of text that will most likely be able to be build with one rich text area :)
https://www.kiwibank.co.nz/personal-banking/home-loans/getting-a-home-loan/first-home-buyers/finding-a-house/
The first home buyers guide inside the getting a home loan section has some pages that have a lot of content if you need to copy paste big blocks for testing.
Try copy/pasting from Word.
Try copy/pasting from Pages.
The text was updated successfully, but these errors were encountered: