santrix
v1.1.0
Published
Web based JavaScript HTML WYSIWYG editor control.
Maintainers
Readme
SanTrix Editor
A powerful, professional-grade MIT-licensed rich text editor for the modern web.
Installation
npm install santrixUsage
CDN (Copy & Paste Ready)
Create an index.html file and paste this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SanTrix Editor</title>
<script src="https://unpkg.com/santrix/santrix.min.js"></script>
</head>
<body>
<textarea id="editor">Hello World! Start typing here...</textarea>
<script>
santrix.init({
selector: "#editor",
height: 400,
plugins: "lists link image table code",
toolbar: "undo redo | bold italic underline | bullist numlist | link image table | code"
});
</script>
</body>
</html>Open the file in your browser and you're ready to go!
ES Modules (For Modern Projects)
import santrix from "santrix";
santrix.init({
selector: "#editor",
height: 500,
plugins: "lists link image table code codesample",
toolbar: "undo redo | bold italic | bullist numlist | link image table | code",
menubar: true
});Available Plugins
| Category | Plugins |
|----------|---------|
| Content | lists, link, image, media, table, codesample, emoticons |
| Editing | searchreplace, wordcount, code, fullscreen, preview |
| Formatting | visualblocks, visualchars, charmap, insertdatetime |
Configuration Options
santrix.init({
selector: "#editor", // Target element
height: 500, // Editor height in pixels
width: "100%", // Editor width
plugins: "lists link", // Space-separated plugins
toolbar: "bold italic", // Toolbar buttons
menubar: true, // Show/hide menubar
skin: "oxide", // UI skin (oxide, oxide-dark)
content_css: "default" // Content styling
});License
SanTrix is a fork of TinyMCE 6 (MIT). See LICENSE.TXT for details.
