Skip to content

Commit d9b9865

Browse files
committed
TINYDOC-3713: Refresh feature page demos, unify demo configuration, and add core feature pages.
1 parent f583617 commit d9b9865

138 files changed

Lines changed: 4456 additions & 2965 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/*
2+
* Shared content styles for documentation live demos.
3+
* Loaded inside the editor with:
4+
* content_css: ['default', '{{attachmentsdir}}/demo-content/content.css']
5+
* The editor body is styled as a centered card on a light gray canvas,
6+
* with a soft gradient header band painted on the body itself,
7+
* so demo content stays plain, semantic HTML without wrapper classes.
8+
*/
9+
10+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
11+
12+
html {
13+
background: #f5f6f8;
14+
}
15+
16+
body {
17+
box-sizing: border-box;
18+
max-width: 720px;
19+
margin: 24px auto;
20+
padding: 36px 40px 40px;
21+
background:
22+
radial-gradient(1200px 200px at 85% -20%, rgba(26, 115, 232, 0.14), transparent 60%) top / 100% 260px no-repeat,
23+
linear-gradient(180deg, #eef1ff 0%, #f6f8ff 60%, #ffffff 100%) top / 100% 260px no-repeat,
24+
#ffffff;
25+
border: 1px solid #ececec;
26+
border-radius: 10px;
27+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
28+
color: #2b2b2b;
29+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
30+
font-size: 16px;
31+
line-height: 1.6;
32+
}
33+
34+
@media (max-width: 600px) {
35+
body {
36+
margin: 0;
37+
padding: 20px 16px;
38+
border: 0;
39+
border-radius: 0;
40+
box-shadow: none;
41+
}
42+
}
43+
44+
h1,
45+
h2,
46+
h3,
47+
h4 {
48+
color: #141c3a;
49+
line-height: 1.25;
50+
letter-spacing: -0.01em;
51+
}
52+
53+
h1 {
54+
font-size: 28px;
55+
font-weight: 800;
56+
margin: 0 0 12px;
57+
}
58+
59+
h2 {
60+
font-size: 21px;
61+
font-weight: 700;
62+
margin: 28px 0 10px;
63+
}
64+
65+
h3 {
66+
font-size: 17px;
67+
font-weight: 700;
68+
margin: 22px 0 8px;
69+
}
70+
71+
p {
72+
margin: 0 0 14px;
73+
}
74+
75+
a {
76+
color: #174ea6;
77+
}
78+
79+
ul,
80+
ol {
81+
margin: 0 0 14px;
82+
padding-left: 24px;
83+
}
84+
85+
li {
86+
margin: 4px 0;
87+
}
88+
89+
/* A blockquote renders as a highlighted callout box. */
90+
blockquote {
91+
margin: 20px 0;
92+
padding: 16px 20px;
93+
background: rgba(255, 255, 255, 0.75);
94+
border: 1px solid #d9deef;
95+
border-radius: 10px;
96+
color: #2b2f45;
97+
}
98+
99+
blockquote p:last-child {
100+
margin-bottom: 0;
101+
}
102+
103+
table {
104+
width: 100%;
105+
margin: 16px 0;
106+
border-collapse: collapse;
107+
font-size: 15px;
108+
}
109+
110+
caption {
111+
margin-bottom: 8px;
112+
color: #4b5676;
113+
font-weight: 600;
114+
text-align: left;
115+
}
116+
117+
th,
118+
td {
119+
padding: 8px 12px;
120+
border: 1px solid #d9deef;
121+
text-align: left;
122+
}
123+
124+
th {
125+
background: #eef1ff;
126+
color: #141c3a;
127+
font-weight: 600;
128+
}
129+
130+
hr {
131+
margin: 24px 0;
132+
border: 0;
133+
border-top: 1px solid #e3e6ef;
134+
}
135+
136+
img {
137+
max-width: 100%;
138+
height: auto;
139+
}
Lines changed: 62 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,64 @@
11
<textarea id="a11ychecker">
2-
<p><strong>Introduction</strong></p>
3-
<p>Note: This demo has been crafted to intentionally trigger most of our accessibility rules for demonstration purposes.</p>
4-
<hr>
5-
<h2><a id="example"></a>The Tiny Logo</h2>
6-
<p><a href="{{site-url}}/tinymce/8/a11ychecker/#liveexample" target="_blank" rel="noopener"><img src="{{logofordemos}}" alt="" width="128" height="128"></a><a href="{{site-url}}/tinymce/8/a11ychecker/#liveexample" target="_blank" rel="noopener">This is a link to this demo. The same link has been added to logo to the left.</a></p>
7-
<p>* This is a list.</p>
8-
<p>* That has been poorly formatted.</p>
9-
<p>* By using asterisks, instead of using &lt;ul&gt;&lt;li&gt; elements.</p>
10-
<h4><a id="example"></a>To create an <strong>inaccessible</strong> ordered list:</h4>
11-
<p>1. Pick a ordering scheme,</p>
12-
<p>2. Type the item number manually for each item,</p>
13-
<p>3. Don't use &lt;ol&gt;&lt;li&gt; elements.</p>
14-
<p>This sentence contains some words that have <span style="background-color: #5a5a5a;">low color contrast</span>, which makes them <span style="color: #ced4d9;">difficult to read</span>.</p>
15-
<h3>An inaccessible table</h3>
16-
<p>The below table is missing a caption and table header cells (&lt;th&gt; elements).</p>
17-
<table style="border-collapse: collapse; width: 100%;" border="1">
18-
<tbody>
19-
<tr>
20-
<td style="width: 31.819%;">&nbsp;</td>
21-
<td style="width: 31.819%;">&nbsp;</td>
22-
<td style="width: 31.819%;">&nbsp;</td>
23-
</tr>
24-
<tr>
25-
<td style="width: 31.819%;">&nbsp;</td>
26-
<td style="width: 31.819%;">&nbsp;</td>
27-
<td style="width: 31.819%;">&nbsp;</td>
28-
</tr>
29-
<tr>
30-
<td style="width: 31.819%;">&nbsp;</td>
31-
<td style="width: 31.819%;">&nbsp;</td>
32-
<td style="width: 31.819%;">&nbsp;</td>
33-
</tr>
34-
</tbody>
2+
<blockquote>
3+
<p><strong>Try it:</strong> this newsletter contains accessibility problems on purpose.</p>
4+
<ul>
5+
<li>Select <strong>Accessibility checker</strong> in the toolbar. Use <strong>Next issue</strong> and <strong>Previous issue</strong> to step through problems with headings, lists, links, color contrast, duplicate IDs, images and tables.</li>
6+
<li>Each issue shows whether it is an error or a warning, explains the problem and links to <strong>More info</strong>. Select <strong>Repair</strong> to fix it in place, for example to turn the bold "Summer reading challenge" line into a real heading or to add a text description to an image.</li>
7+
<li>Select <strong>Ignore</strong> to skip an issue, then run the checker again to see which issues remain.</li>
8+
</ul>
9+
</blockquote>
10+
<h1>Riverside Library newsletter</h1>
11+
<p>Welcome to the spring edition. This month brings longer opening hours, a new study space and the return of the summer reading challenge.</p>
12+
<h4>New opening hours</h4>
13+
<p>* Monday to Thursday: 9 am to 8 pm</p>
14+
<p>* Friday: 9 am to 6 pm</p>
15+
<p>* Saturday: 10 am to 4 pm</p>
16+
<h2 id="events">Upcoming events</h2>
17+
<table>
18+
<tbody>
19+
<tr>
20+
<td>Event</td>
21+
<td>Date</td>
22+
<td>Room</td>
23+
</tr>
24+
<tr>
25+
<td>Author talk</td>
26+
<td>12 April</td>
27+
<td>Hall A</td>
28+
</tr>
29+
<tr>
30+
<td>Coding club for teens</td>
31+
<td>19 April</td>
32+
<td>Study space</td>
33+
</tr>
34+
</tbody>
3535
</table>
36-
<p>&nbsp;</p>
37-
</textarea>
36+
<p><span style="color: #c8ccd2;">Bookings open two weeks before each event.</span></p>
37+
<h2 id="events">The new study space</h2>
38+
<p><img src="{{logofordemos}}" alt="android-chrome-256x256" width="64" height="64"></p>
39+
<p>The former periodicals room on the first floor is now a quiet study space with 24 desks, power outlets at every seat and two bookable group rooms.</p>
40+
<table>
41+
<caption>Group room booking limits</caption>
42+
<thead>
43+
<tr>
44+
<th>Members</th>
45+
<th>Maximum booking</th>
46+
</tr>
47+
</thead>
48+
<tbody>
49+
<tr>
50+
<td>Adult members</td>
51+
<td>2 hours per day</td>
52+
</tr>
53+
<tr>
54+
<td>Student members</td>
55+
<td>3 hours per day</td>
56+
</tr>
57+
</tbody>
58+
</table>
59+
<p><strong>Summer reading challenge</strong></p>
60+
<p>1. Pick up a reading log at the front desk.</p>
61+
<p>2. Read any five books before 31 August.</p>
62+
<p>3. Bring the completed log back to collect a prize.</p>
63+
<p><a href="https://www.example.com/"><img src="{{logofordemos}}" width="48" height="48"></a><a href="https://www.example.com/">Register for the summer reading challenge</a></p>
64+
</textarea>
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
tinymce.init({
22
selector: 'textarea#a11ychecker',
3-
plugins: 'a11ychecker advcode table advlist lists image media anchor link autoresize',
4-
toolbar: 'a11ycheck | blocks bold forecolor backcolor | bullist numlist | link image media anchor | table | code',
5-
max_height: 500,
3+
height: 680,
4+
plugins: 'a11ychecker advlist lists image link table autolink charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media help wordcount',
5+
toolbar: 'a11ycheck | undo redo | blocks | bold italic forecolor | ' +
6+
'bullist numlist | link image table | backcolor | ' +
7+
'alignleft aligncenter alignright alignjustify | outdent indent | ' +
8+
'removeformat | help',
9+
content_css: ['default', '{{attachmentsdir}}/demo-content/content.css'],
610
a11y_advanced_options: true,
711
a11ychecker_html_version: 'html5',
812
a11ychecker_level: 'aaa',
9-
a11ychecker_allow_decorative_images: true,
10-
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
13+
a11ychecker_allow_decorative_images: true
1114
});
Lines changed: 68 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,76 @@
11
<textarea id="accordion">
2-
3-
{{logofordemoshtml}}
4-
5-
<h1 style="text-align: center;">The Accordion plugin</h1>
6-
7-
<p>This is a demo of the <strong>Accordion</strong> open source plugin.</p>
8-
2+
<blockquote>
3+
<p><strong>Try it:</strong></p>
4+
<ul>
5+
<li>Place the insertion point in a question, then select <strong>Toggle accordion</strong> in the toolbar that appears to open or close it, or <strong>Delete accordion</strong> to remove it.</li>
6+
<li>Place the insertion point inside an open answer and select <strong>Insert accordion</strong> in the main toolbar to nest a new section, as in the <strong>How do exchanges work?</strong> answer.</li>
7+
<li>Select the text of a paragraph, then select <strong>Insert accordion</strong>. The selected text becomes the title of the new section.</li>
8+
</ul>
9+
</blockquote>
10+
<h1>Returns and exchanges</h1>
11+
<p>Northfield Outfitters accepts returns of most items within 30 days of delivery. Open a question below for details.</p>
12+
<h2>Returns</h2>
13+
<details class="mce-accordion" open="open">
14+
<summary class="mce-accordion-summary">What is the return window?</summary>
15+
<div class="mce-accordion-body">
16+
<p>Unworn items with their original tags can be returned within 30 days of delivery. Sale items can be returned within 14 days.</p>
17+
<p>Orders placed between November 15 and December 24 can be returned until January 31.</p>
18+
</div>
19+
</details>
920
<details class="mce-accordion">
10-
<summary>What does the <strong>Accordion</strong> plugin do?</summary>
11-
<p>The Accordion plugin allows for the creation of collapsible sections in a document that can be expanded or collapsed to show or hide additional content.</p>
21+
<summary class="mce-accordion-summary">Which items cannot be returned?</summary>
22+
<div class="mce-accordion-body">
23+
<ul>
24+
<li>Socks, underwear, and swimwear with the hygiene seal removed</li>
25+
<li>Gift cards</li>
26+
<li>Items marked <strong>Final sale</strong> on the product page</li>
27+
</ul>
28+
</div>
1229
</details>
13-
1430
<details class="mce-accordion">
15-
<summary>How does it present to an end-user?</summary>
16-
<p>By default, when the <code>accordion</code> plugin is loaded, the command is available in the TinyMCE menu at <strong>Insert → Accordion</strong>.</p>
17-
<p>Adding <code>accordion</code> to the <code>toolbar</code> in the TinyMCE configuration adds an Accordion icon to the TinyMCE toolbar.</p>
18-
<p>And, when a specific collapsible section is selected, a pop-up menu presents offering two controls: one to collapse or expand the selected section; and one to delete the selected section.</p>
31+
<summary class="mce-accordion-summary">How are refunds paid?</summary>
32+
<div class="mce-accordion-body">
33+
<p>Refunds go back to the original payment method once the returned item reaches the warehouse.</p>
34+
<table>
35+
<thead>
36+
<tr><th>Payment method</th><th>Time to appear</th></tr>
37+
</thead>
38+
<tbody>
39+
<tr><td>Credit or debit card</td><td>3 to 5 business days</td></tr>
40+
<tr><td>PayPal</td><td>1 to 2 business days</td></tr>
41+
<tr><td>Gift card</td><td>Immediately, as store credit</td></tr>
42+
</tbody>
43+
</table>
44+
</div>
45+
</details>
46+
<h2>Exchanges</h2>
47+
<details class="mce-accordion" open="open">
48+
<summary class="mce-accordion-summary">How do exchanges work?</summary>
49+
<div class="mce-accordion-body">
50+
<ol>
51+
<li>Start an exchange from the order page and choose the new size or color.</li>
52+
<li>Print the prepaid label and drop the parcel at any post office.</li>
53+
<li>The replacement ships as soon as the courier scans the parcel.</li>
54+
</ol>
55+
<details class="mce-accordion">
56+
<summary class="mce-accordion-summary">What if the new size is out of stock?</summary>
57+
<div class="mce-accordion-body">
58+
<p>The exchange is converted to a refund, and an email confirms the change within one business day.</p>
59+
</div>
60+
</details>
61+
<details class="mce-accordion">
62+
<summary class="mce-accordion-summary">Can an item be exchanged for a different product?</summary>
63+
<div class="mce-accordion-body">
64+
<p>Yes. Return the original item for a refund and place a new order for the other product.</p>
65+
</div>
66+
</details>
67+
</div>
1968
</details>
20-
2169
<details class="mce-accordion">
22-
<summary>Are there other Accordion options?</summary>
23-
<p>The Accordion plugin provides:<br />
24-
four commands (<code>InsertAccordion</code>, <code>ToggleAccordion</code>, <code>ToggleAllAccordions</code>, and <code>RemoveAccordion</code>); and<br />
25-
two initialization options (<code>details_initial_state</code> and <code>details_serialized_state</code>).</p>
26-
<p>See below for details</p>
70+
<summary class="mce-accordion-summary">Are international orders eligible?</summary>
71+
<div class="mce-accordion-body">
72+
<p>International orders can be returned for a refund within 30 days. Exchanges are available for orders shipped within the United States and Canada only.</p>
73+
</div>
2774
</details>
28-
29-
30-
<h2>Got questions or need help?</h2>
31-
32-
<ul>
33-
<li>Our <a href="{{site-url}}/tinymce/8/">documentation</a> is a great resource for learning how to configure TinyMCE.</li>
34-
<li>Have a specific question? Try the <a href="{{communitysupporturl}}" target="_blank" rel="noopener"><code>{{prodnamecode}}</code> tag at Stack Overflow</a>.</li>
35-
<li>We also offer enterprise grade support as part of <a href="{{pricingpage}}">TinyMCE premium plans</a>.</li>
36-
</ul>
37-
38-
<h2>Found a bug?</h2>
39-
40-
<p>If you think you have found a bug please create an issue on the <a href="https://github.com/tinymce/tinymce/issues">GitHub repo</a> to report it to the developers.</p>
41-
42-
<h2>Finally…</h2>
43-
44-
<p>Need file uploads in your app? Consider using <a href="https://www.tiny.cloud/docs/tinymce/latest/uploadcare/" target="_blank" rel="noopener noreferrer">Uploadcare</a> with TinyMCE for a fast, modern upload experience.</p>
45-
46-
<p>Thanks for supporting TinyMCE. We hope it helps you in creating great content.</p>
47-
48-
<p>All the best from the TinyMCE team.</p>
75+
<p>For anything not covered here, contact customer care from the order page.</p>
4976
</textarea>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
tinymce.init({
22
selector: 'textarea#accordion',
3-
plugins: [
4-
"advlist", "anchor", "autolink", "charmap", "code", "fullscreen",
5-
"help", "image", "insertdatetime", "link", "lists", "media",
6-
"preview", "searchreplace", "table", "visualblocks", "accordion"
7-
],
8-
height: 1200,
9-
toolbar: "undo redo |link image accordion | styles | bold italic underline strikethrough | align | bullist numlist",
3+
height: 680,
4+
plugins: 'accordion lists link advlist autolink image charmap preview anchor searchreplace visualblocks code fullscreen insertdatetime media table help wordcount',
5+
toolbar: 'accordion | undo redo | blocks | bold italic | bullist numlist | link | ' +
6+
'backcolor | alignleft aligncenter alignright alignjustify | ' +
7+
'outdent indent | removeformat | help',
8+
content_css: ['default', '{{attachmentsdir}}/demo-content/content.css'],
9+
content_style: 'details.mce-accordion { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #d9deef; border-radius: 8px; } details.mce-accordion summary { font-weight: 600; } .mce-accordion-body { margin-top: 8px; }'
1010
});

0 commit comments

Comments
 (0)