@tmdjr/ngx-editor-js2 20.1.0 → 20.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ DEMO: [https://ba5ik7.github.io/ngx-editorjs2](https://ba5ik7.github.io/ngx-edit
|
|
|
6
6
|
Ngx-EditorJs2 is an Angular-based, highly extensible block-style editor inspired by Editor.js. It allows users to create and manage rich text content using a variety of customizable blocks while leveraging Angular's reactive capabilities.
|
|
7
7
|
|
|
8
8
|
### Supports
|
|
9
|
-
- Angular
|
|
9
|
+
- Angular 20+
|
|
10
10
|
- For legacy Angular support, use [ngx-editorjs](https://github.com/Ba5ik7/ngx-editorjs)
|
|
11
11
|
|
|
12
12
|
## Features
|
|
@@ -23,6 +23,17 @@ To install Ngx-EditorJs2, run:
|
|
|
23
23
|
npm install @tmdjr/ngx-editor-js2
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
### Adding via Angular CLI (Recommended)
|
|
27
|
+
|
|
28
|
+
To quickly set up Ngx-EditorJs2 with optional blocks, use Angular's `ng add` command:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
ng add @tmdjr/ngx-editor-js2
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This command will prompt you to select optional blocks and will handle the installation, configuration updates to `angular.json`, global styles, and your application's configuration (`app.config.ts`).
|
|
35
|
+
|
|
36
|
+
|
|
26
37
|
## Usage
|
|
27
38
|
Import the Component into your Angular Standalone Component:
|
|
28
39
|
|
|
@@ -43,34 +54,6 @@ import { NgxEditorJs2Component } from '@tmdjr/ngx-editor-js2';
|
|
|
43
54
|
```
|
|
44
55
|
- Implementation found in the [Demo Src](https://github.com/Ba5ik7/ngx-editor-js2-blocks/blob/main/projects/demo/src/app/app.component.ts)
|
|
45
56
|
|
|
46
|
-
Css is required for the editor to function properly. Add the following to your global styles:
|
|
47
|
-
|
|
48
|
-
```css
|
|
49
|
-
// ! I Need to fix this!!
|
|
50
|
-
// The consumer should not have to incude this in their styles.scss
|
|
51
|
-
.cdk-drag-preview {
|
|
52
|
-
color: var(--mat-sys-on-secondary-container);
|
|
53
|
-
background-color: var(--mat-sys-secondary-container);
|
|
54
|
-
border-radius: 8px;
|
|
55
|
-
box-sizing: border-box;
|
|
56
|
-
overflow: visible;
|
|
57
|
-
box-shadow: var(--mat-sys-level4);
|
|
58
|
-
|
|
59
|
-
& *:not(toolbar) {
|
|
60
|
-
padding: 0 !important;
|
|
61
|
-
margin: 0 !important;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.cdk-drag-placeholder {
|
|
66
|
-
opacity: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.cdk-drag-animating {
|
|
70
|
-
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
57
|
|
|
75
58
|
## API
|
|
76
59
|
### **Inputs**
|
|
@@ -155,7 +138,43 @@ Embed syntax-highlighted code snippets using CodeMirror.
|
|
|
155
138
|
|
|
156
139
|
---
|
|
157
140
|
|
|
158
|
-
|
|
141
|
+
### 🌐 MFE Loader Block
|
|
142
|
+
Dynamically load and embed micro-frontends using Module Federation.
|
|
143
|
+
|
|
144
|
+
- **Component:** `NgxEditorJs2MfeLoaderComponent`
|
|
145
|
+
- **Install:**
|
|
146
|
+
```sh
|
|
147
|
+
npm install @tmdjr/ngx-editor-js2-mfe-loader
|
|
148
|
+
```
|
|
149
|
+
- **Package:** [@tmdjr/ngx-editor-js2-mfe-loader](https://www.npmjs.com/package/@tmdjr/ngx-editor-js2-mfe-loader)
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### 🧩 MermaidJS Block
|
|
154
|
+
Embed interactive Mermaid diagrams for flowcharts, graphs, and more.
|
|
155
|
+
|
|
156
|
+
- **Component:** `NgxEditorJs2MermaidjsComponent`
|
|
157
|
+
- **Install:**
|
|
158
|
+
```sh
|
|
159
|
+
npm install @tmdjr/ngx-editor-js2-mermaidjs
|
|
160
|
+
```
|
|
161
|
+
- **Package:** [@tmdjr/ngx-editor-js2-mermaidjs](https://www.npmjs.com/package/@tmdjr/ngx-editor-js2-mermaidjs)
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### 🧐 Pop Quiz Block
|
|
166
|
+
Create engaging quizzes within your content for interactive learning.
|
|
167
|
+
|
|
168
|
+
- **Component:** `NgxEditorJs2PopQuizComponent`
|
|
169
|
+
- **Install:**
|
|
170
|
+
```sh
|
|
171
|
+
npm install @tmdjr/ngx-editor-js2-pop-quiz
|
|
172
|
+
```
|
|
173
|
+
- **Package:** [@tmdjr/ngx-editor-js2-pop-quiz](https://www.npmjs.com/package/@tmdjr/ngx-editor-js2-pop-quiz)
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
For more details and documentation, visit the [official repository](https://github.com/Ba5ik7/ngx-editor-js2-blocks).
|
|
159
178
|
|
|
160
179
|
|
|
161
180
|
|