1.5.0 • Published 12 months ago
aditorx v1.5.0
AditorX
AditorX is a fast, flexible, and fully customizable rich text editor for modern web applications. It provides a smooth writing experience with built-in formatting tools, keyboard shortcuts, and an intuitive UI. Perfect for developers who need a lightweight but powerful editor.
🚀 Features
- Lightweight and fast
- Supports HTML and Markdown
- Keyboard shortcuts for quick editing
- Easy integration with React, Vue, Angular, jQuery, and vanilla JavaScript
- Nested elements and collapsible headings
- Smart checkbox completion
- Developer-friendly
🧐 Main Features
- Collapsible Headings: Headings can be minimized to keep notes structured.
- Nested Structure: Text, bullet points, and checkboxes can be nested within each other.
- Smart Checkboxes: If all nested checkboxes are completed, the parent checkbox will also be marked as done (works both ways – marking a parent checkbox as done completes all its children).
- Flexible Data Extraction: Easily extract and structure data the way you need it.
⌘️ Keyboard Shortcuts
/→ Opens the dropdown option menu#+spaceat the start → Creates a heading>+spaceat the start → Creates a text block*+spaceat the start → Creates a checkbox-+spaceat the start → Creates a bullet pointTab→ Creates a nested structure (works for text, bullet points, and checkboxes). Also used for expanding and collapsing elements.
🛆 Installation
Using npm
npm install aditorxUsing yarn
yarn add aditorxUsing a CDN
For quick testing, you can use a CDN:
<script src="https://unpkg.com/aditorx"></script>💻 Initialization Examples
Vanilla JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>AditorX Example</title>
</head>
<body>
<div id="editor-container"></div>
<script type="module">
import { initializeAditorX } from "aditorx";
const editor = document.getElementById("editor-container");
// Initialize with an empty editor
initializeAditorX(editor, "");
// OR Initialize with previously saved data
// let Saved_Data_With_AditorX = "..."; // Retrieved from storage
// initializeAditorX(editor, Saved_Data_With_AditorX);
</script>
</body>
</html>React
import { useEffect, useRef } from "react";
import { initializeAditorX } from "aditorx";
function Editor() {
const editorRef = useRef(null);
useEffect(() => {
if (editorRef.current) {
// Initialize with an empty editor
initializeAditorX(editorRef.current, "");
// OR Initialize with previously saved data
// let Saved_Data_With_AditorX = "..."; // Retrieved from storage
// initializeAditorX(editorRef.current, Saved_Data_With_AditorX);
}
}, []);
return <div ref={editorRef} className="editor-container"></div>;
}
export default Editor;Vue.js
<template>
<div ref="editor" class="editor-container"></div>
</template>
<script>
import { onMounted, ref } from "vue";
import { initializeAditorX } from "aditorx";
export default {
setup() {
const editor = ref(null);
onMounted(() => {
// Initialize with an empty editor
initializeAditorX(editor.value, "");
// OR Initialize with previously saved data
// let Saved_Data_With_AditorX = "..."; // Retrieved from storage
// initializeAditorX(editor.value, Saved_Data_With_AditorX);
});
return { editor };
},
};
</script>Angular
Template (HTML)
<div #editor class="editor-container"></div>Component (TypeScript)
import { Component, ElementRef, ViewChild, AfterViewInit } from "@angular/core";
import { initializeAditorX } from "aditorx";
@Component({
selector: "app-editor",
templateUrl: "./editor.component.html",
})
export class EditorComponent implements AfterViewInit {
@ViewChild("editor") editor!: ElementRef;
ngAfterViewInit() {
// Initialize with an empty editor
initializeAditorX(this.editor.nativeElement, "");
// OR Initialize with previously saved data
// let Saved_Data_With_AditorX = "..."; // Retrieved from storage
// initializeAditorX(this.editor.nativeElement, Saved_Data_With_AditorX);
}
}🎯 Browser Support
- Chrome
- Firefox
- Edge
- Safari
🛠️ Issues & Feedback
If you encounter any issues or have feature requests, please create an issue on GitHub.
🐟 License
MIT License © 2024 Imran Nafis
1.5.0
12 months ago
1.4.22
12 months ago
1.4.21
12 months ago
1.4.24
12 months ago
1.4.23
12 months ago
1.4.26
12 months ago
1.4.25
12 months ago
1.4.28
12 months ago
1.4.27
12 months ago
1.4.29
12 months ago
1.4.31
12 months ago
1.4.30
12 months ago
1.4.32
12 months ago
1.4.20
1 year ago
1.4.19
1 year ago
1.4.18
1 year ago
1.4.17
1 year ago
1.4.16
1 year ago
1.4.15
1 year ago
1.4.14
1 year ago
1.4.13
1 year ago
1.4.12
1 year ago
1.4.11
1 year ago
1.4.10
1 year ago
1.4.9
1 year ago
1.4.8
1 year ago