@tmdjr/ngx-editor-js2 20.0.14 β 20.1.0
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/package.json
CHANGED
|
@@ -4,78 +4,188 @@ import { BehaviorSubject, lastValueFrom, Observable, tap } from 'rxjs';
|
|
|
4
4
|
|
|
5
5
|
export const TEST_DATA: NgxEditorJsBlock[] = [
|
|
6
6
|
{
|
|
7
|
-
blockId: '
|
|
7
|
+
blockId: 'iovlbzgosf',
|
|
8
8
|
sortIndex: 0,
|
|
9
|
-
componentInstanceName: '
|
|
10
|
-
savedAction: '
|
|
11
|
-
dataClean:
|
|
12
|
-
'`Design is not just what it looks like and feels like. Design is how it works.',
|
|
9
|
+
componentInstanceName: 'HeaderBlockComponent',
|
|
10
|
+
savedAction: 'h1',
|
|
11
|
+
dataClean: 'π Ready to Explore?',
|
|
13
12
|
},
|
|
14
13
|
{
|
|
15
|
-
blockId: '
|
|
14
|
+
blockId: '6ldk3i',
|
|
16
15
|
sortIndex: 1,
|
|
17
|
-
componentInstanceName: '
|
|
18
|
-
savedAction: '
|
|
16
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
17
|
+
savedAction: 'large',
|
|
19
18
|
dataClean:
|
|
20
|
-
'
|
|
19
|
+
'This demo showcases the core concept of Ngx-EditorJs2 β a flexible, block-based content editor built with Angular. Each section of content is a self-contained block that can be rearranged via drag and drop, making it easy to structure and reorganize complex content visually.<div><br></div><div>Blocks arenβt just static β they can be configured through block-specific settings. For example, the Header block allows you to choose between multiple heading levels (H1βH6), and the Image block supports captions and alignment settings.</div><div><br></div><div>In addition, when selecting text within blocks that support inline formatting, a contextual inline toolbar appears. This toolbar enables quick formatting actions such as <b>bold</b>, <i>italic</i>, and text alignment (left, center, right) β allowing for a more expressive and intuitive editing experience.</div><div><br></div><div>Use this page to explore how each block behaves, how they can be customized, and how the editor adapts to your content needs in a modular and scalable way.</div>',
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
|
-
blockId: '
|
|
22
|
+
blockId: 'pkm1k',
|
|
24
23
|
sortIndex: 2,
|
|
25
24
|
componentInstanceName: 'HeaderBlockComponent',
|
|
26
|
-
savedAction: '
|
|
27
|
-
dataClean: '
|
|
25
|
+
savedAction: 'h3',
|
|
26
|
+
dataClean: 'βοΈ Paragraph + Header',
|
|
28
27
|
},
|
|
29
28
|
{
|
|
30
|
-
blockId: '
|
|
29
|
+
blockId: 'wpg67v',
|
|
31
30
|
sortIndex: 3,
|
|
32
31
|
componentInstanceName: 'ParagraphBlockComponent',
|
|
33
32
|
savedAction: 'large',
|
|
34
33
|
dataClean:
|
|
35
|
-
'
|
|
34
|
+
'The bread and butter of any editor. Use paragraphs for flowing content, and headers to create structure and hierarchy. <b>Clear</b>. <i>Clean</i>. <u>Essential</u>.',
|
|
36
35
|
},
|
|
37
36
|
{
|
|
38
|
-
blockId: '
|
|
37
|
+
blockId: '8u3uiij5vyj',
|
|
39
38
|
sortIndex: 4,
|
|
40
39
|
componentInstanceName: 'ParagraphBlockComponent',
|
|
41
40
|
savedAction: 'large',
|
|
42
41
|
dataClean:
|
|
43
|
-
'
|
|
42
|
+
'<ul><li><a href="https://www.typescriptlang.org/">TypeScript</a> and HTML5 programming</li><li>Angular app-design fundamentals, as described in <a href="https://angular.io/guide/architecture">Angular Concepts</a><br></li><li>The basics of <a href="https://angular.io/guide/architecture-components#template-syntax">Angular template syntax</a><br></li></ul>',
|
|
44
43
|
},
|
|
45
44
|
{
|
|
46
|
-
blockId: '
|
|
45
|
+
blockId: '2rdtwb',
|
|
47
46
|
sortIndex: 5,
|
|
48
|
-
componentInstanceName: '
|
|
49
|
-
savedAction: '
|
|
50
|
-
dataClean:
|
|
51
|
-
'flowchart TD\n A[Christmas] -->|Get money| B(Go shopping)\n B --> C{Let me think}\n C -->|One| D[Laptop]\n C -->|Two| E[Hello World iPhone]\n C -->|Three| F[fa:fa-car Car]',
|
|
47
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
48
|
+
savedAction: 'medium',
|
|
49
|
+
dataClean: '',
|
|
52
50
|
},
|
|
53
51
|
{
|
|
54
|
-
blockId: '
|
|
52
|
+
blockId: '8w37us',
|
|
55
53
|
sortIndex: 6,
|
|
54
|
+
componentInstanceName: 'HeaderBlockComponent',
|
|
55
|
+
savedAction: 'h3',
|
|
56
|
+
dataClean: 'π‘ Quote',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
blockId: '31tbry',
|
|
60
|
+
sortIndex: 7,
|
|
56
61
|
componentInstanceName: 'ParagraphBlockComponent',
|
|
57
|
-
savedAction: '
|
|
62
|
+
savedAction: 'large',
|
|
58
63
|
dataClean:
|
|
59
|
-
'
|
|
64
|
+
'Craft your favorite inspiration, callouts, or even markdown-style blockquotes using the Quote block.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
blockId: 'n177d7',
|
|
68
|
+
sortIndex: 8,
|
|
69
|
+
componentInstanceName: 'NgxEditorJs2BlockquotesComponent',
|
|
70
|
+
savedAction: 'display-large',
|
|
71
|
+
dataClean:
|
|
72
|
+
'βA quote block is like a spotlight β simple, elegant, and perfect for making a point.β',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
blockId: 'dq5uat',
|
|
76
|
+
sortIndex: 9,
|
|
77
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
78
|
+
savedAction: 'medium',
|
|
79
|
+
dataClean: '',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
blockId: 'mq9i9m',
|
|
83
|
+
sortIndex: 10,
|
|
84
|
+
componentInstanceName: 'HeaderBlockComponent',
|
|
85
|
+
savedAction: 'h3',
|
|
86
|
+
dataClean: 'π· Image Block',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
blockId: '4xkw3s',
|
|
90
|
+
sortIndex: 11,
|
|
91
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
92
|
+
savedAction: 'large',
|
|
93
|
+
dataClean:
|
|
94
|
+
'A picture says a thousand words. The Image block supports captions and even alignment options to make your visuals shine.',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
blockId: 'n177dsd',
|
|
98
|
+
sortIndex: 12,
|
|
99
|
+
componentInstanceName: 'NgxEditorJs2ImageComponent',
|
|
100
|
+
savedAction: 'stretch',
|
|
101
|
+
dataClean:
|
|
102
|
+
'{"url":"https://res.cloudinary.com/dowdpiikk/image/upload/w_650,q_auto:best,f_auto/v1709445782/lnyst5aqppuin8wt73ci.webp","title":"test"}',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
blockId: 'gt9e9s',
|
|
106
|
+
sortIndex: 13,
|
|
107
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
108
|
+
savedAction: 'medium',
|
|
109
|
+
dataClean: '',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
blockId: 'b3t74',
|
|
113
|
+
sortIndex: 14,
|
|
114
|
+
componentInstanceName: 'HeaderBlockComponent',
|
|
115
|
+
savedAction: 'h3',
|
|
116
|
+
dataClean: 'π¨ CodeMirror Block',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
blockId: '9qls1d',
|
|
120
|
+
sortIndex: 15,
|
|
121
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
122
|
+
savedAction: 'large',
|
|
123
|
+
dataClean:
|
|
124
|
+
'Embed rich, theme-able code editors right inside your documents. Great for live code samples or collaborative coding.',
|
|
60
125
|
},
|
|
61
126
|
{
|
|
62
127
|
blockId: 'asdfasdf',
|
|
63
|
-
sortIndex:
|
|
128
|
+
sortIndex: 16,
|
|
64
129
|
componentInstanceName: 'NgxEditorJs2CodemirrorComponent',
|
|
65
130
|
savedAction: 'text/typescript',
|
|
66
131
|
dataClean:
|
|
67
132
|
"export class SimpleFormGroup {\n form = new FormGroup({\n first: new FormControl('Nancy', Validators.minLength(2)),\n last: new FormControl('Drew'),\n });\n\n get first(): any {\n return this.form.get('first');\n }\n\n onSubmit(): void {\n console.log(this.form.value); // {first: 'Nancy', last: 'Drew'}\n }\n\n setValue() {\n this.form.setValue({first: 'Carson', last: 'Drew'});\n }\n}",
|
|
68
133
|
},
|
|
69
134
|
{
|
|
70
|
-
blockId: '
|
|
71
|
-
sortIndex:
|
|
135
|
+
blockId: 'hduds',
|
|
136
|
+
sortIndex: 17,
|
|
137
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
138
|
+
savedAction: 'medium',
|
|
139
|
+
dataClean: '',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
blockId: '8npajb',
|
|
143
|
+
sortIndex: 18,
|
|
72
144
|
componentInstanceName: 'HeaderBlockComponent',
|
|
73
|
-
savedAction: '
|
|
74
|
-
dataClean: '
|
|
145
|
+
savedAction: 'h3',
|
|
146
|
+
dataClean: 'π₯ Mermaid.js Block',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
blockId: 'su45ai',
|
|
150
|
+
sortIndex: 19,
|
|
151
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
152
|
+
savedAction: 'large',
|
|
153
|
+
dataClean:
|
|
154
|
+
'Need to include a flowchart, sequence diagram, or Gantt chart? The Mermaid.js block brings technical diagrams to life using simple syntax.',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
blockId: 'uapf2',
|
|
158
|
+
sortIndex: 20,
|
|
159
|
+
componentInstanceName: 'NgxEditorJs2MermaidjsComponent',
|
|
160
|
+
savedAction: 'center',
|
|
161
|
+
dataClean:
|
|
162
|
+
'flowchart TD\n A[Christmas] -->|Get money| B(Go shopping)\n B --> C{Let me think}\n C -->|One| D[Laptop]\n C -->|Two| E[Hello World iPhone]\n C -->|Three| F[fa:fa-car Car]',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
blockId: 'y3r4xs',
|
|
166
|
+
sortIndex: 21,
|
|
167
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
168
|
+
savedAction: 'medium',
|
|
169
|
+
dataClean: '<div><br></div>',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
blockId: 'q5m0u',
|
|
173
|
+
sortIndex: 22,
|
|
174
|
+
componentInstanceName: 'HeaderBlockComponent',
|
|
175
|
+
savedAction: 'h3',
|
|
176
|
+
dataClean: 'π§ Pop Quiz Block',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
blockId: 'ubo23s',
|
|
180
|
+
sortIndex: 23,
|
|
181
|
+
componentInstanceName: 'ParagraphBlockComponent',
|
|
182
|
+
savedAction: 'large',
|
|
183
|
+
dataClean:
|
|
184
|
+
'Test your knowledge or embed interactive quiz questions inline with your content. Great for workshops, tutorials, or even just friendly challenges.',
|
|
75
185
|
},
|
|
76
186
|
{
|
|
77
187
|
blockId: '9bqhk',
|
|
78
|
-
sortIndex:
|
|
188
|
+
sortIndex: 24,
|
|
79
189
|
componentInstanceName: 'NgxEditorJs2PopQuizComponent',
|
|
80
190
|
savedAction: 'display-large',
|
|
81
191
|
dataClean:
|