You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added `id` and `class` attributes to all components, to make it easier to style them with custom CSS and to reference them in intra-page links and custom javascript code.
Copy file name to clipboardExpand all lines: examples/official-site/sqlpage/migrations/01_documentation.sql
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -146,7 +146,7 @@ INSERT INTO example(component, description, properties) VALUES
146
146
('text', 'Rendering rich text using markdown', json('[{"component":"text", "contents_md":"\n'||
147
147
'# Markdown in SQLPage\n\n'||
148
148
'## Simple formatting\n\n'||
149
-
'SQLPage supports only plain text as column values, but markdown allows easily adding **bold**, *italics*, and [links](index.sql).\n\n'||
149
+
'SQLPage supports only plain text as column values, but markdown allows easily adding **bold**, *italics*, [external links](https://github.com/lovasoa/sqlpage), [links to other pages](/index.sql) and [intra-page links](#my-paragraph). \n\n'||
150
150
'## Lists\n'||
151
151
'### Unordered lists\n'||
152
152
'* SQLPage is easy\n'||
@@ -182,7 +182,16 @@ INSERT INTO example(component, description, properties) VALUES
182
182
'{"contents":" is a domain-specific language used in programming and designed for managing data held in a "},'||
'{"contents": ". It is particularly useful in handling structured data."}]')
185
-
);
185
+
),
186
+
(
187
+
'text',
188
+
'An intra-page link to a section of the page.',
189
+
json('[
190
+
{"component":"text", "contents_md":"This is a link to the [next paragraph](#my-paragraph). You can open this link in a new tab and the page will scroll to the paragraph on load."},
191
+
{"component":"text", "id": "my-paragraph", "contents_md": "This **is** the next paragraph."}
192
+
]')
193
+
)
194
+
;
186
195
187
196
INSERT INTO component(name, icon, description) VALUES
188
197
('form', 'cursor-text', 'A series of input fields that can be filled in by the user. '||
0 commit comments