Skip to content

Commit 233b941

Browse files
committed
docs(structured-content): improve interactive demo example text
Replace placeholder quote with a realistic service agreement template that demonstrates practical use of inline and block fields.
1 parent 8fd418c commit 233b941

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

apps/docs/snippets/extensions/structured-content.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Native Word SDT (w:sdt) fields for documents. Supports inline and block structur
1010
import { SuperDocEditor } from '/snippets/components/superdoc-editor.jsx'
1111

1212
<SuperDocEditor
13-
html={`<p><br/><br/><i>"People will forget what you said, people will forget what you did, but
14-
people will never forget how you made them feel."</i><br/><br/><b>Maya Angelou</b></p>`}
13+
html={`<p><b>Service Agreement</b></p><p>This agreement is entered into by and between <i>Acme Corp</i> ("Company") and the client named below. The Company agrees to provide consulting services as outlined in the attached statement of work.</p><p><b>Client Information</b></p><p>Name: ________&nbsp;&nbsp;&nbsp;&nbsp;Date: January 1, 2026</p><p><b>Terms</b></p><p>Payment is due within 30 days of invoice date. All work products remain property of the Company until final payment is received.</p>`}
1514
height="300px"
1615
customButtons={[
1716
[
@@ -24,9 +23,9 @@ people will never forget how you made them feel."</i><br/><br/><b>Maya Angelou</
2423
editor.commands.insertStructuredContentInline({
2524
attrs: {
2625
id: '1',
27-
alias: 'Customer Name',
26+
alias: 'Client Name',
2827
},
29-
text: 'Enter your name',
28+
text: 'John Doe',
3029
});
3130
}
3231
},
@@ -39,9 +38,9 @@ people will never forget how you made them feel."</i><br/><br/><b>Maya Angelou</
3938
editor.commands.insertStructuredContentBlock({
4039
attrs: {
4140
id: '2',
42-
alias: 'Terms & Conditions',
41+
alias: 'Payment Terms',
4342
},
44-
json: { type: 'paragraph', content: [{ type: 'text', text: 'Legal content...' }] }
43+
json: { type: 'paragraph', content: [{ type: 'text', text: 'Payment is due within 30 days of invoice date. Late payments incur a 1.5% monthly fee. All disputes must be submitted in writing within 10 business days.' }] }
4544
});
4645
},
4746
},
@@ -51,7 +50,7 @@ people will never forget how you made them feel."</i><br/><br/><b>Maya Angelou</
5150
const editor = superdoc?.activeEditor || superdoc?.editor
5251
if (!editor?.commands) return
5352

54-
editor.commands.updateStructuredContentById('1', { text: 'Jane Doe' });
53+
editor.commands.updateStructuredContentById('1', { text: 'Jane Smith' });
5554
}
5655
},
5756
{
@@ -61,7 +60,7 @@ people will never forget how you made them feel."</i><br/><br/><b>Maya Angelou</
6160
if (!editor?.commands) return
6261

6362
editor.commands.updateStructuredContentById('2', {
64-
json: { type: 'paragraph', content: [{ type: 'text', text: 'Updated legal content...' }] }
63+
json: { type: 'paragraph', content: [{ type: 'text', text: 'Net-15 payment terms apply. A 2% early payment discount is available for invoices settled within 7 days.' }] }
6564
});
6665
}
6766
},

0 commit comments

Comments
 (0)