{"id":21493553,"url":"https://github.com/alienkevin/smarttextarea","last_synced_at":"2025-10-15T23:31:57.197Z","repository":{"id":34303791,"uuid":"174899474","full_name":"AlienKevin/SmartTextarea","owner":"AlienKevin","description":"A simplistic textarea in browser that supports undo, redo, find, and replace","archived":false,"fork":false,"pushed_at":"2023-01-07T03:52:07.000Z","size":15122,"stargazers_count":5,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-17T00:31:29.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlienKevin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-11T00:41:35.000Z","updated_at":"2022-04-05T10:59:55.000Z","dependencies_parsed_at":"2023-01-15T06:15:19.840Z","dependency_job_id":null,"html_url":"https://github.com/AlienKevin/SmartTextarea","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienKevin%2FSmartTextarea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienKevin%2FSmartTextarea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienKevin%2FSmartTextarea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlienKevin%2FSmartTextarea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlienKevin","download_url":"https://codeload.github.com/AlienKevin/SmartTextarea/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226064546,"owners_count":17568034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T15:43:25.463Z","updated_at":"2025-10-15T23:31:52.150Z","avatar_url":"https://github.com/AlienKevin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmartTextarea\nA simplistic textarea in browser that supports undo, redo, find, and replace.\n\n## Features\n### Find and Replace\n1. Find previous occurence\n2. Find next occurence\n3. Find and replace\n4. Replace all\n\nTo **activate** the Find and Replace panel, press \u003ckbd\u003eCtrl+F\u003c/kbd\u003e. \n\nTo find the **next occurence**, click on the 🡲 (right arrow icon) or press \u003ckbd\u003eEnter\u003c/kbd\u003e. To find the **previous occurence**, click on the 🡰 (left arrow icon).\n\nTo **find and replace next occurence**, click on the \u003cimg src=\"https://raw.github.com/AlienKevin/SmartTextarea/master/icons/findAndReplace.svg?sanitize=true\" width=\"14px\"\u003e\u003c/img\u003e icon. To **replace all occurences**, click on the \u003cimg src=\"https://raw.github.com/AlienKevin/SmartTextarea/master/icons/replaceAll.svg?sanitize=true\" width=\"14px\"\u003e\u003c/img\u003e\n\nTo toggle **match case** when searching, click on the \u003cimg src=\"https://raw.github.com/AlienKevin/SmartTextarea/master/icons/caseSensitivity.svg?sanitize=true\" width=\"14px\"\u003e\u003c/img\u003e icon. To toggle **regular expression** when searching, click on the \u003cimg src=\"https://raw.github.com/AlienKevin/SmartTextarea/master/icons/useRegex.svg?sanitize=true\" width=\"14px\"\u003e\u003c/img\u003e icon. To toggle **match whole word** when searching, click on the \u003cimg src=\"https://raw.github.com/AlienKevin/SmartTextarea/master/icons/wholeWord.svg?sanitize=true\" width=\"14px\"\u003e\u003c/img\u003e icon.\n\n### Undo and Redo\n1. Press \u003ckbd\u003eCtrl+Z\u003c/kbd\u003e to undo\n2. Press \u003ckbd\u003eCtrl+Y\u003c/kbd\u003e to redo\n\nDefault to save 100 versions in undo/redo history. (you can pass in custom values). Undo/redos are all in whole words as in many other word processors like Microsoft Word.\n\n## Installation\n\n### NPM\n`npm install smart-textarea`\n\n### CDN\nAdd the below imports in your html\n1. jsDelivr\n```\n\u003chtml\u003e\n\u003chead\u003e\n...\n\u003clink href=\"https://cdn.jsdelivr.net/npm/smart-textarea@latest/dist/main.css\" rel=\"stylesheet\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n...\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/smart-textarea@latest/dist/bundle.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    // Convert textareas to smartTextareas here\n    // See the Usage example below\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n2. Unpkg:\n```\n\u003chtml\u003e\n\u003chead\u003e\n...\n\u003clink href=\"https://unpkg.com/smart-textarea@latest/dist/main.css\" rel=\"stylesheet\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n...\n\u003cscript src=\"https://unpkg.com/smart-textarea@latest/dist/bundle.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    // Convert textareas to smartTextareas here\n    // See the Usage example below\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Usage\nThe simplest way is to import the compressed and bundled JS and CSS files directly in your HTML file.\n\n```\n\u003chtml lang=\"en\"\u003e\n\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003cmeta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\"\u003e\n    \u003ctitle\u003e\n        Smart Textarea Test\n    \u003c/title\u003e\n\n    \u003c!--Load stylesheet for the find \u0026 replace box and context menu--\u003e\n    \u003clink rel=\"stylesheet\" href=\"node_modules/smart-textarea/dist/main.css\"\u003e\n\n\u003cbody\u003e\n    \u003ctextarea id=\"textarea1\"\u003e\n        Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n    \u003c/textarea\u003e\n\n    \u003c!--You can have more than one smartTextarea. They will all function independently--\u003e\n    \u003ctextarea id=\"textarea2\"\u003e\n        Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n    \u003c/textarea\u003e\n\n    \u003c!--Load script file for smartTextarea--\u003e\n    \u003cscript src=\"node_modules/smart-textarea/dist/bundle.js\"\u003e\u003c/script\u003e\n\n    \u003c!--Convert a normal textarea to a smartTextarea--\u003e\n    \u003cscript\u003e\n        const smartTextarea1 = new SmartTextarea(document.getElementById(\"textarea1\"));\n        const smartTextarea2 = new SmartTextarea(document.getElementById(\"textarea2\"));\n    \u003c/script\u003e\n\u003c/html\u003e\n```\n\n## Update\nBecause of the usual 24-hour cache by CDN providers, you should replace the @latest tag with @(the latest version number) for immediate update to the latest version. It's always the safest to use the current stable version @1.0.9.\n\n## Credits\nThis project's Find and Replace functionality is based on Jens Fischer's StackOverflow answer on [\"Find and Replace for an Textarea\"](https://stackoverflow.com/questions/7781099/find-and-replace-for-an-textarea/7781395#7781395).\nThe Find \u0026 Replace, Replace All, and Case Sensitive icons are based on [Visual Studio Code](https://github.com/Microsoft/vscode)'s icons. The design of the find and replace panel is heavily based VS Code's.\n\n## License\nThis project is licensed under the terms of the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falienkevin%2Fsmarttextarea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falienkevin%2Fsmarttextarea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falienkevin%2Fsmarttextarea/lists"}