I have one NSTextView containing formatted text and embedded images like following.
I want convert above into plain text like following:
Hi this is test data (...picture...)This is colored text.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After trying few hours i came up with the following solution for my own requirement.Please let me know if we can have better way to do that.
I have created NSString category with following code:
And, i am using it like following:
Where contentView is NSTextView.