@taufik-nurrohman/text-editor

A text selection range API written in pure JavaScript, for modern browsers.

Usage no npm install needed!

<script type="module">
  import taufikNurrohmanTextEditor from 'https://cdn.skypack.dev/@taufik-nurrohman/text-editor';
</script>

README

Text Editor

Text Editor

A text selection range API written in pure JavaScript, for modern browsers.

Demo

Auto-close brackets and quotes

Know how to stop the auto-close

Smart indentation in selection

Smart word selection

Demo and Documentation

Contribute

  • Please do not make pull requests by editing the files that are in the root of the project. They are generated automatically by the build tool.
  • Install Git and Node.js
  • Run git clone https://github.com/taufik-nurrohman/text-editor.git
  • Run cd text-editor && npm install --save-dev
  • Edit the files in the .github/source folder.
  • Run npm run pack to generate the production ready files.

Credits


Release Notes

3.3.8

  • Added example of paste as plain text functionality.
  • Maintenance.

3.3.4

  • Moved extensions to external repositories.
  • Removed regular expression features in editor.peel() and editor.pull() method for consistency.

3.2.6

  • Added example of search/replace functionality.
  • Maintenance.

3.2.1

  • Restructured the test files.

3.2.0

  • Prioritized maintainability over file size. Say hello to Node.js and ES6! :wave:
  • Output file for the browser is now using the Universal Module Definition format.

3.1.10

  • Updated all extensions.

3.1.9

  • Removed TE._ method.

3.1.8

  • Added ability to clear the hook storage object if it’s empty.
  • Added ability to collapse brackets for text-editor/source.js extension.
  • Added ability to set custom indent and outdent handler for text-editor/source.js extension.
  • Fixed common issue with ES6 module which does not reference the this scope to window object by default.
  • Updated donation target.

3.1.7

  • Added TE.state property to set initial state globally.

3.1.6

  • Removed TE.each() method.
  • Renamed TE.__instance__ to TE.instances.

3.1.5

  • Refactor.

2.8.5

  • None.