In https://github.com/wordpress-mobile/WordPress-iOS/pull/9188, we’re adding support for importing a variety of document types into posts directly in Aztec.
If the user selects a single text-based document that we can read the content of (.txt, .md., etc), we should offer the user a choice: whether to upload the file itself (as we do in #9188), or import the content of the document and append it to the current post.
We could present an action sheet as follows:
Title / message: “You can either upload this file and insert a link into your post, or append the content of the file to your post.”
Buttons: “Upload File” / “Append Content” / “Cancel”
cc @iamthomasbishop - any suggestions for improvements of the above? I’m not sure about the wording.
I think we could also potentially support this functionality for PDF documents on iOS 11 quite easily using PDFKit. PDFDocument has a string property which returns the text content of the document.
I could see this being useful, for sure. I might word the copy a little different, perhaps something like:
Title: "Would you like to attach the file as a link, or add the contents of the file to your post?"
Actions: [Attach File as Link] [Add Contents to Post] [Cancel]
Obviously we need a copy expert to chime in, but I like this idea of allowing the expansion of contents into a post.
@iamthomasbishop I'm happy to proceed to implement with the tentative copy above. Can I help by reaching out to someone in particular with regard to final copy?
@a8c-sab-trial I'll see if I can get someone to review the copy. Added the Needs Copy Review label :)
Can we tweak just a little to be super clear? Like:
What do you want to do with this file: upload it and add a link to the file into your post, or add the contents of the file directly to the post?
Just to spell out what "attach as a link" means a little more.
What @michelleweber said! That sounds great.
Thank you both - I'll make it so. :)
I have a created a draft PR that addresses this issue. I'd welcome your feedback.
Most helpful comment
Can we tweak just a little to be super clear? Like:
Just to spell out what "attach as a link" means a little more.