A Chrome extension that adds keyboard shortcuts for formatting text in LinkedIn's input fields. Format your posts, comments, and messages with bold and italic styles using Unicode characters.
- Listens for keyboard events (Ctrl+B, Ctrl+I) on LinkedIn's text input fields
- Intercepts these events to prevent default browser behavior
- Handles both text selection and direct typing scenarios
- Selection Mode: Transforms only highlighted text while preserving existing styles
- Typing Mode: Automatically formats new characters as you type
- Uses Unicode character mappings instead of HTML tags for compatibility
- Maintains separate mapping tables for:
- Bold characters
- Italic characters
- Combined bold+italic characters
- Includes reverse mappings to detect and preserve existing styles
- Toggle individual styles (bold/italic) independently
- Preserve other styles when toggling one style
- Support for both uppercase and lowercase characters
- Handle edge cases like removing one style from multi-styled text
- Modular helper functions for:
- Character state management
- Style detection and application
- Text selection and insertion
- Designed for extensibility to support additional styles
-
Clone this repository:
git clone https://github.com/ThomasEnoch/LinkedInRicherTextChromeExtension.git
-
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Load the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked" and select the
dist
directory
- Open Chrome and navigate to
-
Selection-Based Formatting:
- Select text in any LinkedIn input field
- Press
Ctrl+B
for bold orCtrl+I
for italic - Press again to remove that style
-
Mode-Based Formatting:
- Place cursor in a LinkedIn input field
- Press
Ctrl+B
orCtrl+I
without selecting text - Type to insert formatted text
- Press the same shortcut to exit formatting mode
-
Clone and install dependencies:
git clone https://github.com/ThomasEnoch/LinkedInRicherTextChromeExtension.git cd linkedin-text-formatter npm install
-
Make changes to the source code in the
src
directory -
Build the extension:
npm run build
-
Reload the extension in Chrome to see your changes
- Fork the repository
- Create a feature branch:
git checkout -b feature/YourFeature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/YourFeature
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.