@lowdefy/blocks-markdown 5.5.1 → 6.0.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.
@@ -0,0 +1,313 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ - title: Headings
16
+ fullWidth: true
17
+ blocks:
18
+ - id: headings_all
19
+ type: Markdown
20
+ properties:
21
+ content: |
22
+ # Heading 1
23
+ ## Heading 2
24
+ ### Heading 3
25
+ #### Heading 4
26
+ ##### Heading 5
27
+ ###### Heading 6
28
+
29
+ - title: Bold, Italic and Strikethrough
30
+ fullWidth: true
31
+ blocks:
32
+ - id: format_bold
33
+ type: Markdown
34
+ properties:
35
+ content: |
36
+ **This entire line is bold text.**
37
+
38
+ Use double asterisks for **bold words** in a sentence.
39
+ - id: format_italic
40
+ type: Markdown
41
+ properties:
42
+ content: |
43
+ *This entire line is italic text.*
44
+
45
+ Use single asterisks for *italic words* in a sentence.
46
+ - id: format_strikethrough
47
+ type: Markdown
48
+ properties:
49
+ content: |
50
+ ~~This text has been removed.~~
51
+
52
+ The old price was ~~$99.99~~ and the new price is **$49.99**.
53
+ - id: format_combined
54
+ type: Markdown
55
+ properties:
56
+ content: |
57
+ Combine formatting: ***bold and italic***, **bold with ~~strikethrough~~**, and *italic with ~~strikethrough~~*.
58
+
59
+ You can also nest them: **This is bold, and *this part is bold italic*.**
60
+
61
+ - title: Unordered Lists
62
+ fullWidth: true
63
+ blocks:
64
+ - id: list_unordered_simple
65
+ type: Markdown
66
+ properties:
67
+ content: |
68
+ - Apples
69
+ - Bananas
70
+ - Cherries
71
+ - Dates
72
+ - id: list_unordered_nested
73
+ type: Markdown
74
+ properties:
75
+ content: |
76
+ - Fruits
77
+ - Apples
78
+ - Bananas
79
+ - Cavendish
80
+ - Plantain
81
+ - Cherries
82
+ - Vegetables
83
+ - Carrots
84
+ - Peas
85
+
86
+ - title: Ordered Lists
87
+ fullWidth: true
88
+ blocks:
89
+ - id: list_ordered_simple
90
+ type: Markdown
91
+ properties:
92
+ content: |
93
+ 1. First step
94
+ 2. Second step
95
+ 3. Third step
96
+ 4. Fourth step
97
+ - id: list_ordered_nested
98
+ type: Markdown
99
+ properties:
100
+ content: |
101
+ 1. Plan the project
102
+ 1. Define requirements
103
+ 2. Create timeline
104
+ 2. Build the app
105
+ 1. Set up environment
106
+ 2. Write configuration
107
+ 3. Test locally
108
+ 3. Deploy to production
109
+
110
+ - title: Task Lists
111
+ fullWidth: true
112
+ blocks:
113
+ - id: task_list
114
+ type: Markdown
115
+ properties:
116
+ content: |
117
+ **Project Checklist:**
118
+
119
+ - [x] Set up repository
120
+ - [x] Install dependencies
121
+ - [x] Create lowdefy.yaml
122
+ - [ ] Add authentication
123
+ - [ ] Configure database
124
+ - [ ] Deploy to production
125
+
126
+ - title: Inline Links
127
+ fullWidth: true
128
+ blocks:
129
+ - id: links_inline
130
+ type: Markdown
131
+ properties:
132
+ content: |
133
+ Visit [Lowdefy](https://lowdefy.com) for more information.
134
+
135
+ Check the [documentation](https://docs.lowdefy.com "Lowdefy Docs") with a tooltip title.
136
+
137
+ Auto-linked URL: https://lowdefy.com
138
+ - id: links_reference
139
+ type: Markdown
140
+ properties:
141
+ content: |
142
+ Reference-style links are useful for readability:
143
+
144
+ [Lowdefy][1] is a config-driven framework. Read the [docs][docs-link] to get started. See the [GitHub repo][2] for source code.
145
+
146
+ [1]: https://lowdefy.com
147
+ [docs-link]: https://docs.lowdefy.com
148
+ [2]: https://github.com/lowdefy/lowdefy
149
+
150
+ - title: Images
151
+ fullWidth: true
152
+ blocks:
153
+ - id: image_basic
154
+ type: Markdown
155
+ properties:
156
+ content: |
157
+ An inline image:
158
+
159
+ ![Lowdefy Logo](/logo_example.png "Lowdefy Logo")
160
+
161
+ Images can also use reference-style links:
162
+
163
+ ![Alt text][logo]
164
+
165
+ [logo]: /logo_example.png
166
+
167
+ - title: Blockquotes
168
+ fullWidth: true
169
+ blocks:
170
+ - id: quote_simple
171
+ type: Markdown
172
+ properties:
173
+ content: |
174
+ > Configuration is the new code. Define your entire application with simple, readable YAML.
175
+ - id: quote_with_formatting
176
+ type: Markdown
177
+ properties:
178
+ content: |
179
+ > **Important:** Blockquotes can contain other formatting.
180
+ >
181
+ > - Bullet points work inside quotes
182
+ > - So does **bold** and *italic* text
183
+ >
184
+ > They can span multiple paragraphs.
185
+ - id: quote_nested
186
+ type: Markdown
187
+ properties:
188
+ content: |
189
+ > This is a top-level quote.
190
+ >
191
+ > > This is a nested quote inside the first one.
192
+ > >
193
+ > > > And this is nested even deeper.
194
+
195
+ - title: Horizontal Rules
196
+ fullWidth: true
197
+ blocks:
198
+ - id: hr_example
199
+ type: Markdown
200
+ properties:
201
+ content: |
202
+ Content above the first rule.
203
+
204
+ ---
205
+
206
+ Content between the rules. You can use three hyphens, asterisks, or underscores.
207
+
208
+ ***
209
+
210
+ Content after the second rule.
211
+
212
+ ___
213
+
214
+ Final content below.
215
+
216
+ - title: Tables
217
+ fullWidth: true
218
+ blocks:
219
+ - id: table_basic
220
+ type: Markdown
221
+ properties:
222
+ content: |
223
+ | Property | Type | Default | Description |
224
+ | --- | --- | --- | --- |
225
+ | content | string | - | Markdown content to render |
226
+ | skipHtml | boolean | false | Skip rendering HTML in markdown |
227
+ - id: table_aligned
228
+ type: Markdown
229
+ properties:
230
+ content: |
231
+ | Left Aligned | Center Aligned | Right Aligned |
232
+ | :--- | :---: | ---: |
233
+ | Row 1 Col 1 | Row 1 Col 2 | $10.00 |
234
+ | Row 2 Col 1 | Row 2 Col 2 | $25.50 |
235
+ | Row 3 Col 1 | Row 3 Col 2 | $99.99 |
236
+ | **Total** | | **$135.49** |
237
+
238
+ - title: Combined Content
239
+ fullWidth: true
240
+ blocks:
241
+ - id: combined_document
242
+ type: Markdown
243
+ properties:
244
+ content: |
245
+ ## Project Overview
246
+
247
+ This document demonstrates how multiple markdown elements combine into a cohesive document.
248
+
249
+ ### Features
250
+
251
+ The application supports the following capabilities:
252
+
253
+ | Feature | Status | Priority |
254
+ | --- | --- | --- |
255
+ | Authentication | Complete | High |
256
+ | Dashboard | In Progress | High |
257
+ | Reports | Planned | Medium |
258
+
259
+ ### Getting Started
260
+
261
+ 1. Clone the repository
262
+ 2. Install dependencies
263
+ 3. Configure your `lowdefy.yaml` file
264
+
265
+ > **Note:** Make sure you have Node.js 18 or later installed before starting.
266
+
267
+ For more details, visit the [documentation](https://docs.lowdefy.com).
268
+
269
+ ---
270
+
271
+ *Last updated: March 2026*
272
+
273
+ - title: skipHtml Property
274
+ fullWidth: true
275
+ blocks:
276
+ - id: skip_html_false
277
+ type: Markdown
278
+ properties:
279
+ content: |
280
+ **skipHtml: false (default)**
281
+
282
+ HTML tags like <b>bold</b> are escaped and shown as text: `<b>bold</b>`
283
+
284
+ The Markdown block escapes HTML by default for security.
285
+ - id: skip_html_true
286
+ type: Markdown
287
+ properties:
288
+ skipHtml: true
289
+ content: |
290
+ **skipHtml: true**
291
+
292
+ With skipHtml enabled, any HTML tags like <b>bold</b> or <div>divs</div> are completely removed from the output rather than being shown as escaped text.
293
+
294
+ - title: Style Override
295
+ fullWidth: true
296
+ blocks:
297
+ - id: style_element
298
+ type: Markdown
299
+ style:
300
+ .element:
301
+ backgroundColor: var(--ant-color-primary-bg)
302
+ padding: 16
303
+ borderRadius: 8
304
+ border: 1px solid var(--ant-color-primary-border)
305
+ properties:
306
+ content: |
307
+ ### Styled Container
308
+
309
+ The `element` style key applies CSS to the outer wrapper div. Use it to add background colors, padding, borders, and other container-level styles.
310
+
311
+ - Custom background color
312
+ - Rounded corners
313
+ - Border styling
@@ -0,0 +1,56 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ id: markdown
16
+ type: Box
17
+
18
+ blocks:
19
+ - id: markdown_basic
20
+ type: Markdown
21
+ properties:
22
+ content: Hello **world**
23
+
24
+ - id: markdown_heading
25
+ type: Markdown
26
+ properties:
27
+ content: '# Heading One'
28
+
29
+ - id: markdown_list
30
+ type: Markdown
31
+ properties:
32
+ content: |
33
+ - Item one
34
+ - Item two
35
+ - Item three
36
+
37
+ - id: markdown_link
38
+ type: Markdown
39
+ properties:
40
+ content: '[Lowdefy](https://lowdefy.com)'
41
+
42
+ - id: markdown_gfm_table
43
+ type: Markdown
44
+ properties:
45
+ content: |
46
+ | Col A | Col B |
47
+ | ----- | ----- |
48
+ | 1 | 2 |
49
+
50
+ - id: markdown_code
51
+ type: Markdown
52
+ properties:
53
+ content: 'Inline `code` here'
54
+
55
+ - id: markdown_empty
56
+ type: Markdown
@@ -0,0 +1,162 @@
1
+ # Copyright 2020-2026 Lowdefy, Inc
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ - id: default
16
+ type: Markdown
17
+ - id: properties.content
18
+ type: Box
19
+ properties:
20
+ content: |
21
+ # One Heading
22
+
23
+ A paragraph with *emphasis* and **strong importance**.
24
+
25
+ > A block quote with ~strikethrough~ and a URL: https://reactjs.org.
26
+
27
+ #### Link
28
+
29
+ [A link to Lowdefy](https://lowdefy.com)
30
+
31
+ # Two
32
+
33
+ * Lists
34
+ * [ ] todo
35
+ * [x] done
36
+
37
+ A table:
38
+
39
+ | a | b |
40
+ | - | - |
41
+
42
+ - id: properties.style and headings
43
+ type: Markdown
44
+ properties:
45
+ content: |
46
+ # One
47
+ ## Two
48
+ ### Three
49
+ #### Four
50
+ ##### Five
51
+ ###### Six
52
+ style:
53
+ border: '1px solid blue'
54
+ - id: properties.content = table
55
+ type: Markdown
56
+ properties:
57
+ content: |
58
+ ### Table
59
+
60
+ | A | B | C |
61
+ |---:|:---:|:---|
62
+ | one | two | three |
63
+ | 123 | 345 | 34892 |
64
+ | true | false | none |
65
+
66
+ - id: properties.skipHtml = false
67
+ type: Markdown
68
+ properties:
69
+ skipHtml: false
70
+ content: |
71
+ ### Link
72
+
73
+ <a href="https://lowdefy.com">Lowdefy link</a>
74
+
75
+ <font size="+10">Description</font>
76
+
77
+ ### Bad HTML
78
+
79
+ <div onmouseover="alert('alpha')">
80
+ <a href="javascript:alert('bravo')">delta</a>
81
+ <img src="x" onerror="alert('charlie')">
82
+ <iframe src="javascript:alert('delta')"></iframe>
83
+ <math>
84
+ <mi xlink:href="data:x,<script>alert('echo')</script>"></mi>
85
+ </math>
86
+ </div>
87
+ <script>
88
+ alert('script tag');
89
+ </script>
90
+
91
+ - id: properties.skipHtml = true
92
+ type: Markdown
93
+ properties:
94
+ skipHtml: true
95
+ content: |
96
+ ### Link
97
+
98
+ <a href="https://lowdefy.com">Lowdefy link</a>
99
+
100
+ <font size="+10">Description</font>
101
+
102
+ ### Bad HTML
103
+
104
+ <div onmouseover="alert('alpha')">
105
+ <a href="javascript:alert('bravo')">delta</a>
106
+ <img src="x" onerror="alert('charlie')">
107
+ <iframe src="javascript:alert('delta')"></iframe>
108
+ <math>
109
+ <mi xlink:href="data:x,<script>alert('echo')</script>"></mi>
110
+ </math>
111
+ </div>
112
+ <script>
113
+ alert('script tag');
114
+ </script>
115
+
116
+ - id: properties.content with code
117
+ type: Markdown
118
+ properties:
119
+ content: |
120
+ ### Code
121
+
122
+ Default
123
+ ```
124
+ <a href="">Default style</a>
125
+ ```
126
+
127
+ Html
128
+ ```html
129
+ <a href="">html style</a>
130
+ ```
131
+
132
+ Json
133
+ ```json
134
+ {
135
+ "obj": "one",
136
+ "list": [
137
+ 1,
138
+ 2
139
+ ]
140
+ }
141
+ ```
142
+
143
+ Bad HTML
144
+ ```html
145
+ <div onmouseover="alert('alpha')">
146
+ <a href="javascript:alert('bravo')">delta</a>
147
+ <img src="x" onerror="alert('charlie')">
148
+ <iframe src="javascript:alert('delta')"></iframe>
149
+ <math>
150
+ <mi xlink:href="data:x,<script>alert('echo')</script>"></mi>
151
+ </math>
152
+ </div>
153
+ <script>
154
+ alert('script tag');
155
+ </script>
156
+ ```
157
+ - id: properties.html-iframe
158
+ type: Markdown
159
+ properties:
160
+ content: |
161
+ No additional ADD_TAGS:
162
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/7N7GWdlQJlU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
@@ -19,7 +19,6 @@ import { theme as antdTheme } from 'antd';
19
19
  import ReactMarkdown from 'react-markdown';
20
20
  import gfm from 'remark-gfm';
21
21
  import markdownStyles from '../../style.module.css';
22
- import codeblockStyles from '../../codeblock.module.css';
23
22
  // See https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/393 for esm issue.
24
23
  import { github, a11yDark } from 'react-syntax-highlighter/dist/cjs/styles/hljs/index.js';
25
24
  import javascript from 'react-syntax-highlighter/dist/cjs/languages/hljs/javascript.js';