Mac中的基本HTML编辑器 [英] Basic HTML editor in Mac
问题描述
我是Cocoa新手。我需要在Cocoa中构建一个基本的HTML编辑器。用户将基本上将格式化文本等,但他/她不知道文本将被保存为HTML。我应该使用NSText视图或应该使用WebView。如果有任何教程可用于构建基本的HTML编辑器。
I am new to Cocoa. I need to build a basic HTML editor in Cocoa. The user will basically will be formatting text etc but he/she does not know that the text will be saved as HTML. Should I be using NSText View or should I be using WebView. Also if there any tutorials are available for building basic HTML editor.
推荐答案
我会使用 NSTextView
。您可以将文本另存为 NSAttributedString
,并从html文件读入 NSAttributedString
。 这里是一些信息,以获得你开始了。
I would use an NSTextView
. You can save the text as an NSAttributedString
and read from the html file into an NSAttributedString
. Here's some info on that to get you started.
这篇关于Mac中的基本HTML编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!