![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
tiny-editor
Advanced tools
A tiny HTML rich text editor written in vanilla JavaScript
Create a less than 5 Kb (compressed) library that enables a HTML element to be used as a rich text editor in plain old vanilla JavaScript.
npm install tiny-editor
or load the bundle file directly at the end of your HTML document.
<script src="https://unpkg.com/tiny-editor/dist/bundle.js"></script>
<head>
to load the Font Awesome icon set<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
data-tiny-editor
attribute to the HTML element you want to transform into an editorListen for the input
event on the editor HTML element.
document
.querySelectorAll('[data-tiny-editor]')
.forEach(editor =>
editor.addEventListener('input', e => console.log(e.target.innerHTML)
)
);
There are various options that can be used to customize how the Tiny Editor will be rendered. By default, every options are enabled. You can disable an option using data attributes.
For example, you can remove the bold format button using the following attribte:
<div data-tiny-editor data-bold="no"></div>
```
### Options
- `data-formatblock="no"`: remove the styles drop down list
- `data-bold="no"`: remove the bold button
- `data-italic="no"`: : remove the italic button
- `data-underline="no"`: remove the underline button
- `data-fontname="no"`: remove the font drop down list
- `data-forecolor="no"`: : remove the text color button
- `data-justifyleft="no"`: remove the left align button
- `data-justifycenter="no"`: remove the center align button
- `data-justifyright="no"`: remove the right align button
- `data-insertorderedlist="no"`: remove the numbered list button
- `data-insertunorderedlist="no"`: remove the bulleted list button
- `data-outdent="no"`: remove the decrease indent button
- `data-indent="no"`: remove the increase indent button
- `data-remove-format="no"`: remove the clear formatting button
## Supported browsers
Modern browser (Chrome, Firefox, Edge,...) are supported. Tiny Editor doesn't work on Internet Explorer.
FAQs
A tiny HTML rich text editor written in vanilla JavaScript
The npm package tiny-editor receives a total of 298 weekly downloads. As such, tiny-editor popularity was classified as not popular.
We found that tiny-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.