addJS {textAnnotatoR} | R Documentation |
JavaScript code for handling text selection and UI interactions
Description
This internal JavaScript code provides functionality for text selection, popup menus, and interactive UI elements in the text annotation interface. It manages mouse events for text selection, highlighting, and code application.
Format
A character string containing JavaScript code
Details
The JavaScript code implements the following functionality:
Creation and management of popup menus for code operations
Text selection handling with mouse events
Highlighting of selected text
Communication with Shiny server through custom message handlers
Event handling for code replacement, renaming, and deletion
Event Handlers
Text selection events (mousedown, mousemove, mouseup)
Popup menu events for code operations
Custom Shiny message handlers for selection state
Note
This is an internal function used by the textAnnotatoR package and should not be called directly by users.