*Caveat: This comment's solution is theoretical and a starting point.* I ran into this issue and contacted a coworker ([:gregtatum](https://bugzilla.mozilla.org/user_profile?login=gtatum%40mozilla.com)) about how this feature works on OSX. Sharing some of our conversation here, along with links to how Chrome implemented it. First - here's the overall [concept and process](https://developer.apple.com/library/archive/documentation/TextFonts/Conceptual/CocoaTextArchitecture/TextEditing/TextEditing.html) from Apple. How Chrome implements it: - The main implementation is here: [content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm](https://source.chromium.org/chromium/chromium/src/+/main:content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm;l=293-308?q=automaticTextReplacement). - They set the menu item(s) here: [chrome/browser/ui/cocoa/main_menu_builder.mm](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/cocoa/main_menu_builder.mm;l=212-221?q=automaticTextReplacement) - See [all references](https://source.chromium.org/search?q=automaticTextReplacement) to `automaticTextReplacement` Caveats/notes: - Firefox uses its own spell checking and dictionary system (as opposed to Apple's [`nsspellchecker`](https://developer.apple.com/documentation/appkit/nsspellchecker) and you'd probably have to build on top of, and select the OS-dictionaries. - This feature includes other text replacement features (Smart dash/quote replacement, etc) that would have to be implemented along side it. Again, this isn't a step-by-step guide on how to do it, but some (hopefully) helpful context for future travelers.
Bug 1607115 Comment 9 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
*Caveat: This comment's solution is theoretical and a starting point.* I ran into this issue and contacted a coworker ([:gregtatum](https://bugzilla.mozilla.org/user_profile?login=gtatum%40mozilla.com)) about how this feature works on OSX. Sharing some of our conversation here, along with links to how Chrome implemented it. First - here's the overall [concept and process](https://developer.apple.com/library/archive/documentation/TextFonts/Conceptual/CocoaTextArchitecture/TextEditing/TextEditing.html) from Apple. How Chrome implements it: - The main implementation is here: [content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm](https://source.chromium.org/chromium/chromium/src/+/main:content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm;l=293-308?q=automaticTextReplacement). - They set the menu item(s) here: [chrome/browser/ui/cocoa/main_menu_builder.mm](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/cocoa/main_menu_builder.mm;l=212-221?q=automaticTextReplacement) - See [all references](https://source.chromium.org/search?q=automaticTextReplacement) to `automaticTextReplacement` Caveats/notes: - Firefox uses its own spell checking and dictionary system (as opposed to Apple's [`nsspellchecker`](https://developer.apple.com/documentation/appkit/nsspellchecker)) and you'd probably have to build on top of, and select the OS-dictionaries. - This feature includes other text replacement features (Smart dash/quote replacement, etc) that would have to be implemented along side it. Again, this isn't a step-by-step guide on how to do it, but some (hopefully) helpful context for future travelers.