Jump to content

TextEdit (API)

From Wikipedia, the free encyclopedia

TextEditwas the name of a collection ofapplication programming interfaces(APIs) in theclassic Mac OSfor performing text editing.

These APIs were originally designed to provide a common text handling system to support text entry fields indialog boxesand other simple text editing within the MacintoshGUI.Over time, they were extended to provide more advanced text editing features, but its limited original scope led to fundamental limitations. Apple repeatedly stated that TextEdit was not aword processor,and therefore providing rich text editing was always left to third-party developers.

Basic limitations of TextEdit include:

  • only provides support for 8-bitcharacter sets
  • 16-bit internal inde xing limits text to a maximum length of about 32,000 characters
  • use ofQuickDrawfor glyph rendering limited the maximum height of a text block to 32,767 pixels - this could be encountered well before the character limit was hit with larger font sizes.

The first incarnation of TextEdit provided support for only a single style of text, which was applied to all text in the block. This was more than adequate for its intended use, supporting text entry fields. Later, support was added for styled text so that TextEdit could be used for more complex text editing tasks, such as text editing areas in web browsers, etc.[clarification needed]

TextEdit remains part of theCarbon APIonmacOS,but has been superseded by numerous other solutions includingATSUIin Carbon, the third partyWASTE text engine,as well as NSText and related classes withinCocoa.