Skip to content

moubarak/text-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text & link editor

Text editor mimicking Apple's Notes with some additional features

  • Tap to start editing
  • Auto-detect links even while typing
  • Open links in-app (local browser)
  • Add/remove links from text

Details

UITextView does not support tap to edit. Moreover it doesn't detect/open links while editing. To fix this we:

  • Recognize tap gesture on UITextView
  • Calculate the nearest cursor position
  • Use NSLayoutManager and NSTextStorage apis to detect whether the tap location contains a link and open it
  • Differentiate between auto-detected links and user created links using tags

Preview

Simulator Screen Recording - iPhone 15 - 2024-06-14 at 17 13 04

Note

This code is based on the MVC architecture and UIKit. It is missing some basic features like persistence, etc.

About

Text & link editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages