Question: I have an Editable NSTextView,In which user will write using different font style, on certain action i need to prepare the HTML Formate of it, 
Can anyone suggest me, how i can retrieve the data from NSTextView, 
I am able to use 

```
[[pInputText textStorage] words];

```

but it returns NSArray, from which i am not able to get NSMutableString,

Can anyone suggest me the best possible way to retrieve the String/data what user typed and in which format.

Answer: 
`NSTextView` inherits from `NSText`, which has a `-string` method. So `[pInputText string` should do what you want.

Alternately, `TextStorage` is a subclass of `NSMutableAttributedString`, so if you want an attributed string you can just use the return of `[pInputText textStorage]` directly.
since `NSTextStorage` is a subclass of `NSMutableAttributedString` which has a method through its superclass `NSAttributedString` :[initWithHTML:baseURL:documentAttributes](http://file:///Developer/Documentation/DocSets/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset/Contents/Resources/Documents/index.html#documentation/Cocoa/Reference/ApplicationKit/Classes/NSAttributedString_AppKitAdditions/Reference/Reference.html#//apple_ref/occ/instm/NSAttributedString/initWithHTML%3abaseURL%3adocumentAttributes%3a), you can use this to get what you want. documentAttributes can be `NULL`.