Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ const sharedSettings = {
height: '400px',
plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'],
toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link',
tinymceai_sidebar_type: 'floating',
tinymceai_chat_welcome_message: '<p>Welcome to TinyMCE AI. Pick an action below or type your own prompt.</p>',
tinymceai_chat_welcome_actions: [
{ text: 'Here are some actions to get started:' },
{ title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' },
{ title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' },
{ title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' },
{ title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' }
{ title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' }
],
tinymceai_token_provider: async () => {
return fetch('/api/tinymceai-token', { credentials: 'include' })
Expand Down Expand Up @@ -58,11 +57,12 @@ const sharedSettings = {
]
};

// Group 1: the Introduction and Native integration editors share one AI sidebar.
// Group 1: the Introduction and Native integration editors share AI Chat and AI Review in one panel.
tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-groups-introduction',
tinymceai_group: 'article-opening',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Introduction',
tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.'
});
Expand All @@ -71,15 +71,17 @@ tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-groups-native-integration',
tinymceai_group: 'article-opening',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Native integration',
tinymceai_document_description: 'The section on moving from external AI tools to AI built into the editor, with a bulleted list of benefits.'
});

// Group 2: the Workflow comparison and Adoption challenges editors share a separate AI sidebar and never see the content of group 1.
// Group 2: the Workflow comparison and Adoption challenges editors share a separate panel and never see the content of group 1.
tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-groups-workflow-comparison',
tinymceai_group: 'article-analysis',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Workflow comparison',
tinymceai_document_description: 'The section that compares traditional and AI-enhanced workflows. Keep the comparison table.'
});
Expand All @@ -88,6 +90,7 @@ tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-groups-adoption-challenges',
tinymceai_group: 'article-analysis',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Adoption challenges',
tinymceai_document_description: 'The closing section on adoption challenges. Two short paragraphs.'
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<div style="max-width: 900px;">
<div style="max-width: 1100px;">
<div style="border: 2px solid #d6dbe0; border-radius: 8px; padding: 12px; margin-bottom: 20px;">
<h3>Group 1: <code>article-opening</code></h3>
<h4>Introduction (hosts the AI sidebar of group 1)</h4>
<h4>Introduction (first editor of group 1)</h4>
<div style="display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start;">
<div style="flex: 999 1 420px; min-width: 0;">
<textarea id="tinymceai-multi-editor-groups-introduction">
<h1>The Future of Content Creation: Integrating GenAI into Modern Workflows</h1>
<p>The landscape of digital content creation is undergoing a seismic shift. For years, the process of writing, editing, and publishing remained largely manual, requiring significant cognitive load for every draft. However, the emergence of Generative AI (GenAI) has introduced a new paradigm. By embedding intelligence directly into the tools where writing happens, organizations can unlock unprecedented levels of productivity and creativity.</p>
Expand All @@ -10,7 +12,7 @@ <h1>The Future of Content Creation: Integrating GenAI into Modern Workflows</h1>
</figure>
</textarea>

<h4>Native integration (shares the AI sidebar of group 1)</h4>
<h4>Native integration (second editor of group 1)</h4>
<textarea id="tinymceai-multi-editor-groups-native-integration">
<h2>The Shift from External Tools to Native Integration</h2>
<p>Many early adopters of AI technology rely on external chat interfaces. While powerful, this "copy-paste" workflow introduces friction and disrupts the creative flow. Native integration&mdash;where the AI exists within the text editor itself&mdash;allows creators to remain focused. Instead of switching tabs to generate a summary or check facts, the AI acts as a collaborative partner that understands the context of the current document.</p>
Expand All @@ -23,9 +25,14 @@ <h3>Key Benefits of Integrated AI</h3>
</ul>
</textarea>
</div>
<div id="tinymceai-multi-editor-groups-opening-panel" style="flex: 1 0 300px; height: 861px; box-sizing: border-box; border: 2px solid #eee; border-radius: 10px; overflow: hidden;"></div>
</div>
</div>
<div style="border: 2px solid #d6dbe0; border-radius: 8px; padding: 12px; margin-bottom: 20px;">
<h3>Group 2: <code>article-analysis</code></h3>
<h4>Workflow comparison (hosts the AI sidebar of group 2)</h4>
<h4>Workflow comparison (first editor of group 2)</h4>
<div style="display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start;">
<div style="flex: 999 1 420px; min-width: 0;">
<textarea id="tinymceai-multi-editor-groups-workflow-comparison">
<h2>Evaluating Workflow Improvements</h2>
<p>To understand the impact of GenAI integration, it is helpful to compare traditional workflows against AI-enhanced processes. The following table highlights common content tasks and how native AI transforms the output and efficiency for different stakeholders.</p>
Expand Down Expand Up @@ -67,11 +74,14 @@ <h2>Evaluating Workflow Improvements</h2>
</table>
</textarea>

<h4>Adoption challenges (shares the AI sidebar of group 2)</h4>
<h4>Adoption challenges (second editor of group 2)</h4>
<textarea id="tinymceai-multi-editor-groups-adoption-challenges">
<h2>Overcoming Adoption Challenges</h2>
<p>While the advantages are clear, implementing GenAI requires a strategic approach. Concerns regarding data privacy, output quality, and the "human touch" are common. <em>To address these, organizations should prioritize tools that offer "human-in-the-loop" functionality</em>. AI should be viewed as an assistant&mdash;a co-pilot that offers suggestions while leaving final editorial control in the hands of the writer.</p>
<p>Furthermore, technical teams must focus on the "integrator" experience. Providing developers with straightforward APIs and pre-built UI components ensures that these advanced features can be deployed quickly <strong>without the risk of building complex AI infrastructure from scratch</strong>. As we look toward the future, the goal is simple: technology that fades into the background, empowering creators to do their best work with less friction.</p>
</textarea>
</div>
<div id="tinymceai-multi-editor-groups-analysis-panel" style="flex: 1 0 300px; height: 861px; box-sizing: border-box; border: 2px solid #eee; border-radius: 10px; overflow: hidden;"></div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ const sharedSettings = {
'quickbars', 'tinymceai', 'tinycomments', 'mentions', 'revisionhistory', 'suggestededits', 'uploadcare'
],
toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link',
tinymceai_sidebar_type: 'floating',
quickbars_selection_toolbar: 'tinymceai-quickactions addcomment',
tinymceai_chat_welcome_message: '<p>Welcome to TinyMCE AI. Pick an action below or type your own prompt.</p>',
tinymceai_chat_welcome_actions: [
{ text: 'Here are some actions to get started:' },
{ title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' },
{ title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' },
{ title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' },
{ title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' }
{ title: 'Review my document', command: 'TinyMCEAIToggleApp', value: 'tinymceai-review', icon: 'ai-review' }
],
toolbar_mode: 'sliding',
visual: false,
Expand Down Expand Up @@ -126,12 +125,13 @@ const sharedSettings = {
]
};

// Group 1: the Introduction and Native integration editors share one AI sidebar.
// Group 1: the Introduction and Native integration editors share AI Chat and AI Review in one panel.
tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-groups-introduction',
revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-introduction'),
tinymceai_group: 'article-opening',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Introduction',
tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.'
});
Expand All @@ -141,16 +141,18 @@ tinymce.init({
selector: 'textarea#tinymceai-multi-editor-groups-native-integration',
revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-native-integration'),
tinymceai_group: 'article-opening',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-opening-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Native integration',
tinymceai_document_description: 'The section on moving from external AI tools to AI built into the editor, with a bulleted list of benefits.'
});

// Group 2: the Workflow comparison and Adoption challenges editors share a separate AI sidebar and never see the content of group 1.
// Group 2: the Workflow comparison and Adoption challenges editors share a separate panel and never see the content of group 1.
tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-groups-workflow-comparison',
revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-workflow-comparison'),
tinymceai_group: 'article-analysis',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Workflow comparison',
tinymceai_document_description: 'The section that compares traditional and AI-enhanced workflows. Keep the comparison table.'
});
Expand All @@ -160,6 +162,7 @@ tinymce.init({
selector: 'textarea#tinymceai-multi-editor-groups-adoption-challenges',
revisionhistory_fetch: createRevisionHistoryFetch('textarea#tinymceai-multi-editor-groups-adoption-challenges'),
tinymceai_group: 'article-analysis',
tinymceai_decoupled_container: '#tinymceai-multi-editor-groups-analysis-panel', // Decoupled mode: each group renders AI Chat and AI Review in its own panel.
tinymceai_document_name: 'Adoption challenges',
tinymceai_document_description: 'The closing section on adoption challenges. Two short paragraphs.'
});
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
// Open-source plugins below are only for editing the demo HTML (lists, links, tables). TinyMCE AI options are the focus.
// Share one TinyMCE AI configuration between every editor in the group.
const sharedSettings = {
height: '400px',
plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table', 'wordcount'],
toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic | bullist numlist | link',
tinymceai_sidebar_type: 'floating',
tinymceai_chat_welcome_message: '<p>Welcome to TinyMCE AI. Pick an action below or type your own prompt.</p>',
plugins: ['tinymceai', 'advlist', 'lists', 'link', 'autolink', 'table'],
toolbar: 'undo redo | tinymceai-chat tinymceai-review ai-quickactions-translate | styles | bold italic underline | bullist numlist | link table',
menubar: false,
help_accessibility: false,
// Decoupled mode: AI Chat and AI Review render in the panel next to the editors instead of in a sidebar.
tinymceai_decoupled_container: '#tinymceai-multi-editor-panel',
tinymceai_decoupled_show: 'tinymceai-chat',
tinymceai_chat_welcome_message: '<p>Hi! I’m your writing assistant.</p><p>I can read and write across both sections of this hiring pack — refine the role or generate interview questions.</p>',
// Every welcome action uses the empty 'no-icon' icon registered in setup, so the buttons show text only.
tinymceai_chat_welcome_actions: [
{ text: 'Here are some actions to get started:' },
{ title: 'Summarize the document', command: 'TinyMCEAIQuickActionsSummarize' },
{ title: 'Continue writing', command: 'TinyMCEAIQuickActionContinueWriting' },
{ title: 'Translate to Spanish', command: 'TinyMCEAIQuickActionTranslate', value: 'spanish' },
{ title: 'Review my document', command: 'ToggleSidebar', value: 'tinymceai-review' }
{ text: '**Try one of these:**' },
{
title: 'Suggest more interview questions',
command: 'TinyMCEAIChatPrompt',
value: {
prompt: 'Based on the Role description, suggest three or four more interview questions and add them to the end of the numbered list in the Interview questions section. Match the style of the existing questions.',
displayedPrompt: 'Suggest more interview questions'
},
icon: 'no-icon'
},
{
title: 'Flag any unclear or biased wording',
command: 'TinyMCEAIChatPrompt',
value: {
prompt: 'Check both sections of this hiring pack for unclear or biased wording. For each phrase, explain the problem and suggest clearer, more inclusive wording.',
displayedPrompt: 'Flag any unclear or biased wording'
},
icon: 'no-icon'
}
],
setup: (editor) => {
editor.ui.registry.addIcon('no-icon', '');
},
tinymceai_token_provider: async () => {
return fetch('/api/token', { credentials: 'include' })
.then(resp => resp.text())
Expand Down Expand Up @@ -59,16 +80,18 @@ const sharedSettings = {

tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-introduction',
tinymceai_group: 'article',
tinymceai_document_name: 'Introduction',
tinymceai_document_description: 'The introduction of the article. A title, a short paragraph that sets out the topic, and a figure.'
selector: 'textarea#tinymceai-multi-editor-role-description',
height: '270px',
tinymceai_group: 'hiring-pack',
tinymceai_document_name: 'Role description',
tinymceai_document_description: 'The job advert for the role: the job title and location, what the role involves, and the requirements for candidates.'
});

tinymce.init({
...sharedSettings,
selector: 'textarea#tinymceai-multi-editor-body',
tinymceai_group: 'article',
tinymceai_document_name: 'Body',
tinymceai_document_description: 'The main body of the article. Uses h2 and h3 subheadings, short paragraphs, a bulleted list, and a comparison table.'
selector: 'textarea#tinymceai-multi-editor-interview-questions',
height: '340px',
tinymceai_group: 'hiring-pack',
tinymceai_document_name: 'Interview questions',
tinymceai_document_description: 'The interview guide for the role: a heading followed by a numbered list of interview questions.'
});
Loading
Loading