diff --git a/-scripts/README-llm-files.md b/-scripts/README-llm-files.md index 9d1b1c3387..32216b49fe 100644 --- a/-scripts/README-llm-files.md +++ b/-scripts/README-llm-files.md @@ -81,7 +81,7 @@ The files are generated in `modules/ROOT/attachments/`: **Post-build:** Files are moved to the root directory (handled in separate PR) and accessible at: - `https://www.tiny.cloud/docs/tinymce/latest/llms.txt` -- `https://www.tiny.cloud/docs/tinymce/latest/llms-full.txt` +- `https://www.tiny.cloud/docs/llms-full.txt` ## How It Works diff --git a/-scripts/generate-llm-files.js b/-scripts/generate-llm-files.js index 014b307f11..5eafb7c8cc 100755 --- a/-scripts/generate-llm-files.js +++ b/-scripts/generate-llm-files.js @@ -16,6 +16,7 @@ const http = require('http'); const sanitizeHtml = require('sanitize-html'); const BASE_URL = 'https://www.tiny.cloud/docs/tinymce/latest'; +const DOCS_ROOT_URL = 'https://www.tiny.cloud/docs'; const OUTPUT_DIR = path.join(__dirname, '../modules/ROOT/attachments'); // Fetch sitemap from URL or file @@ -1187,7 +1188,7 @@ function App() { ## Complete Documentation -For a complete list of all ${urls.length} documentation pages, see [llms-full.txt](${BASE_URL}/llms-full.txt). +For a complete list of all ${urls.length} documentation pages, see [llms-full.txt](${DOCS_ROOT_URL}/llms-full.txt). `; } diff --git a/antora.yml b/antora.yml index bd5735dda8..dd2adb93de 100644 --- a/antora.yml +++ b/antora.yml @@ -10,7 +10,7 @@ asciidoc: companyurl: https://www.tiny.cloud cdnurl: https://cdn.tiny.cloud/1/no-api-key/tinymce/8/tinymce.min.js tdcdnurl: https://cdn.tiny.cloud/1/_your_api_key_/tinydrive/8/tinydrive.min.js - tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8/tinymce.min.js + tinymce_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/8-testing/tinymce.min.js tinydrive_live_demo_url: https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinydrive/8/tinydrive.min.js webcomponent_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-webcomponent/dist/tinymce-webcomponent.min.js jquery_url: https://cdn.jsdelivr.net/npm/@tinymce/tinymce-jquery@2/dist/tinymce-jquery.min.js @@ -22,7 +22,9 @@ asciidoc: dockerimageexporttopdf: registry.containers.tiny.cloud/pdf-converter-tiny dockerimageexporttopdfwindows: registry.containers.tiny.cloud/pdf-converter-windows-tiny # document converter placeholder variables - exportpdf_service_url: exportpdf_service_url placeholder + exportpdf_service_url: exportpdf_service_url placeholder + # TinyMCE AI demo API key + tinymceai_demo_api_key: qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc # product variables productname: TinyMCE productmajorversion: 8 diff --git a/modules/ROOT/attachments/llms.txt b/modules/ROOT/attachments/llms.txt index 7b81de7981..b1857d5fb3 100644 --- a/modules/ROOT/attachments/llms.txt +++ b/modules/ROOT/attachments/llms.txt @@ -101,5 +101,5 @@ function App() { ## Complete Documentation -For a complete list of all 395 documentation pages, see [llms-full.txt](https://www.tiny.cloud/docs/tinymce/latest/llms-full.txt). +For a complete list of all 395 documentation pages, see [llms-full.txt](https://www.tiny.cloud/docs/llms-full.txt). diff --git a/modules/ROOT/examples/live-demos/tinymceai-actions/example.js b/modules/ROOT/examples/live-demos/tinymceai-actions/example.js new file mode 100644 index 0000000000..a4772e8160 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai-actions/example.js @@ -0,0 +1,50 @@ +// Step 1: Set up session - this should be part of the application's user management process. +tinymce.init({ + selector: 'textarea#tinymceai-actions', + height: '610px', + plugins: ["tinymceai", "advlist", "anchor", "autolink", "charmap", "code"], + toolbar: "undo redo | tinymceai-chat tinymceai-quickactions tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + tinymceai_token_provider: async () => { + // Step 2: Check we have a session then fetch JWT from your backend + return fetch('/api/tinymceai-token', { credentials: "include" }) + .then(resp => resp.text()) + .then(token => ({ token })); + }, + tinymceai_chat_fetch_sources: () => Promise.resolve([{ + label: 'TinyMCE resources', + sources: [ + { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' }, + { id: 'blog', label: 'Tiny Blog', type: 'web-resource' }, + { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' }, + ] + }]), + tinymceai_chat_fetch_source: (id) => { + const urls = { + 'docs': 'https://www.tiny.cloud/docs/tinymce/latest/', + 'blog': 'https://www.tiny.cloud/blog/', + 'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/', + }; + return Promise.resolve({ type: 'web-resource', url: urls[id] }); + }, + tinymceai_quickactions_custom: [ + { + type: 'chat', + title: 'Challenge', + prompt: 'Challenge statements, verify facts and identify assumptions' + } + ], + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Swedish', language: 'swedish' }, + { title: 'Korean', language: 'korean' }, + { title: 'Hindi (Devanagari)', language: 'hindi devanagari' }, + { title: 'Italian', language: 'italian' }, + { title: 'Klingon', language: 'klingon' }, + { title: 'Dothraki', language: 'dothraki' }, + ] +}); diff --git a/modules/ROOT/examples/live-demos/tinymceai-actions/index.html b/modules/ROOT/examples/live-demos/tinymceai-actions/index.html new file mode 100644 index 0000000000..d87b06b4b2 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai-actions/index.html @@ -0,0 +1,57 @@ + diff --git a/modules/ROOT/examples/live-demos/tinymceai-actions/index.js b/modules/ROOT/examples/live-demos/tinymceai-actions/index.js new file mode 100644 index 0000000000..6e38f3adfd --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai-actions/index.js @@ -0,0 +1,51 @@ +// Step 1: Set up session - this should be part of the application's user management process. We simulate that here by creating a session for a random user. +const apiKey = '{{tinymceai_demo_api_key}}'; +const isLoggedIn = fetch(`https://demo.api.tiny.cloud/1/${apiKey}/auth/random`, { method: "POST", credentials: "include" }); + +tinymce.init({ + selector: 'textarea#tinymceai-actions', + height: '610px', + plugins: ["tinymceai", "advlist", "anchor", "autolink", "charmap", "code"], + toolbar: "undo redo | tinymceai-chat tinymceai-quickactions tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + sidebar_show: 'tinymceai-chat', + tinymceai_token_provider: async () => { + return isLoggedIn.then(() => + fetch(`https://demo.api.tiny.cloud/1/${apiKey}/jwt/tinymceai`, { credentials: "include" }) + .then(resp => resp.text()) + .then(token => ({ token })) + ); + }, + tinymceai_chat_fetch_sources: () => Promise.resolve([{ + label: 'TinyMCE resources', + sources: [ + { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' }, + { id: 'blog', label: 'Tiny Blog', type: 'web-resource' }, + { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' }, + ] + }]), + tinymceai_chat_fetch_source: (id) => { + const urls = { + 'docs': 'https://www.tiny.cloud/docs/tinymce/latest/', + 'blog': 'https://www.tiny.cloud/blog/', + 'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/', + }; + return Promise.resolve({ type: 'web-resource', url: urls[id] }); + }, + tinymceai_quickactions_custom: [ + { type: 'chat', title: 'Challenge', prompt: 'Challenge statements, verify facts and identify assumptions' } + ], + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Swedish', language: 'swedish' }, + { title: 'Korean', language: 'korean' }, + { title: 'Hindi (Devanagari)', language: 'hindi devanagari' }, + { title: 'Italian', language: 'italian' }, + { title: 'Klingon', language: 'klingon' }, + { title: 'Dothraki', language: 'dothraki' }, + ] +}); diff --git a/modules/ROOT/examples/live-demos/tinymceai-review/example.js b/modules/ROOT/examples/live-demos/tinymceai-review/example.js new file mode 100644 index 0000000000..637ff1270b --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai-review/example.js @@ -0,0 +1,51 @@ +// Step 1: Set up session - this should be part of the application's user management process. +tinymce.init({ + selector: 'textarea#tinymceai-review', + height: '610px', + plugins: ["tinymceai", "advlist", "anchor", "autolink", "charmap", "code"], + toolbar: "undo redo | tinymceai-chat ai-quickactions-translate tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + sidebar_show: 'tinymceai-review', + tinymceai_token_provider: async () => { + // Step 2: Check we have a session then fetch JWT from your backend + return fetch('/api/tinymceai-token', { credentials: "include" }) + .then(resp => resp.text()) + .then(token => ({ token })); + }, + tinymceai_chat_fetch_sources: () => Promise.resolve([{ + label: 'TinyMCE resources', + sources: [ + { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' }, + { id: 'blog', label: 'Tiny Blog', type: 'web-resource' }, + { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' }, + ] + }]), + tinymceai_chat_fetch_source: (id) => { + const urls = { + 'docs': 'https://www.tiny.cloud/docs/tinymce/latest/', + 'blog': 'https://www.tiny.cloud/blog/', + 'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/', + }; + return Promise.resolve({ type: 'web-resource', url: urls[id] }); + }, + tinymceai_quickactions_custom: [ + { + type: 'chat', + title: 'Challenge', + prompt: 'Challenge statements, verify facts and identify assumptions' + } + ], + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Swedish', language: 'swedish' }, + { title: 'Korean', language: 'korean' }, + { title: 'Hindi (Devanagari)', language: 'hindi devanagari' }, + { title: 'Italian', language: 'italian' }, + { title: 'Klingon', language: 'klingon' }, + { title: 'Dothraki', language: 'dothraki' }, + ] +}); diff --git a/modules/ROOT/examples/live-demos/tinymceai-review/index.html b/modules/ROOT/examples/live-demos/tinymceai-review/index.html new file mode 100644 index 0000000000..700264f2ff --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai-review/index.html @@ -0,0 +1,57 @@ + diff --git a/modules/ROOT/examples/live-demos/tinymceai-review/index.js b/modules/ROOT/examples/live-demos/tinymceai-review/index.js new file mode 100644 index 0000000000..50c210fc22 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai-review/index.js @@ -0,0 +1,51 @@ +// Step 1: Set up session - this should be part of the application's user management process. We simulate that here by creating a session for a random user. +const apiKey = '{{tinymceai_demo_api_key}}'; +const isLoggedIn = fetch(`https://demo.api.tiny.cloud/1/${apiKey}/auth/random`, { method: "POST", credentials: "include" }); + +tinymce.init({ + selector: 'textarea#tinymceai-review', + height: '610px', + plugins: ["tinymceai", "advlist", "anchor", "autolink", "charmap", "code"], + toolbar: "undo redo | tinymceai-chat ai-quickactions-translate tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + sidebar_show: 'tinymceai-review', + tinymceai_token_provider: async () => { + return isLoggedIn.then(() => + fetch(`https://demo.api.tiny.cloud/1/${apiKey}/jwt/tinymceai`, { credentials: "include" }) + .then(resp => resp.text()) + .then(token => ({ token })) + ); + }, + tinymceai_chat_fetch_sources: () => Promise.resolve([{ + label: 'TinyMCE resources', + sources: [ + { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' }, + { id: 'blog', label: 'Tiny Blog', type: 'web-resource' }, + { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' }, + ] + }]), + tinymceai_chat_fetch_source: (id) => { + const urls = { + 'docs': 'https://www.tiny.cloud/docs/tinymce/latest/', + 'blog': 'https://www.tiny.cloud/blog/', + 'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/', + }; + return Promise.resolve({ type: 'web-resource', url: urls[id] }); + }, + tinymceai_quickactions_custom: [ + { type: 'chat', title: 'Challenge', prompt: 'Challenge statements, verify facts and identify assumptions' } + ], + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Swedish', language: 'swedish' }, + { title: 'Korean', language: 'korean' }, + { title: 'Hindi (Devanagari)', language: 'hindi devanagari' }, + { title: 'Italian', language: 'italian' }, + { title: 'Klingon', language: 'klingon' }, + { title: 'Dothraki', language: 'dothraki' }, + ] +}); diff --git a/modules/ROOT/examples/live-demos/tinymceai/example.js b/modules/ROOT/examples/live-demos/tinymceai/example.js new file mode 100644 index 0000000000..d51457a280 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai/example.js @@ -0,0 +1,50 @@ +// Step 1: Set up session - this should be part of the application's user management process. +tinymce.init({ + selector: 'textarea#tinymceai', + height: '610px', + plugins: ["tinymceai", "advlist", "anchor", "autolink", "charmap", "code"], + toolbar: "undo redo | tinymceai-chat ai-quickactions-translate tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + tinymceai_token_provider: async () => { + // Step 2: Check we have a session then fetch JWT from your backend + return fetch('/api/tinymceai-token', { credentials: "include" }) + .then(resp => resp.text()) + .then(token => ({ token })); + }, + tinymceai_chat_fetch_sources: () => Promise.resolve([{ + label: 'TinyMCE resources', + sources: [ + { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' }, + { id: 'blog', label: 'Tiny Blog', type: 'web-resource' }, + { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' }, + ] + }]), + tinymceai_chat_fetch_source: (id) => { + const urls = { + 'docs': 'https://www.tiny.cloud/docs/tinymce/latest/', + 'blog': 'https://www.tiny.cloud/blog/', + 'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/', + }; + return Promise.resolve({ type: 'web-resource', url: urls[id] }); + }, + tinymceai_quickactions_custom: [ + { + type: 'chat', + title: 'Challenge', + prompt: 'Challenge statements, verify facts and identify assumptions' + } + ], + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Swedish', language: 'swedish' }, + { title: 'Korean', language: 'korean' }, + { title: 'Hindi (Devanagari)', language: 'hindi devanagari' }, + { title: 'Italian', language: 'italian' }, + { title: 'Klingon', language: 'klingon' }, + { title: 'Dothraki', language: 'dothraki' }, + ] +}); diff --git a/modules/ROOT/examples/live-demos/tinymceai/index.html b/modules/ROOT/examples/live-demos/tinymceai/index.html new file mode 100644 index 0000000000..7fa0f378c2 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai/index.html @@ -0,0 +1,57 @@ + diff --git a/modules/ROOT/examples/live-demos/tinymceai/index.js b/modules/ROOT/examples/live-demos/tinymceai/index.js new file mode 100644 index 0000000000..1a03053e79 --- /dev/null +++ b/modules/ROOT/examples/live-demos/tinymceai/index.js @@ -0,0 +1,56 @@ +// Step 1: Set up session - this should be part of the application's user management process. We simulate that here by creating a session for a random user. +const apiKey = '{{tinymceai_demo_api_key}}'; +const isLoggedIn = fetch(`https://demo.api.tiny.cloud/1/${apiKey}/auth/random`, { method: "POST", credentials: "include" }); + +tinymce.init({ + selector: 'textarea#tinymceai', + height: '610px', + plugins: ["tinymceai", "advlist", "anchor", "autolink", "charmap", "code"], + toolbar: "undo redo | tinymceai-chat ai-quickactions-translate tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image", + sidebar_show: 'tinymceai-chat', + tinymceai_token_provider: async () => { + // Step 2: Check we have a session then fetch JWT + return isLoggedIn.then(() => + fetch(`https://demo.api.tiny.cloud/1/${apiKey}/jwt/tinymceai`, { credentials: "include" }) + .then(resp => resp.text()) + .then(token => ({ token })) + ); + }, + tinymceai_chat_fetch_sources: () => Promise.resolve([{ + label: 'TinyMCE resources', + sources: [ + { id: 'docs', label: 'TinyMCE Documentation', type: 'web-resource' }, + { id: 'blog', label: 'Tiny Blog', type: 'web-resource' }, + { id: 'survey-2023', label: 'State of rich text editing 2023', type: 'web-resource' }, + ] + }]), + tinymceai_chat_fetch_source: (id) => { + const urls = { + 'docs': 'https://www.tiny.cloud/docs/tinymce/latest/', + 'blog': 'https://www.tiny.cloud/blog/', + 'survey-2023': 'https://www.tiny.cloud/developer-survey-results-2023/', + }; + return Promise.resolve({ type: 'web-resource', url: urls[id] }); + }, + tinymceai_quickactions_custom: [ + { + type: 'chat', + title: 'Challenge', + prompt: 'Challenge statements, verify facts and identify assumptions' + } + ], + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Swedish', language: 'swedish' }, + { title: 'Korean', language: 'korean' }, + { title: 'Hindi (Devanagari)', language: 'hindi devanagari' }, + { title: 'Italian', language: 'italian' }, + { title: 'Klingon', language: 'klingon' }, + { title: 'Dothraki', language: 'dothraki' }, + ] +}); diff --git a/modules/ROOT/images/icons-premium/adjust-length.svg b/modules/ROOT/images/icons-premium/adjust-length.svg new file mode 100644 index 0000000000..745ddb676f --- /dev/null +++ b/modules/ROOT/images/icons-premium/adjust-length.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/ai-assistant.svg b/modules/ROOT/images/icons-premium/ai-assistant.svg new file mode 100644 index 0000000000..a7e31873f5 --- /dev/null +++ b/modules/ROOT/images/icons-premium/ai-assistant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/ai-chat-response.svg b/modules/ROOT/images/icons-premium/ai-chat-response.svg new file mode 100644 index 0000000000..6964984d49 --- /dev/null +++ b/modules/ROOT/images/icons-premium/ai-chat-response.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/ai-model.svg b/modules/ROOT/images/icons-premium/ai-model.svg new file mode 100644 index 0000000000..c225787860 --- /dev/null +++ b/modules/ROOT/images/icons-premium/ai-model.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/ai-review.svg b/modules/ROOT/images/icons-premium/ai-review.svg new file mode 100644 index 0000000000..139cf4c603 --- /dev/null +++ b/modules/ROOT/images/icons-premium/ai-review.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/ai-translate.svg b/modules/ROOT/images/icons-premium/ai-translate.svg new file mode 100644 index 0000000000..ac7f32c7af --- /dev/null +++ b/modules/ROOT/images/icons-premium/ai-translate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/attachment.svg b/modules/ROOT/images/icons-premium/attachment.svg new file mode 100644 index 0000000000..4885951b3b --- /dev/null +++ b/modules/ROOT/images/icons-premium/attachment.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/change-tone.svg b/modules/ROOT/images/icons-premium/change-tone.svg new file mode 100644 index 0000000000..e915836bd1 --- /dev/null +++ b/modules/ROOT/images/icons-premium/change-tone.svg @@ -0,0 +1,4 @@ + + + + diff --git a/modules/ROOT/images/icons-premium/chat-commands.svg b/modules/ROOT/images/icons-premium/chat-commands.svg new file mode 100644 index 0000000000..b01f4a0a03 --- /dev/null +++ b/modules/ROOT/images/icons-premium/chat-commands.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/chat-reasoning.svg b/modules/ROOT/images/icons-premium/chat-reasoning.svg new file mode 100644 index 0000000000..b56c0150f2 --- /dev/null +++ b/modules/ROOT/images/icons-premium/chat-reasoning.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/chat-send.svg b/modules/ROOT/images/icons-premium/chat-send.svg new file mode 100644 index 0000000000..f0a9cfb21d --- /dev/null +++ b/modules/ROOT/images/icons-premium/chat-send.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/chat-web-search.svg b/modules/ROOT/images/icons-premium/chat-web-search.svg new file mode 100644 index 0000000000..e20b98635c --- /dev/null +++ b/modules/ROOT/images/icons-premium/chat-web-search.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/collapse.svg b/modules/ROOT/images/icons-premium/collapse.svg new file mode 100644 index 0000000000..65ad8b182e --- /dev/null +++ b/modules/ROOT/images/icons-premium/collapse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/continue-writing.svg b/modules/ROOT/images/icons-premium/continue-writing.svg new file mode 100644 index 0000000000..d12fb72b68 --- /dev/null +++ b/modules/ROOT/images/icons-premium/continue-writing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/explain.svg b/modules/ROOT/images/icons-premium/explain.svg new file mode 100644 index 0000000000..f67923bb5a --- /dev/null +++ b/modules/ROOT/images/icons-premium/explain.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/fix-grammar.svg b/modules/ROOT/images/icons-premium/fix-grammar.svg new file mode 100644 index 0000000000..a662954b3a --- /dev/null +++ b/modules/ROOT/images/icons-premium/fix-grammar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/highlight-key-points.svg b/modules/ROOT/images/icons-premium/highlight-key-points.svg new file mode 100644 index 0000000000..ac55d21952 --- /dev/null +++ b/modules/ROOT/images/icons-premium/highlight-key-points.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/improve-writing.svg b/modules/ROOT/images/icons-premium/improve-writing.svg new file mode 100644 index 0000000000..91667e17ef --- /dev/null +++ b/modules/ROOT/images/icons-premium/improve-writing.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/new-chat.svg b/modules/ROOT/images/icons-premium/new-chat.svg new file mode 100644 index 0000000000..82f2efe376 --- /dev/null +++ b/modules/ROOT/images/icons-premium/new-chat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/other-actions.svg b/modules/ROOT/images/icons-premium/other-actions.svg new file mode 100644 index 0000000000..4f92bff29e --- /dev/null +++ b/modules/ROOT/images/icons-premium/other-actions.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/pin.svg b/modules/ROOT/images/icons-premium/pin.svg new file mode 100644 index 0000000000..e28175472e --- /dev/null +++ b/modules/ROOT/images/icons-premium/pin.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/reasoning.svg b/modules/ROOT/images/icons-premium/reasoning.svg new file mode 100644 index 0000000000..3e84782564 --- /dev/null +++ b/modules/ROOT/images/icons-premium/reasoning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/source-close.svg b/modules/ROOT/images/icons-premium/source-close.svg new file mode 100644 index 0000000000..894df4eb83 --- /dev/null +++ b/modules/ROOT/images/icons-premium/source-close.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/source-file.svg b/modules/ROOT/images/icons-premium/source-file.svg new file mode 100644 index 0000000000..a82a0fc0a5 --- /dev/null +++ b/modules/ROOT/images/icons-premium/source-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/source-image.svg b/modules/ROOT/images/icons-premium/source-image.svg new file mode 100644 index 0000000000..f250e829f7 --- /dev/null +++ b/modules/ROOT/images/icons-premium/source-image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/source-link.svg b/modules/ROOT/images/icons-premium/source-link.svg new file mode 100644 index 0000000000..4ff86432a1 --- /dev/null +++ b/modules/ROOT/images/icons-premium/source-link.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/source-selection.svg b/modules/ROOT/images/icons-premium/source-selection.svg new file mode 100644 index 0000000000..8fc4eb63eb --- /dev/null +++ b/modules/ROOT/images/icons-premium/source-selection.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/stop.svg b/modules/ROOT/images/icons-premium/stop.svg new file mode 100644 index 0000000000..ac0676d46d --- /dev/null +++ b/modules/ROOT/images/icons-premium/stop.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons-premium/summarize.svg b/modules/ROOT/images/icons-premium/summarize.svg new file mode 100644 index 0000000000..2a5f83eb4b --- /dev/null +++ b/modules/ROOT/images/icons-premium/summarize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons-premium/table-properties.svg b/modules/ROOT/images/icons-premium/table-properties.svg new file mode 100644 index 0000000000..9e14616a49 --- /dev/null +++ b/modules/ROOT/images/icons-premium/table-properties.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/modules/ROOT/images/icons-premium/unpin.svg b/modules/ROOT/images/icons-premium/unpin.svg new file mode 100644 index 0000000000..6e14e3420a --- /dev/null +++ b/modules/ROOT/images/icons-premium/unpin.svg @@ -0,0 +1,4 @@ + + + + diff --git a/modules/ROOT/images/icons-premium/web-search.svg b/modules/ROOT/images/icons-premium/web-search.svg new file mode 100644 index 0000000000..27f9630fdf --- /dev/null +++ b/modules/ROOT/images/icons-premium/web-search.svg @@ -0,0 +1,3 @@ + + + diff --git a/modules/ROOT/images/icons/add-file.svg b/modules/ROOT/images/icons/add-file.svg index 18af2d8265..feb2ac43ba 100644 --- a/modules/ROOT/images/icons/add-file.svg +++ b/modules/ROOT/images/icons/add-file.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/adjustments.svg b/modules/ROOT/images/icons/adjustments.svg index 2079d17011..75df7ea925 100644 --- a/modules/ROOT/images/icons/adjustments.svg +++ b/modules/ROOT/images/icons/adjustments.svg @@ -1,3 +1,3 @@ - - + + diff --git a/modules/ROOT/images/icons/alt-text.svg b/modules/ROOT/images/icons/alt-text.svg index 6e85a1f800..da39549dbc 100644 --- a/modules/ROOT/images/icons/alt-text.svg +++ b/modules/ROOT/images/icons/alt-text.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/modules/ROOT/images/icons/blur.svg b/modules/ROOT/images/icons/blur.svg index 0cf6893a70..9fedb5af76 100644 --- a/modules/ROOT/images/icons/blur.svg +++ b/modules/ROOT/images/icons/blur.svg @@ -1,3 +1,3 @@ - - + + diff --git a/modules/ROOT/images/icons/box.svg b/modules/ROOT/images/icons/box.svg index dce6de1685..acb4829f74 100644 --- a/modules/ROOT/images/icons/box.svg +++ b/modules/ROOT/images/icons/box.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/brightness.svg b/modules/ROOT/images/icons/brightness.svg index d76f74fd54..c56c524a6a 100644 --- a/modules/ROOT/images/icons/brightness.svg +++ b/modules/ROOT/images/icons/brightness.svg @@ -1,10 +1,4 @@ - - - - icon-brightness - Created with Sketch. - - - - - \ No newline at end of file + + + + diff --git a/modules/ROOT/images/icons/camera.svg b/modules/ROOT/images/icons/camera.svg index 21c6164636..d5991d2411 100644 --- a/modules/ROOT/images/icons/camera.svg +++ b/modules/ROOT/images/icons/camera.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/caption.svg b/modules/ROOT/images/icons/caption.svg index bbfa23cf7f..7a2e3e77f6 100644 --- a/modules/ROOT/images/icons/caption.svg +++ b/modules/ROOT/images/icons/caption.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/modules/ROOT/images/icons/color-swatch-remove-color.svg b/modules/ROOT/images/icons/color-swatch-remove-color.svg index 933194bd97..256a0b700f 100644 --- a/modules/ROOT/images/icons/color-swatch-remove-color.svg +++ b/modules/ROOT/images/icons/color-swatch-remove-color.svg @@ -1,4 +1,4 @@ - + diff --git a/modules/ROOT/images/icons/contrast.svg b/modules/ROOT/images/icons/contrast.svg index 4d1ed17ac9..913bddde3a 100644 --- a/modules/ROOT/images/icons/contrast.svg +++ b/modules/ROOT/images/icons/contrast.svg @@ -1,10 +1,3 @@ - - - - icon-contrast - Created with Sketch. - - - - - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/default-document-properties.svg b/modules/ROOT/images/icons/document-gear-properties.svg similarity index 100% rename from modules/ROOT/images/icons/default-document-properties.svg rename to modules/ROOT/images/icons/document-gear-properties.svg diff --git a/modules/ROOT/images/icons/document-properties.svg b/modules/ROOT/images/icons/document-properties.svg new file mode 100644 index 0000000000..eba5de0b3f --- /dev/null +++ b/modules/ROOT/images/icons/document-properties.svg @@ -0,0 +1,10 @@ + + + + icon-document-properties + Created with Sketch. + + + + + \ No newline at end of file diff --git a/modules/ROOT/images/icons/dropbox.svg b/modules/ROOT/images/icons/dropbox.svg index 61576ab6f5..353d816d3b 100644 --- a/modules/ROOT/images/icons/dropbox.svg +++ b/modules/ROOT/images/icons/dropbox.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/evernote.svg b/modules/ROOT/images/icons/evernote.svg index a750417723..1ba5699015 100644 --- a/modules/ROOT/images/icons/evernote.svg +++ b/modules/ROOT/images/icons/evernote.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/exposure.svg b/modules/ROOT/images/icons/exposure.svg index fda78d4caf..3141f579ea 100644 --- a/modules/ROOT/images/icons/exposure.svg +++ b/modules/ROOT/images/icons/exposure.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/fb.svg b/modules/ROOT/images/icons/fb.svg index 5503a9b4c0..5224ae3f14 100644 --- a/modules/ROOT/images/icons/fb.svg +++ b/modules/ROOT/images/icons/fb.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/flickr.svg b/modules/ROOT/images/icons/flickr.svg index 336b721bc4..029c14b819 100644 --- a/modules/ROOT/images/icons/flickr.svg +++ b/modules/ROOT/images/icons/flickr.svg @@ -1,3 +1,3 @@ - - + + diff --git a/modules/ROOT/images/icons/folder.svg b/modules/ROOT/images/icons/folder.svg index 9bd6f4a888..ae0a8ba4a0 100644 --- a/modules/ROOT/images/icons/folder.svg +++ b/modules/ROOT/images/icons/folder.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/gamma.svg b/modules/ROOT/images/icons/gamma.svg index 9d684fd2e5..4e759f265b 100644 --- a/modules/ROOT/images/icons/gamma.svg +++ b/modules/ROOT/images/icons/gamma.svg @@ -1,10 +1 @@ - - - - icon-gamma - Created with Sketch. - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/google-drive.svg b/modules/ROOT/images/icons/google-drive.svg index 3ca54f4325..7e97af4f0a 100644 --- a/modules/ROOT/images/icons/google-drive.svg +++ b/modules/ROOT/images/icons/google-drive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/google-photos.svg b/modules/ROOT/images/icons/google-photos.svg index 33a6af34c5..12df76002f 100644 --- a/modules/ROOT/images/icons/google-photos.svg +++ b/modules/ROOT/images/icons/google-photos.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/grayscale.svg b/modules/ROOT/images/icons/grayscale.svg index 21af08f8a8..9ad6aa87d5 100644 --- a/modules/ROOT/images/icons/grayscale.svg +++ b/modules/ROOT/images/icons/grayscale.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/huddle.svg b/modules/ROOT/images/icons/huddle.svg index b4755a1247..41285ece88 100644 --- a/modules/ROOT/images/icons/huddle.svg +++ b/modules/ROOT/images/icons/huddle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/image-decorative.svg b/modules/ROOT/images/icons/image-decorative.svg index 656cb0260c..4c93b6c2d7 100644 --- a/modules/ROOT/images/icons/image-decorative.svg +++ b/modules/ROOT/images/icons/image-decorative.svg @@ -1,3 +1,3 @@ - - + + diff --git a/modules/ROOT/images/icons/image-enhancements.svg b/modules/ROOT/images/icons/image-enhancements.svg new file mode 100644 index 0000000000..c813b13aba --- /dev/null +++ b/modules/ROOT/images/icons/image-enhancements.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons/instagram.svg b/modules/ROOT/images/icons/instagram.svg index c46d3c45ec..2075c824ca 100644 --- a/modules/ROOT/images/icons/instagram.svg +++ b/modules/ROOT/images/icons/instagram.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/invert.svg b/modules/ROOT/images/icons/invert.svg index 954917e5f0..a6f612e3f2 100644 --- a/modules/ROOT/images/icons/invert.svg +++ b/modules/ROOT/images/icons/invert.svg @@ -1,10 +1 @@ - - - - icon-invert - Created with Sketch. - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/mentions.svg b/modules/ROOT/images/icons/mentions.svg new file mode 100644 index 0000000000..f8ac71642f --- /dev/null +++ b/modules/ROOT/images/icons/mentions.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons/onedrive.svg b/modules/ROOT/images/icons/onedrive.svg index 9463e3cecf..799826788e 100644 --- a/modules/ROOT/images/icons/onedrive.svg +++ b/modules/ROOT/images/icons/onedrive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/photo-filter.svg b/modules/ROOT/images/icons/photo-filter.svg new file mode 100644 index 0000000000..b1f584a416 --- /dev/null +++ b/modules/ROOT/images/icons/photo-filter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons/revert-changes.svg b/modules/ROOT/images/icons/revert-changes.svg new file mode 100644 index 0000000000..1c417c9686 --- /dev/null +++ b/modules/ROOT/images/icons/revert-changes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/modules/ROOT/images/icons/revert.svg b/modules/ROOT/images/icons/revert.svg deleted file mode 100644 index 68854286fc..0000000000 --- a/modules/ROOT/images/icons/revert.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/modules/ROOT/images/icons/saturation.svg b/modules/ROOT/images/icons/saturation.svg index 4ed121e860..9c34e30251 100644 --- a/modules/ROOT/images/icons/saturation.svg +++ b/modules/ROOT/images/icons/saturation.svg @@ -1,3 +1,3 @@ - - + + diff --git a/modules/ROOT/images/icons/sharpen.svg b/modules/ROOT/images/icons/sharpen.svg index 10d9c29e82..6a8e60b1da 100644 --- a/modules/ROOT/images/icons/sharpen.svg +++ b/modules/ROOT/images/icons/sharpen.svg @@ -1,10 +1,3 @@ - - - - icon-sharpen - Created with Sketch. - - - - - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/transform-image.svg b/modules/ROOT/images/icons/transform-image.svg index 15e252c9cf..c1e12833e4 100644 --- a/modules/ROOT/images/icons/transform-image.svg +++ b/modules/ROOT/images/icons/transform-image.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/vibrance.svg b/modules/ROOT/images/icons/vibrance.svg index 63f83303ab..a39d6498c2 100644 --- a/modules/ROOT/images/icons/vibrance.svg +++ b/modules/ROOT/images/icons/vibrance.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/ROOT/images/icons/vk.svg b/modules/ROOT/images/icons/vk.svg index 3c24b20293..c18d91d140 100644 --- a/modules/ROOT/images/icons/vk.svg +++ b/modules/ROOT/images/icons/vk.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/modules/ROOT/images/icons/warmth.svg b/modules/ROOT/images/icons/warmth.svg index 1694549adc..3c8c37e43b 100644 --- a/modules/ROOT/images/icons/warmth.svg +++ b/modules/ROOT/images/icons/warmth.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 35fd12a1c3..7fe983a16e 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -260,6 +260,24 @@ **** xref:ai-bedrock.adoc[Amazon Bedrock integration guide] **** xref:ai-gemini.adoc[Google Gemini integration guide] **** xref:ai-proxy.adoc[AI proxy server reference guide] +*** TinyMCE AI +**** xref:tinymceai-introduction.adoc[Introduction] +**** xref:tinymceai-chat.adoc[Chat] +**** xref:tinymceai-review-plugin.adoc[Review] +**** xref:tinymceai-actions-plugin.adoc[Actions] +**** xref:tinymceai-models.adoc[AI Models] +**** xref:tinymceai-limits.adoc[Limits] +**** xref:tinymceai-integration-options.adoc[Integration Options] +***** xref:tinymceai.adoc[Plugin quick start] +***** REST API +****** xref:tinymceai-api-overview.adoc[API Overview] +****** xref:tinymceai-api-quick-start.adoc[API quick start] +****** xref:tinymceai-streaming.adoc[Streaming] +**** xref:tinymceai-jwt-authentication-intro.adoc[JWT Authentication] +***** xref:tinymceai-permissions.adoc[Permissions] +***** Guides +****** xref:tinymceai-with-jwt-authentication-nodejs.adoc[JWT authentication (Node.js)] +****** xref:tinymceai-with-jwt-authentication-php.adoc[JWT authentication (PHP)] *** xref:casechange.adoc[Case Change] *** xref:checklist.adoc[Checklist] *** Comments diff --git a/modules/ROOT/pages/available-menu-items.adoc b/modules/ROOT/pages/available-menu-items.adoc index 65d7edf122..19e1c3d121 100644 --- a/modules/ROOT/pages/available-menu-items.adoc +++ b/modules/ROOT/pages/available-menu-items.adoc @@ -58,6 +58,12 @@ include::partial$misc/plugin-menu-item-id-boilerplate.adoc[] :plugincode: ai include::partial$misc/plugin-menu-item-id-boilerplate.adoc[] +:plugincategory: premium +:pluginname: TinyMCE AI +:plugincode: tinymceai +:pluginpage: tinymceai.adoc +include::partial$misc/plugin-menu-item-id-boilerplate.adoc[] + :plugincategory: opensource :pluginname: Anchor :plugincode: anchor diff --git a/modules/ROOT/pages/available-toolbar-buttons.adoc b/modules/ROOT/pages/available-toolbar-buttons.adoc index 065e97ac95..fa62ebcb2c 100644 --- a/modules/ROOT/pages/available-toolbar-buttons.adoc +++ b/modules/ROOT/pages/available-toolbar-buttons.adoc @@ -35,6 +35,12 @@ include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[] :plugincode: ai include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[] +:plugincategory: premium +:pluginname: TinyMCE AI +:plugincode: tinymceai +:pluginpage: tinymceai.adoc +include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[] + :plugincategory: premium :pluginname: Enhanced Code Editor :plugincode: advcode diff --git a/modules/ROOT/pages/editor-command-identifiers.adoc b/modules/ROOT/pages/editor-command-identifiers.adoc index 134b326630..87ce38f82d 100644 --- a/modules/ROOT/pages/editor-command-identifiers.adoc +++ b/modules/ROOT/pages/editor-command-identifiers.adoc @@ -215,6 +215,7 @@ Commands are available for the following plugins: * xref:advancedlists[Advanced Lists] * xref:Enhanced Tables[Enhanced Tables] * xref:anchor[Anchor] +* xref:tinymceai[TinyMCE AI] * xref:autoresize[Autoresize] * xref:casechange[Case Change] * xref:charactermap[Character Map] @@ -525,6 +526,13 @@ The following commands require the xref:tableofcontents.adoc[Table of Contents ( include::partial$commands/tableofcontents-cmds.adoc[leveloffset=+3] +[[tinymceai]] +==== TinyMCE AI + +The following commands require the xref:tinymceai.adoc[TinyMCE AI (`+tinymceai+`)] plugin. + +include::partial$commands/tinymceai-cmds.adoc[leveloffset=+3] + [[advtemplate]] ==== Templates diff --git a/modules/ROOT/pages/tinydrive-getting-started.adoc b/modules/ROOT/pages/tinydrive-getting-started.adoc index 0bdbb540bc..22a1a69531 100644 --- a/modules/ROOT/pages/tinydrive-getting-started.adoc +++ b/modules/ROOT/pages/tinydrive-getting-started.adoc @@ -25,7 +25,7 @@ The steps required for setting up {cloudfilemanager} are: If you do not have a {cloudname} API key, you can sign up for a trial or purchase a subscription on the link:{pricingpage}/[{companyname} pricing page]. -include::partial$auth/private-public-key-pairs-for-tiny-cloud-services.adoc[leveloffset=+1] +include::partial$auth/private-public-key-pairs-for-tiny-cloud-services.adoc[] [[set-up-a-json-web-token-jwt-provider-endpoint]] == 3. Set up a JSON Web Token (JWT) Provider endpoint diff --git a/modules/ROOT/pages/tinymceai-actions-plugin.adoc b/modules/ROOT/pages/tinymceai-actions-plugin.adoc new file mode 100644 index 0000000000..83ee9a1d3d --- /dev/null +++ b/modules/ROOT/pages/tinymceai-actions-plugin.adoc @@ -0,0 +1,258 @@ += TinyMCE AI Quick Actions +:navtitle: Quick Actions +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: Quick actions feature for TinyMCE AI plugin +:description_short: quick actions feature +:keywords: AI, quick actions, actions, tinymceai +:page-role: -toc + +Quick actions simplify routine content transformations by offering one-click AI-powered suggestions directly within the editor. This feature enhances speed, relevance, and usability, particularly for repeatable or simple tasks. The feature comes with a window interface for most actions; some actions (such as Explain or Summarize) open the xref:tinymceai-chat.adoc[Chat] instead and start the conversation with a pre-filled prompt. + +The Quick Actions feature is available as a plugin UI and through the xref:tinymceai-actions-plugin.adoc#actions-api[Actions API]. This page covers both: + +* Plugin sections describe user-facing features and configuration. +* API sections cover REST API access (starting at xref:tinymceai-actions-plugin.adoc#actions-api[Actions API]). + +[[demo]] +== Demo + +liveDemo::tinymceai-actions[] + +Actions are fast, stateless operations that transform content. Unlike Reviews that provide suggestions for review, Actions run a transformation and display the result in a preview interface where users can accept or reject before changes are applied. + +**When to use Actions vs Reviews:** Use Actions when transforming a selection or small section of text (fix grammar, translate, adjust tone). Use Reviews when analyzing entire documents for quality improvements and getting suggestions without automatically changing the content. + +image::https://placehold.net/default.png[{pluginname} quick actions showing AI-powered suggestions and Q&A functionality] + +[[integration]] +== Integration + +To start using the Quick Actions feature, first load the {pluginname} plugin in the editor configuration. See xref:tinymceai.adoc[Plugin Reference] for installation and enabling AI features. + +Then, add the menu that opens the list of Quick Actions (`tinymceai-quickactions`) image:icons/ai-prompt.svg[Quick Actions icon,24px] to the main toolbar and/or context toolbar (selection toolbar) configurations. + +[NOTE] +==== +AI features are added to the selection toolbar by default when the plugin is enabled. Use the toolbar configuration options to customize which AI features appear. +==== + +To learn more about toolbar configuration, refer to the xref:toolbar-configuration-options.adoc[toolbar configuration] guide. + +image::https://placehold.net/default.png[{pluginname} Quick Actions dropdown in the toolbar] + +Finally, individual Quick Actions can also be added to the toolbar as shortcuts for easier access. For example, add the `ai-quickactions-improve-writing` image:icons-premium/improve-writing.svg[Improve Writing icon,24px] button, or the `ai-chat-explain` image:icons-premium/explain.svg[Explain icon,24px] button (find it in the demo above). Whole categories can be added to the toolbar as well. xref:tinymceai-actions-plugin.adoc#default-actions[Learn more about available actions]. + +The final example configuration looks as follows: + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'undo redo tinymceai-chat tinymceai-quickactions tinymceai-review | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image', + tinymceai_quickactions_menu: [ + 'ai-quickactions-chat-prompts', + 'ai-quickactions-improve-writing', + 'ai-quickactions-continue-writing', + 'ai-quickactions-check-grammar', + 'ai-quickactions-change-length', + 'ai-quickactions-change-tone', + 'ai-quickactions-translate' + ], + + // Configure a sub-menu (e.g., chat commands) + tinymceai_quickactions_chat_prompts: [ + 'ai-chat-explain', + 'ai-chat-summarize', + 'ai-chat-highlight-key-points' + ], + tinymceai_sidebar_type: 'static', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + } +}); +---- + +[[types-of-actions]] +== Types of actions + +There are two types of actions available in the quick actions feature: + +* Chat actions, such as "Explain" or "Summarize", open the xref:tinymceai-chat.adoc[Chat] interface with the selected text added as context and automatically start the conversation with a pre-filled prompt. + +* Preview actions, such as "Continue writing", "Make shorter", "Improve writing", or "Fix grammar", display the AI response in a preview interface where users can review and accept or reject the suggested changes. + +Custom actions let integrators define whether each action opens Chat or shows a preview. See xref:tinymceai-actions-plugin.adoc#custom-actions[Custom Actions]. + +[[default-actions]] +== Default Actions + +By default, the Quick Actions feature includes several built-in actions that speed up the content editing process. All Quick Actions can be accessed through the menu button image:icons/ai-prompt.svg[Quick Actions icon,24px] (`tinymceai-quickactions`) or individually when selected by the integrator in the xref:toolbar-configuration-options.adoc[editor toolbar configuration]. Whole action categories can be added to the toolbar as well. + +Custom actions can be added to the list, and default actions can be removed or reordered by configuring `tinymceai_quickactions_menu`. See xref:tinymceai-actions-plugin.adoc#configuring-quick-actions-menu[Configuring Quick Actions menu]. + +Here is the full list of available actions. The identifiers below are used by the REST API. For the plugin UI, configure the Translate submenu using `tinymceai_languages`. + +* **"Chat commands"** category +** `'explain'` +** `'summarize'` +** `'highlight-key-points'` +* `'improve-writing'` +* `'continue'` +* `'fix-grammar'` +* **"Adjust length"** category +** `'make-shorter'` +** `'make-longer'` +* **"Change tone"** category +** `'make-tone-casual'` +** `'make-tone-direct'` +** `'make-tone-friendly'` +** `'make-tone-confident'` +** `'make-tone-professional'` +* **"Translate"** category ++ +The REST API uses the single action `'translate'` with a `language` parameter in the request body (`args: { language: string }`). Use language names such as `english`, `spanish`, `russian`, `swedish`, `german`, `japanese`, `portuguese`, `korean`, `italian`, or `chinese`. For the plugin UI, configure languages via `tinymceai_languages`. + +[[custom-actions]] +== Custom Actions + +The `tinymceai_quickactions_custom` configuration property allows adding new commands to the Quick actions feature. The items can be type `action` (a quick action that goes straight to the preview rendering) or type `chat` (opens the chat interface). The `title` is used in the menu items, while the `prompt` is what is actually sent to the AI. The `model` is required for `action` type commands. Learn more about xref:tinymceai-actions-plugin.adoc#types-of-actions[types of actions]. + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'tinymceai-quickactions', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + }, + tinymceai_quickactions_custom: [ + { + title: 'Add a quote from a famous person', + prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.', + type: 'action', + model: 'gemini-2-5-flash' + }, + { + title: 'Summarize in 5 bullet points', + prompt: 'Summarize the selected text in 5 bullet points.', + type: 'chat' + }, + { + title: 'Rewrite adding more sarcasm', + prompt: 'Rewrite using a sarcastic tone.', + type: 'action', + model: 'gemini-2-5-flash' + } + ] +}); +---- + +[[configuring-quick-actions-menu]] +== Configuring Quick Actions menu + +Which actions appear in the Quick Actions menu can be configured by specifying the list of actions to include. The `tinymceai_quickactions_menu` configuration option controls the main menu items. + +Sub-menus have their own configuration options: + +* `tinymceai_quickactions_chat_prompts`: Controls items in the **"Chat commands"** sub-menu +* `tinymceai_quickactions_change_tone_menu`: Controls items in the **"Change tone"** sub-menu +* `tinymceai_languages`: Controls languages in the **"Translate"** sub-menu + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'tinymceai-quickactions', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + }, + // Configure the main Quick Actions menu + tinymceai_quickactions_menu: [ + 'ai-quickactions-chat-prompts', + 'ai-quickactions-improve-writing', + 'ai-quickactions-continue-writing', + 'ai-quickactions-check-grammar', + 'ai-quickactions-change-length', + 'ai-quickactions-change-tone', + 'ai-quickactions-translate', + 'ai-quickactions-custom' + ], + // Configure a sub-menu (e.g., chat commands) + tinymceai_quickactions_chat_prompts: [ + 'ai-chat-explain', + 'ai-chat-summarize', + 'ai-chat-highlight-key-points' + ] +}); +---- + +[[actions-api]] +== Actions API + +The Quick Actions plugin feature is built on top of the Actions API, which provides REST API access to action functionality. Actions are fast, stateless operations that transform content. Unlike Reviews that provide suggestions for review, Actions run a transformation and display the result in a preview interface where users can accept or reject before changes are applied. + +**When to use Actions vs Reviews:** Use Actions when transforming a selection or small section of text (fix grammar, translate, adjust tone). Use Reviews when analyzing entire documents for quality improvements and getting suggestions without automatically changing the content. + +Unlike conversations, actions do not remember previous interactions. Each action is independent and focused on a single task. Actions use streaming output with Server-Sent Events for real-time feedback as results are generated. + +[[actions-system-actions-api]] +=== System Actions + +{pluginname} provides built-in system actions for common content transformations through the API. These correspond to the default actions available in the plugin UI: + +[cols="2,4,1",options="header"] +|=== +|Action|Description|API +|**Fix Grammar**|Correct grammar, spelling, and punctuation errors.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|**Improve Writing**|Enhance clarity, word choice, and sentence structure.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|**Continue Writing**|Complete unfinished sentences, paragraphs, or entire documents.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|**Make Longer**|Expand content with more detail, examples, and explanations.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|**Make Shorter**|Condense lengthy text while keeping the essential information.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|**Adjust Tone**|Change writing style to casual, professional, friendly, or confident.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|**Translate**|Convert content between languages with proper cultural context.|https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +|=== + +[[actions-custom-actions-api]] +=== Custom Actions through the API + +In addition to system actions, custom actions can be created for specific use cases through the API. Custom actions allow specialized content transformations using custom prompts to control AI behavior. + +Unlike system actions that use predefined identifiers, custom actions use a unified endpoint where the transformation behavior is defined through a prompt parameter. See https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] for the custom actions endpoint and implementation details. + +Custom actions require the `ai:actions:custom` permission in the JWT token. + +[[actions-streaming]] +=== Streaming Responses + +Actions use Server-Sent Events (SSE) for real-time streaming results. See the xref:tinymceai-streaming.adoc[Streaming Responses guide] for detailed implementation information. + +[[actions-api-reference]] +=== API Reference + +For complete endpoint documentation, request/response schemas, authentication details, and additional parameters, see: + +* **https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API Reference]**: Full documentation for system and custom actions endpoints with interactive examples + +The REST API documentation includes examples for: + +* Grammar fix: see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Writing improvement: see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Content expansion (make longer): see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Content condensation (make shorter): see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Tone adjustment: see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Translation: see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Custom actions with custom prompts: see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] +* Streaming responses: see https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API] + +[[related-features]] +== Related Features + +* xref:tinymceai-chat.adoc[AI chat]: For interactive discussions with document analysis and context. +* xref:tinymceai-review-plugin.adoc[AI review]: For content quality analysis and improvement suggestions. diff --git a/modules/ROOT/pages/tinymceai-api-overview.adoc b/modules/ROOT/pages/tinymceai-api-overview.adoc new file mode 100644 index 0000000000..5b1e5c8b19 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-api-overview.adoc @@ -0,0 +1,41 @@ += TinyMCE AI API Overview + +:navtitle: API Overview +:description: Overview of TinyMCE AI service features and capabilities +:description_short: API Overview +:keywords: AI, API, AI service, overview, tinymceai + +TinyMCE AI integrates AI-assisted authoring with rich-text editing. Users can interact through Actions, Reviews, or Conversations that can use relevant context from multiple sources. + +[NOTE] +==== +**API Reference**: The complete API documentation with all endpoints, parameters, request/response schemas, and interactive examples is available at link:https://tinymceai.api.tiny.cloud/docs[TinyMCE AI API Documentation] +==== + +[[getting-started]] +== Getting Started + +New to TinyMCE AI? Start with the xref:tinymceai-api-quick-start.adoc[Quick Start] guide to set up the environment, generate access credentials, and make the first API call. + +[[tinymce-ai-features]] +== TinyMCE AI features + +* xref:tinymceai-chat.adoc[**Chat**]: Interactive AI chats with history and persistent context. +* xref:tinymceai-review-plugin.adoc[**Review**]: Content analysis and proofreading, optimized for larger content. +* xref:tinymceai-actions-plugin.adoc[**Quick Actions**]: Fast, stateless operations for specific tasks. + +[[architecture]] +== Architecture + +The following pages cover the AI service architecture and configuration. + +* xref:tinymceai-models.adoc[**Models**]: AI model selection, capabilities, and configuration. +* xref:tinymceai-streaming.adoc[**Streaming**]: Real-time streaming of AI-generated responses. +* xref:tinymceai-permissions.adoc[**Permissions**]: How to control user access to features. +* xref:tinymceai-limits.adoc[**Limits**]: Rate limits, context size limits, and file restrictions. + +[[resources-and-support]] +== Resources and Support + +* **API Documentation**: link:https://tinymceai.api.tiny.cloud/docs[Complete API reference for TinyMCE AI]. +* **Customer Support**: link:https://www.tiny.cloud/contact/[Contact us] to get help from the support team or speak with sales. diff --git a/modules/ROOT/pages/tinymceai-api-quick-start.adoc b/modules/ROOT/pages/tinymceai-api-quick-start.adoc new file mode 100644 index 0000000000..d140a47d62 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-api-quick-start.adoc @@ -0,0 +1,91 @@ += TinyMCE AI API Quick Start + +:navtitle: API Quick Start +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: Quick start guide for TinyMCE AI service +:description_short: API quick start guide +:keywords: AI, quick start, API, AI service, tinymceai, setup + +This guide helps users get up and running with the {pluginname} service. + +[TIP] +==== +Sign up for the link:https://www.tiny.cloud/auth/signup/[{productname} Premium Features 14-day free trial] to test this feature first. + +The {productname} Premium Features free trial allows for testing SaaS services. For on-premises solutions, link:https://www.tiny.cloud/contact/[contact us]. +==== + +== Getting Started + +To start using the {pluginname} service, follow the steps below: + +* Sign up for one of the link:https://www.tiny.cloud/pricing/[self-service plans], or link:https://www.tiny.cloud/contact/[contact us] to purchase the {pluginname} license. +* Generate access credentials in the link:https://www.tiny.cloud/my-account/[Customer Portal]. +* Write a script that generates one-time tokens for authorizing end users of the application in {productname} Cloud Services (using access credentials created earlier). + +All steps are explained in detail below. + +[[get-the-tinymce-ai-license]] +== Get the {pluginname} license + +{pluginname} can be purchased as a plugin for selected tiers of the self-service plans. Details are available on the link:https://www.tiny.cloud/pricing/[pricing page]. + +For custom plans, link:https://www.tiny.cloud/contact/[contact us] directly. + +For testing purposes, sign up for the link:https://www.tiny.cloud/auth/signup/[free trial]. + +After signing up, access to the link:https://www.tiny.cloud/my-account/[customer dashboard (Customer Portal)] is provided. + +[[log-in-to-the-customer-portal]] +== Log in to the Customer Portal + +Log in to the link:https://www.tiny.cloud/my-account/[Customer Portal] and navigate to link:https://www.tiny.cloud/my-account/jwt/["JWT Keys"]. + +image::https://placehold.net/default.png[{pluginname} trial view] + +[[create-token-endpoint]] +== Create token endpoint + +The next step is to create a security token endpoint in the application backend. That endpoint securely authorizes end users to use {pluginname} features based on their permissions and access rights. + +[[writing-your-own-token-endpoint]] +=== Writing your own token endpoint + +To create a custom security token endpoint, create access credentials for the selected environment by going to the "Access credentials" tab and clicking the "Create a new access key" button. + +See the Creating access credentials section of the Environments management guide for more information. + +[[cloud-region]] +== Cloud region + +Cloud Services can reside in either US or EU region or in both. The region is set per subscription and cannot be changed for existing environments. For Custom plan with multi-region, the region can be chosen during environment creation. The Environment management guide covers this topic in more detail. + +[[api-integration]] +== API Integration + +All features are accessible through the API at `https://tinymceai.api.tiny.cloud` with JWT authentication. + +For an overview of all API features, see xref:tinymceai-api-overview.adoc[API Overview]. + +For feature documentation and API access information, see: + +* xref:tinymceai-chat.adoc#conversations-api[Chat]: Interactive AI discussions and document analysis through the Conversations API. +* xref:tinymceai-review-plugin.adoc#reviews-api[Review]: Content improvement and quality analysis through the Reviews API. +* xref:tinymceai-actions-plugin.adoc#actions-api[Quick Actions]: Content transformation through the Actions API. +* xref:tinymceai-streaming.adoc[Streaming]: Real-time AI interactions with code examples. + +link:https://tinymceai.api.tiny.cloud/docs[Complete API Documentation]: Full API reference with interactive examples for all endpoints. + +[[next-steps]] +== Next Steps + +After setting up the JWT endpoint, continue with: + +* xref:tinymceai-api-overview.adoc[API Overview]: Overview of all API features and capabilities. +* xref:tinymceai-models.adoc[AI Models]: Choose the right model for your use case. +* xref:tinymceai-permissions.adoc[Permissions]: Set up user access control for production. +* xref:tinymceai-streaming.adoc[Streaming]: Learn how to handle real-time streaming responses. +* xref:tinymceai-chat.adoc#conversations-api[Chat API]: Start with interactive AI discussions. +* xref:tinymceai-review-plugin.adoc#reviews-api[Review API]: Add content improvement features. +* xref:tinymceai-actions-plugin.adoc#actions-api[Quick Actions API]: Implement content transformation. diff --git a/modules/ROOT/pages/tinymceai-chat.adoc b/modules/ROOT/pages/tinymceai-chat.adoc new file mode 100644 index 0000000000..e3e65c37b7 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-chat.adoc @@ -0,0 +1,258 @@ += TinyMCE AI Chat +:navtitle: Chat +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: AI Chat feature for TinyMCE AI plugin +:description_short: AI Chat feature +:keywords: AI, chat, conversations, tinymceai +:page-role: -toc + +The {pluginname} Chat is a conversational AI that facilitates rich, multi-turn interactions between users and an AI Assistant for content creation and editing. It provides context setting, model selection, chat history, and capabilities for web search and reasoning. + +The Chat feature is available as a plugin UI and through the xref:tinymceai-chat.adoc#conversations-api[Conversations API]. This page covers both: + +* Plugin sections describe user-facing features and configuration. +* API sections cover REST API access (starting at xref:tinymceai-chat.adoc#conversations-api[Conversations API]). + +[[using-chat]] +== Using Chat + +image::https://placehold.net/default.png[{pluginname} Chat interface showing the conversational AI assistant] + +[[working-with-the-document]] +=== Working with the document + +{pluginname} operates directly within the context of the document. Users can ask questions about specific sections, request a full-document proofreading, and more. + +By enabling xref:tinymceai-chat.adoc#web-search[Web search] or xref:tinymceai-chat.adoc#reasoning[Reasoning], the chat capabilities can be extended — allowing the chat to look up information online and tackle complex tasks step by step. + +[[making-changes-to-the-content]] +=== Making changes to the content + +Users can chat with the AI and use it to introduce changes to the document. Ask it to _"Summarize the document"_, _"Turn this report into a one-page executive summary"_, or _"Suggest better section titles and subheadings"_. The AI will then propose a series of changes to the document that can be xref:tinymceai-chat.adoc#previewing-changes[reviewed] and xref:tinymceai-chat.adoc#applying-changes[accepted or discarded one by one]. Long AI responses can be expanded using the **Expand** button to view the full suggestion. {pluginname} works directly on the content instead of requiring copy-paste of chat transcripts. + +[[brainstorming]] +=== Brainstorming + +The chat feature accelerates the creative process. Begin with a blank document and ask the AI for ideas. Build content step by step by chatting and applying changes. Then review or have the AI rewrite the final draft for best results, all in one place. + +[[demo]] +== Demo + +liveDemo::tinymceai[] + +[[integration]] +== Integration + +To start using the Chat feature, first load the {pluginname} plugin in the editor configuration. The Chat button image:icons-premium/ai-assistant.svg[Chat icon,24px] will appear in the AI user interface along with the Chat history image:icons/restore-draft.svg[History icon,24px]. See xref:tinymceai.adoc[Plugin Reference] for installation and enabling AI features. + +[[available-models]] +== Available models + +Users can select the desired AI model for their conversation from a dropdown at the bottom of the chat. + +image::https://placehold.net/default.png[{pluginname} Chat available models dropdown] + +Once selected, the AI model will persist for the duration of the conversation. To change the model, start a new conversation using the image:icons-premium/new-chat.svg[New Chat icon,24px] **New Chat** button at the top-right corner of the chat panel. + +[[web-search]] +=== Web search + +Web search in Chat allows the AI to access and retrieve real-time information from the internet. Instead of relying only on pre-trained knowledge, the model can search the web to find up-to-date facts, verify details, and provide more accurate, current answers. + +Some models use web search automatically, while others may require manual activation. Whether the "Enable web search" button image:icons-premium/web-search.svg[Web search icon,24px] below the prompt input needs to be toggled depends on the model and sometimes even how the prompt is worded. For models that support web search, use the toggle button to enable it. + +[[reasoning]] +=== Reasoning + +Reasoning in Chat models turns on the ability to think through problems, draw logical conclusions, and make sense of complex information. It enables the model to analyze context, connect ideas, and produce well-structured, coherent answers beyond simple pattern matching. + +Some models use reasoning automatically, while others may require manual activation. Whether the "Enable reasoning" button image:icons-premium/reasoning.svg[Reasoning icon,24px] below the prompt input needs to be toggled depends on the model and sometimes even how the prompt is worded. For models that support reasoning, use the toggle button to enable it. + +[[model-selection-configuration]] +=== Configuration + +Model selection for AI chat can be configured using two configuration options: + +* `tinymceai_default_model`: Set the default model to use for AI chat. +* `tinymceai_allow_model_selection`: Control whether users can select from available models (defaults to `true`). + +xref:tinymceai-models.adoc#supported-models-table[Learn more about available AI models]. + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_default_model: 'claude-3-5-haiku', + tinymceai_allow_model_selection: true, + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + } +}); +---- + +[[adding-context-to-conversations]] +== Adding context to conversations + +The AI chat can work with the document and beyond. Use the "Add context" image:icons/plus.svg[Add context icon,24px] button below the prompt input to add URLs, files, and external resources to the conversation. + +image::https://placehold.net/default.png[{pluginname} Chat add context user interface] + +Ask the AI about specific resources, for instance, _"Describe the attached image"_ or _"Summarize the key points from the attached Word document"_. The AI will analyze those resources and provide information that can be easily used in the document. + +External resources enable seamless integration of knowledge bases and other centralized data into AI chat conversations. Instead of uploading documents each time, they can be selected from a list and referenced during the conversation. + +[[context-configuration]] +=== Configuration + +Built-in options for adding the current document, URLs, and files to the conversation context are always available to users. There is no configuration option to enable or disable these built-in options. + +To add custom external sources for users to select from, use the following configuration options: + +* `tinymceai_chat_fetch_sources`: A function that returns a promise resolving to an array of available external sources. This is typically used to fetch a list of resources from a database or external API. +* `tinymceai_chat_fetch_source`: A function that retrieves the content of a specific source by ID. This is used for hooking into a repository of custom sources and fetching content on demand. + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_chat_fetch_sources: async () => [ + { + label: 'My Documents', + sources: [ + { id: 'doc-1', label: 'Document 1', type: 'file' }, + { id: 'url-1', label: 'Web Page', type: 'web-resource' } + ] + } + ], + tinymceai_chat_fetch_source: async (id) => { + const res = await fetch(`/api/documents/\$\{id\}`); + const blob = await res.blob(); + const filename = `\$\{id\}.pdf`; + return { type: 'file', file: new File([blob], filename, { type: blob.type }) }; + }, + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + } +}); +---- + +[[working-with-ai-generated-changes]] +== Working with AI-generated changes + +When asking the AI for changes to the document, for instance, _"Bold key facts in the document"_, the AI proposes a series of changes. The changes are displayed directly in the document content, making it easy to see what will be modified. + +[NOTE] +==== +AI output may need review. The chat interface displays this reminder below the prompt input. +==== + +[[previewing-changes]] +=== Previewing changes + +A review bar appears at the bottom of the editor with **Diff mode** and **Preview** tabs. Toggle between them to show proposed changes inline (with markers for additions, removals, and formatting) or to preview the final result. When Diff mode is enabled, the proposed changes are highlighted in the document with markers indicating additions (green), removals (red), and formatting changes (blue). Use the arrows in the suggestion overlay to navigate through the changes. The overlay automatically follows the corresponding document sections as each suggestion is selected. + +[[applying-changes]] +=== Applying changes + +Click the checkmark image:icons/checkmark.svg[Accept suggestion icon,24px] in the suggestion overlay to accept the current change. Use the arrow buttons to move between suggestions. + +image::https://placehold.net/default.png[{pluginname} Chat apply changes] + +Click **Apply pending** in the review bar at the bottom of the editor to apply all remaining suggestions at once. The button shows the number of pending changes, for example, "Apply pending (4)". + +image::https://placehold.net/default.png[{pluginname} Chat apply all changes] + +[[rejecting-suggestions]] +=== Rejecting suggestions + +Click the image:icons/close.svg[Reject suggestion icon,24px] in the suggestion overlay to reject the current suggestion. Click **Skip pending** in the review bar at the bottom of the editor to skip all remaining suggestions. + +image::https://placehold.net/default.png[{pluginname} Chat reject button] + + +[[chat-history]] +== Chat history + +All past conversations appear in the Chat history. Click the button image:icons/restore-draft.svg[Chat history icon,24px] in the chat header to open the list. Click a conversation to reopen it, or use the menu on each entry to pin, rename, or delete it. Click **Go to AI Chat** to return from the history view to the active conversation. + +Conversations are grouped by date to help navigate the history. Conversations can be filtered by name using the search field at the top of the user interface. + +image::https://placehold.net/default.png[AI Chat history] + +[NOTE] +==== +Any conversation from the chat history can be continued as long as the AI model used for that conversation is xref:tinymceai-models.adoc#supported-models[still supported] by the feature. Click the conversation in the history to load it in the Chat interface. +==== + +[NOTE] +==== +The ability to apply suggestions to the document or generate Suggested Edits from historical conversations may be restricted in some scenarios: + +After closing the browser and reopening AI chat, previous conversations will no longer interact with the document content. To continue working with a conversation, reopen it from the chat history. +==== + +[[conversations-api]] +== Conversations API + +The Chat plugin feature is built on top of the Conversations API, which provides REST API access to conversation functionality. Conversations support exchanging multiple messages with the AI, which maintains them in context. Conversations can be extended by external context sources like websites or files, and have the ability to refer to editor content and suggest modifications. + +[[conversations-key-features]] +=== Key Features + +The API supports uploading PDFs, Word docs, and images for the AI to read and understand. Ask questions about specific sections and get intelligent answers. The AI extracts text while preserving structure from PDFs, maintains formatting context from Word documents, parses web content from HTML files, and processes images with OCR and object recognition. + +Each conversation builds on previous messages, so the AI keeps track of the entire discussion and any files that have been shared. Documents, images, web links, and text can be mixed in one conversation, and the AI connects information across all formats. + +[[example-product-launch-workflow]] +=== Example: Product Launch Workflow + +. **Upload product spec** → _"What are the key features for marketing?"_ +. **Add competitor analysis** → _"How do we compare to competitors?"_ +. **Reference blog post** → _"Write a press release using this blog post and our competitive advantages"_ +. **Include brand guidelines** → _"Match our brand voice and key messaging"_ + +The AI remembers everything that has been shared and builds on it throughout the conversation. + +[[conversations-api-capabilities]] +=== API Capabilities + +When using the Conversations API directly, advanced capabilities can be configured: + +* **Web Search**: Enable real-time web search to access current information during conversations. Configure using the `webSearch` capability in API requests. See https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Web-Resources[Conversation Web Resources API] for endpoint details. +* **Reasoning**: Enable step-by-step reasoning to see the AI's problem-solving process. Configure using the `reasoning` capability in API requests. See https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Messages[Conversation Messages API] for endpoint details. + +[[conversations-streaming]] +=== Streaming Responses + +Conversations use Server-Sent Events (SSE) for real-time streaming responses. See the xref:tinymceai-streaming.adoc[Streaming Responses guide] for detailed implementation information and code examples. + +[[conversations-api-reference]] +=== API Reference + +For complete API documentation including endpoints, parameters, request/response schemas, and interactive examples, see: + +* **https://tinymceai.api.tiny.cloud/docs#tag/Conversations[REST API Conversations Documentation]**: Full documentation for conversations endpoints with interactive examples + +The REST API documentation includes examples for: + +* Creating conversations: see https://tinymceai.api.tiny.cloud/docs#tag/Conversations[Conversations API] +* Uploading documents: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Documents[Conversation Documents API] +* Uploading files: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Files[Conversation Files API] +* Uploading web resources: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Web-Resources[Conversation Web Resources API] +* Sending messages with context: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Messages[Conversation Messages API] +* Configuring web search capabilities: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Web-Resources[Conversation Web Resources API] +* Configuring reasoning capabilities: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Messages[Conversation Messages API] +* Streaming responses: see https://tinymceai.api.tiny.cloud/docs#tag/Conversation-Messages[Conversation Messages API] + +[[related-features]] +== Related Features + +* xref:tinymceai-review-plugin.adoc[AI review]: For content quality analysis and improvement suggestions. +* xref:tinymceai-actions-plugin.adoc[Quick actions]: For fast, stateless content transformations. diff --git a/modules/ROOT/pages/tinymceai-integration-options.adoc b/modules/ROOT/pages/tinymceai-integration-options.adoc new file mode 100644 index 0000000000..0d186b7ca1 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-integration-options.adoc @@ -0,0 +1,26 @@ += TinyMCE AI Integration Options + +:navtitle: Integration Options +:pluginname: TinyMCE AI +:description: Choose how to integrate TinyMCE AI with applications +:description_short: Integration options for TinyMCE AI +:keywords: AI, integration, plugin, API, AI service, tinymceai + +{pluginname} can be integrated with applications through two methods: + +[cols=2*a] +|=== + +| +[.lead] +xref:tinymceai.adoc[**Plugin Quick Start**] + +Integrate AI features directly into the TinyMCE editor interface. Works with CDN or self-hosted TinyMCE installations. A quick way to add AI capabilities to the editor. + +| +[.lead] +xref:tinymceai-api-overview.adoc[**AI service**] + +Use the AI service API to build custom integrations and workflows. Suitable for server-side processing, custom UI implementations, and advanced use cases. Start with the xref:tinymceai-api-quick-start.adoc[API Quick Start] guide. + +|=== diff --git a/modules/ROOT/pages/tinymceai-introduction.adoc b/modules/ROOT/pages/tinymceai-introduction.adoc new file mode 100644 index 0000000000..ca7dcee851 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-introduction.adoc @@ -0,0 +1,81 @@ += TinyMCE AI Introduction +:navtitle: Introduction +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: Introduction to TinyMCE AI features and capabilities +:description_short: TinyMCE AI introduction +:keywords: AI, introduction, tinymceai +:page-role: -toc + +By integrating AI writing assistance directly into the editing experience, {pluginname} empowers authors with real-time AI writing support, speeds up content creation, and enhances editorial workflows across a wide range of use cases – from productivity boosts and proof-reading to content quality and consistency. + +[[demo]] +== Demo + +liveDemo::tinymceai[] + +[[what-is-tinymce-ai]] +== What is {pluginname} + +{pluginname} is an AI-powered writing assistant that integrates directly into {productname}, providing instant text rewriting, summarization, correction, and contextual chat help based on organizational style guides. It includes automated review tools and enterprise-ready functionality that integrates with existing systems without requiring custom infrastructure. + +Teams can implement a full suite of AI writing tools quickly, delivering efficient content workflows that maintain brand consistency and integrate smoothly with document management systems. + +The core components of {pluginname} are: + +* **xref:introduction-to-tinymce.adoc[{productname}]**: A modern rich text editor with dozens of features that improve writing workflows, including collaboration. +* **xref:tinymceai-api-overview.adoc[AI service]**: A state-of-the-art back-end AI engine that incorporates multiple models and delivers high-quality content. Currently available in Cloud setup. See xref:tinymceai-introduction.adoc#on-premises-deployment[On-Premises Deployment] for deployment options. + +[[features]] +== {pluginname} features + +There are three main features of {pluginname}. All features can be tested using the free trial. + +* xref:tinymceai-chat.adoc[**Chat**]: Interactive AI chats with history and persistent context. +* xref:tinymceai-review-plugin.adoc[**Review**]: Content analysis and proofreading, optimized for larger content. +* xref:tinymceai-actions-plugin.adoc[**Actions**]: Fast, stateless operations for specific tasks. + +[[integration-options]] +== Integration Options + +{pluginname} can be integrated with applications through two methods: the plugin (for the editor UI) or the AI service API (for custom integrations). See xref:tinymceai-integration-options.adoc[Integration Options] for details. + +[[permissions]] +== Permissions + +Developers can control access to AI features, models, and capabilities based on user roles, subscription tiers, and organizational requirements. Learn more about the xref:tinymceai-permissions.adoc[permissions system]. + +[[privacy-and-data-handling]] +== Privacy and data handling + +[[regional-data-storage]] +=== Regional Data Storage + +All data stored by {pluginname} follows the region settings of the {productname} Cloud Services environment, ensuring compliance with data residency requirements and optimal performance for the geographic location. + +[IMPORTANT] +==== +Data sent to LLM providers for processing is currently processed in the US region, regardless of the Cloud Services environment region. +==== + +[[data-retention-policy]] +=== Data Retention Policy + +Conversation data is automatically deleted after 12 months of inactivity, including: + +* all conversation messages and history, +* attached documents, files, and web resources, +* conversation metadata and settings. + +[[security]] +=== Security + +All data is encrypted in transit and at rest with end-to-end encryption. Conversations and attachments are stored in secure cloud infrastructure with fine-grained access control and comprehensive permission systems. + +[[on-premises-deployment]] +== On-Premises Deployment + +[NOTE] +==== +On-premises deployment is currently in development. Contact support for regular updates. +==== diff --git a/modules/ROOT/pages/tinymceai-jwt-authentication-intro.adoc b/modules/ROOT/pages/tinymceai-jwt-authentication-intro.adoc new file mode 100644 index 0000000000..615251a3c5 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-jwt-authentication-intro.adoc @@ -0,0 +1,261 @@ += TinyMCE AI JWT Authentication + +:navtitle: JWT Authentication +:description: JWT authentication requirements and permissions for TinyMCE AI +:description_short: JWT Authentication +:keywords: AI, JWT, authentication, permissions, tinymceai +:pluginname: TinyMCE AI +:plugincode: tinymceai + +{pluginname} requires JWT (JSON Web Token) authentication when using the Tiny Cloud service. JWT authentication provides secure, user-specific access to {pluginname} features. Each JWT token contains claims that identify the user and specify which AI features they can access. + +{productname} recommends using the libraries listed on link:https://www.jwt.io/libraries[jwt.io/libraries] to create JWT tokens. These libraries support the algorithms required by {pluginname}. For details on supported algorithms, see xref:#supported-algorithms[Supported Algorithms]. + +[[token-endpoint-overview]] +== Token Endpoint Overview + +To connect {productname} with {pluginname}, a token endpoint must be created in the application backend. This guide outlines the principles required to create that endpoint. + +[[how-tinymce-ai-uses-tokens]] +== How {pluginname} Uses Tokens + +To authenticate users, {pluginname} uses tokens. The purpose of tokens is to inform the AI service that the user has access to AI features and which API key the user should connect to. The authenticity of tokens is provided by a digital signature. + +*The token endpoint* is where {productname} makes a request to get the token. It is required to return the token only if the user proves their identity. It should be placed inside the system, not exposed as a public endpoint without proper authentication. + +The following diagram shows how {pluginname} uses tokens: + +image::JWT-flow.svg[JSON Web Token Call Flow,title="JSON Web Token Call Flow"] + +[[jwt-specification]] +== The JSON Web Tokens Specification + +{pluginname} tokens are represented as JSON Web Tokens (JWT). JWT is an open link:https://datatracker.ietf.org/doc/html/rfc7519[standard] (RFC 7519) for transmitting digitally signed information. Using it ensures that the data comes from a trusted source and has not been tampered with. + +A JWT consists of three parts separated by dots `.` + +* **Header**: Contains metadata about the token, including the signing algorithm +* **Payload**: Contains the claims (user information, permissions, and similar) +* **Signature**: Used to verify the token's authenticity + +[source,json] +---- +{header}.{payload}.{signature} +---- + +.Example: +[source,json] +---- +eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTQ4NzI5IiwibmFtZSI6Ikplc3NpY2EgV2lsbGlhbXMiLCJpYXQiOjE3Mjg0NzM2NDJ9.kX9mP2qL8vN4rT7wY3zA5bC6dE1fG2hI3jK4lM5nO6pQ7rS8tU9vW0xY1zA2b +---- + +[[jwt-header]] +=== Header + +The JWT header identifies the token type and specifies the cryptographic algorithm used to sign the token. For {pluginname}, the header must be a JSON object containing: + +* `alg`: The signing algorithm used to create the token signature. See xref:#supported-algorithms[Supported Algorithms] for the list of supported algorithms. {companyname} recommends using `RS256`. +* `typ`: The token type identifier, which must always be `JWT` + +The header is Base64URL-encoded to form the first part of the JWT token. + +.Example header +[source,json] +---- +{ + "alg": "RS256", + "typ": "JWT" +} +---- + +[[jwt-payload]] +=== Payload + +The JWT payload is a JSON object containing claims that identify the user, specify their AI permissions, and control token validity. The payload is Base64URL-encoded to form the second part of the JWT token. + +[[payload-properties]] +==== Payload Properties + +The following properties **must** be included in the payload: + +* `aud`: The API key that has entitlements to use {pluginname}. +* `sub`: The user ID. This should be a unique identifier for the user making the request. This identifier is used to lock down conversation history, AI-generated content, and other user-specific data to individual users, ensuring privacy and data isolation. +* `iat`: "Issued at". Ensure `iat` is present and contains a correct time stated in seconds. Some JWT implementations do not include it by default. Sometimes the system time may also be invalid, causing issues. +* `exp`: Token expiration time. Identifies the expiration time after which the JWT will not be accepted. {pluginname} only accepts tokens no older than 24 hours. This field can be used to shorten the token validity time. +* `auth`: The `auth.ai.permissions` array inside is required. This defines which AI features the user can access. See xref:#permissions[Permissions] below for details. + +The properties that are optional: + +* `user`: User information. Providing `name` and `email` is recommended for better user experience and debugging. + +[[example-token-payload]] +==== Example Token Payload + +The example below presents a complete token payload with access to all AI features: + +[source,json] +---- +{ + "aud": "your-api-key", + "iat": 1511963669, + "exp": 1511967269, + "sub": "user-123", + "user": { + "email": "user@example.com", + "name": "John Doe" + }, + "auth": { + "ai": { + "permissions": [ + "ai:conversations:read", + "ai:conversations:write", + "ai:models:agent", + "ai:actions:system:*", + "ai:reviews:system:*" + ] + } + } +} +---- + +[[permissions]] +==== Permissions + +Permissions are specified in the `auth.ai.permissions` array within the JWT token and control which AI features, models, and capabilities users can access. + +For a complete list of available permissions, permission examples, and best practices, see xref:tinymceai-permissions.adoc[Permissions]. + +For complete details on all required claims, including types, formats, and implementation examples, see: + +* xref:tinymceai-with-jwt-authentication-nodejs.adoc#required-jwt-claims-for-tinymce-ai[Node.js guide - Required JWT claims] +* xref:tinymceai-with-jwt-authentication-php.adoc#required-jwt-claims-for-tinymce-ai[PHP guide - Required JWT claims] + +[[jwt-signature]] +=== Signature + +The signature is created by encoding the header and payload using Base64URL, then signing them with the private key using the specified algorithm. The {pluginname} service verifies the signature using the corresponding public key stored in the {accountpage}. + +[[supported-algorithms]] +=== Supported Algorithms + +{productname} does not support symmetrical encryption algorithms, such as `HS256`. {companyname} recommends using the `RS256` algorithm. The following algorithms are supported: + +* RS256 +* RS384 +* RS512 +* PS256 +* PS384 +* PS512 + +For details on each of these algorithms, visit: link:https://tools.ietf.org/html/rfc7518#section-3[RFC 7518, JSON Web Algorithms (JWA) Section 3 - Cryptographic Algorithms for Digital Signatures and MACs]. + +[[token-requests]] +== Requests to the Token Endpoint + +The token for {pluginname} is requested by the {pluginname} plugin. The easiest way to configure this is to set the `tinymceai_token_provider` option to a function that fetches the token from the endpoint. + +The token endpoint will be requested: +* At editor initialization +* Periodically to refresh the token (typically every hour) + +[[simple-token-request]] +=== Simple Usage + +[source,javascript] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_token_provider: () => { + return fetch('https://example.com/cs-token-endpoint', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }).then(response => response.json()); + }, +}); +---- + +[TIP] +==== +The editor will not be ready to use until the first token is obtained from the token endpoint. If an error occurs during the initial request, the editor will not start correctly. +==== + +For more advanced token request customization, see xref:tinymceai-with-jwt-authentication-nodejs.adoc#configure-tinymce[Configure {productname}] in the implementation guides. + +[[token-responses]] +== Responses from the Token Endpoint + +The token provider must return an object with a `+token+` property: `+{ token: string }+`. The endpoint may respond in either format: + +* **JSON response**: Endpoint returns `+{ "token": "eyJ..." }+`. Use `+response.json()+` and return `+{ token: data.token }+`. +* **Plain text response**: Endpoint returns the raw JWT string. Use `+response.text()+` and return `+{ token }+`. + +.Example: JSON response +[source,json] +---- +{ + "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." +} +---- + +.Example: Plain text response +[source,text] +---- +eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9... +---- + +[[quick-setup]] +== Quick Setup + +To set up JWT authentication for {pluginname}: + +. Generate a public/private key pair and add the public key to the {accountpage} using link:{accountjwturl}[{accountpage} - JWT Keys]. +. Set up a JWT endpoint that generates tokens with the required claims. +. Configure {productname} to use the JWT endpoint through the `tinymceai_token_provider` option. + +For step-by-step implementation instructions with complete code examples, see: + +* xref:tinymceai-with-jwt-authentication-nodejs.adoc[JWT authentication (Node.js)]: Complete Node.js implementation guide +* xref:tinymceai-with-jwt-authentication-php.adoc[JWT authentication (PHP)]: Complete PHP implementation guide + +[[tools]] +== Tools + +JWT tokens can be validated and debugged using the link:https://jwt.io/[jwt.io debugger]. + +[[troubleshooting]] +== Troubleshooting + +[[invalid-token-error]] +=== Invalid token + +If an error message indicates an invalid token: + +* Verify that the token was created in accordance with the required claims and format +* Ensure the API key in the `aud` claim is correct and valid +* Verify that the token is signed with one of the xref:#supported-algorithms[supported algorithms] +* Check that the public key in the {accountpage} matches the private key used to sign the token +* Validate the token structure using the link:https://jwt.io/[jwt.io debugger] +* Ensure the `iat` (issued at) timestamp is correct and not in the future +* Verify that system time is accurate (time drift can cause token validation issues) + +[[insufficient-permissions-error]] +=== Insufficient permissions + +If an error indicates insufficient permissions: + +* Verify that the token includes the `auth.ai.permissions` array with the required permissions +* Check that the permissions match the AI features being accessed +* Review the xref:tinymceai-permissions.adoc[Permissions] guide for the correct permission format +* Ensure permissions are specified correctly (for example, `ai:conversations:read`, `ai:conversations:write`) + +[[related-features]] +== Related Features + +* xref:tinymceai-permissions.adoc[Permissions]: Complete permissions reference and examples. +* xref:tinymceai-models.adoc[AI Models]: Model selection and capabilities. +* xref:tinymceai-chat.adoc[Chat]: Interactive AI discussions. +* xref:tinymceai-review-plugin.adoc[Review]: Content improvement. +* xref:tinymceai-actions-plugin.adoc[Quick Actions]: Content transformation. +* link:https://tinymceai.api.tiny.cloud/docs[API Documentation]: Complete API reference for {pluginname}. diff --git a/modules/ROOT/pages/tinymceai-limits.adoc b/modules/ROOT/pages/tinymceai-limits.adoc new file mode 100644 index 0000000000..023a669f39 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-limits.adoc @@ -0,0 +1,53 @@ += TinyMCE AI Limits + +:navtitle: Limits +:description: Usage limits configuration for TinyMCE AI +:description_short: Usage limits configuration +:keywords: AI, limits, configuration, tinymceai + +This page describes the limits that ensure fair usage, optimal performance, and cost control across all TinyMCE AI features. + +[[overview]] +== Overview + +TinyMCE AI implements various limits to ensure fair usage, optimal performance, and cost control. These include rate limits for API requests, context limits for content size and processing, model-specific constraints, and file restrictions. + +[[rate-limits]] +== Rate Limits + +Rate limits control the frequency of requests to prevent abuse and ensure service stability. These limits apply to both plugin usage and direct API calls, as the plugin uses the API under the hood. The service implements limits on requests, token usage, web search, and web scraping requests per minute. All rate limits are applied at both organization level (higher limits) and individual user level (lower limits) to ensure fair usage. + +NOTE: Specific rate limit values are subject to change and may vary based on the subscription tier. Contact support for current rate limit details for the environment. + +[[context-limits]] +== Context Limits + +Context limits control how much content can be attached to conversations to ensure AI models can process all information effectively. These limits vary by model based on their specific capabilities and processing requirements. + +[[file-limits]] +=== File Limits + +Files are limited to 7MB each (PDF, DOCX, PNG, JPEG, Markdown, HTML, Plain text). Up to 100 files can be uploaded per conversation with a total size limit of 30MB. PDF files are limited to 100 pages total across all PDFs in a conversation. + +[[model-specific-file-limits]] +==== Model-specific file limits + +Anthropic and agent models may use files up to 5MB each. + +[[context-optimization-tips]] +=== Context Optimization Tips + +Compress images and split large documents into smaller sections. Use text formats (TXT or MD) over PDF when possible for better processing. Attach only relevant files to conversations and provide document summaries for very large files. + +[[model-specific-limits]] +== Model-Specific Limits + +Different AI models have varying capabilities and limitations that affect context processing. Each model has different context window sizes that determine how much content can be processed. Models have response timeouts, file processing timeouts, web resource timeouts, and streaming response limits. All models include content moderation for inappropriate content, safety checks, and moderation response time limits. + +[[next-steps]] +== Next Steps + +* xref:tinymceai-models.adoc[Learn about AI Models] for model-specific limitations. +* xref:tinymceai-permissions.adoc[Set up Permissions] to control user access. +* xref:tinymceai-chat.adoc[Explore Chat] for context management. +* https://tinymceai.api.tiny.cloud/docs[API Documentation]: Complete API reference for TinyMCE AI. diff --git a/modules/ROOT/pages/tinymceai-models.adoc b/modules/ROOT/pages/tinymceai-models.adoc new file mode 100644 index 0000000000..1e5d645f8a --- /dev/null +++ b/modules/ROOT/pages/tinymceai-models.adoc @@ -0,0 +1,314 @@ += TinyMCE AI Models + +:navtitle: AI Models +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: AI model configuration for TinyMCE AI +:description_short: AI model configuration +:keywords: AI, models, configuration, tinymceai + +{pluginname} supports multiple AI models from different providers. Model selection and configuration can be done through the plugin UI or through the REST API. This page covers model capabilities, configuration options, and limitations that apply to both plugin and API usage. + +[[recommended-agent-models]] +== Recommended: Agent Models + +The `agent-1` model automatically selects the best AI model for requests based on speed, quality, and cost. It is the recommended choice for most use cases as it optimizes performance and cost automatically. + +[[available-models]] +== Available Models + +{pluginname} supports multiple AI models from different providers. Each model has unique capabilities, performance characteristics, and cost profiles. By default, the automatically selected model (`agent-1`) will be used for optimal cost and performance. + +[[supported-models-table]] +=== Supported Models + +The following is a detailed list of available models with their capabilities: + +[cols="1,2,1,1,2"] +|=== +|Model |Description |xref:tinymceai-chat.adoc#web-search[Web Search] |xref:tinymceai-chat.adoc#reasoning[Reasoning] |Configuration id + +|**Auto (default)** +|Automatically selects best model for speed, quality, and cost. +|Yes +|Yes +|`'auto'` (also `'agent-1'`, learn more about xref:tinymceai-models.adoc#model-compatibility-versions[compatibility versions]) + +|**GPT-5.2** +|OpenAI's flagship model for advanced reasoning, creativity, and complex tasks +|Yes +|Yes +|`'gpt-5.2'` + +|**GPT-5.1** +|OpenAI's flagship model for advanced reasoning, creativity, and complex tasks +|Yes +|Yes +|`'gpt-5.1'` + +|**GPT-5** +|OpenAI's flagship model for advanced reasoning, creativity, and complex tasks +|Yes +|Yes +|`'gpt-5'` + +|**GPT-5 Mini** +|A lightweight version of GPT-5: faster, more cost-efficient +|Yes +|Yes +|`'gpt-5-mini'` + +|**Claude 4.5 Haiku** +|Cost-efficient model for quick interactions with improved reasoning +|Yes +|Yes +|`'claude-4-5-haiku'` + +|**Claude 4.5 Sonnet** +|Advanced model with improved creativity, reliability, and reasoning +|Yes +|Yes +|`'claude-4-5-sonnet'` + +|**Gemini 3 Pro** +|Google's advanced model for versatile problem-solving and research +|Yes +|Yes +|`'gemini-3-pro'` + +|**Gemini 3 Flash** +|Lightweight Gemini model for fast, cost-efficient interactions +|Yes +|Yes +|`'gemini-3-flash'` + +|**Gemini 2.5 Flash** +|Lightweight Gemini model for fast, cost-efficient interactions +|Yes +|Yes +|`'gemini-2-5-flash'` + +|**GPT-4.1** +|OpenAI's model for reliable reasoning, speed, and versatility +|Yes +|No +|`'gpt-4.1'` + +|**GPT-4.1 Mini** +|A lighter variant of GPT-4.1 that balances speed and cost while maintaining solid accuracy +|Yes +|No +|`'gpt-4.1-mini'` +|=== + +[[limitations]] +=== Limitations + +Model availability depends on the subscription tier and service compatibility version. Some models may have specific limitations or requirements. + +[[how-model-selection-works]] +== How Model Selection Works + +The agent model (`agent-1`) automatically selects the best underlying model based on: + +* **Request complexity**: Simple queries use faster, cost-effective models +* **Content size**: Larger content uses models with better context windows +* **Required capabilities**: Web search and reasoning require compatible models +* **Cost optimization**: Balances quality with cost efficiency + +[[model-configuration]] +=== Model Configuration + +Models can be configured in two ways: + +* **Plugin Configuration**: Use `tinymceai_default_model` and `tinymceai_allow_model_selection` options. See xref:tinymceai-chat.adoc#model-selection-configuration[Chat model configuration] for details. +* **API Configuration**: Specify the model directly in API requests for more control. See xref:tinymceai-models.adoc#api-examples[API Examples] below. + +[[model-compatibility-versions]] +== Model Compatibility Versions + +Models are organized by compatibility versions to ensure API stability. When new models are introduced or existing models are updated, they may be added to a new compatibility version. + +[[how-it-works]] +=== How It Works + +Compatibility versions allow {pluginname} to introduce new models and capabilities without breaking existing integrations. Each version maintains a stable set of models and capabilities. + +[[checking-compatibility]] +=== Checking Compatibility + +To see available models for a compatibility version: + +* **Through the API**: Check the `/v1/models` endpoint. The API response includes model capabilities, limits, and availability. +* **Through the plugin**: Available models are shown in the model selection dropdown when `tinymceai_allow_model_selection` is enabled. + +[[model-capabilities]] +== Model Capabilities + +Different models support different capabilities (such as web search and reasoning). Check the model information through the API endpoint or the plugin model selection UI to see which capabilities are available for each model. + +[[web-search]] +=== Web Search + +Enable real-time web search to access current information during conversations. Not all models support web search. Check model capabilities to see which models support this feature. + +[[reasoning]] +=== Reasoning + +Enable step-by-step reasoning to see the AI's problem-solving process. Some models have reasoning always enabled and cannot be turned off. + +**Always-on reasoning models:** + +* Reasoning is always active during inference. +* Reasoning cannot be turned off through the API. + +To determine if a model has always-on reasoning, check the API response when listing models or refer to the model capabilities in the plugin UI. Models with mandatory reasoning will indicate this in their capability structure. + +NOTE: Model names such as `gpt-5`, `claude-4-sonnet`, and similar are examples. Actual available models depend on the service compatibility version. Use the `/v1/models` API endpoint or check the plugin model selection dropdown to see current available models for the environment. + +[[web-scraping]] +=== Web Scraping + +Web scraping extracts and processes content from web pages so the AI can analyze and summarize it. + +[[model-limitations]] +== Model Limitations + +[[file-processing-limits]] +=== File Processing Limits + +Files are limited to 7MB each (PDF, DOCX, PNG, JPEG, Markdown, HTML, Plain text). Up to 100 files can be uploaded per conversation with a total size limit of 30MB. PDF files are limited to 100 pages total across all PDFs in a conversation. + +[[model-specific-file-limits]] +==== Model-specific file limits + +Anthropic and agent models may use files up to 5MB each. + +[[content-moderation]] +=== Content Moderation + +All models include moderation for inappropriate content, harmful instructions, personal information, copyrighted material, misinformation, sensitive topics, and security threats. + +[[model-descriptions]] +=== Model Descriptions + +Model descriptions returned by the API are provided in English and may be updated over time to reflect model improvements or capability changes. + +[[translation-and-localization]] +=== Translation and Localization + +NOTE: Back-end translation handling for model descriptions is planned in a future release. Until then, use the approach described below. + +If the application requires translated model descriptions (the text returned by the API for each model), maintain a translation map in the code keyed by `model.id`, with fallback to the English description from the API for unknown models. This allows new models to work immediately while translations are added at a custom pace. + +[[model-deprecation]] +=== Model Deprecation + +Models scheduled for removal will include a `removal` field with an ISO 8601 date (for example, `"removal": "2025-11-17T00:00:00.000Z"`). When a model is removed, API requests will fail with error code `MODEL_NOT_FOUND` and the models endpoint will stop returning that particular model. + +[[api-examples]] +== API Examples + +The following examples show how to configure models when using the REST API directly. For plugin configuration, see xref:tinymceai-chat.adoc#model-selection-configuration[Chat model configuration]. + +[[model-selection]] +=== Model Selection + +[source,http] +---- +POST /v1/conversations/my-conversation-123/messages +Content-Type: application/json +Authorization: Bearer + +{ + "prompt": "Analyze this document and provide insights", + "model": "agent-1", + "content": [ + { + "type": "document", + "id": "doc-1234567890123" + } + ] +} +---- + +[[capability-configuration]] +=== Capability Configuration + +[source,http] +---- +POST /v1/conversations/my-conversation-123/messages +Content-Type: application/json +Authorization: Bearer + +{ + "prompt": "Research the latest developments in AI", + "model": "gpt-4o", + "capabilities": { + "webSearch": {}, + "reasoning": {} + } +} +---- + +[[model-information]] +=== Model Information + +Get all available models for compatibility version `1`: + +[source,http] +---- +GET /v1/models/1 +Authorization: Bearer +---- + +Response: + +[source,json] +---- +{ + "items": [ + { + "id": "agent-1", + "name": "Agent", + "provider": "Agent", + "description": "Automatically selects the best model for speed, quality, and cost", + "allowed": true, + "capabilities": { + "webSearch": { + "enabled": true, + "allowed": true + }, + "reasoning": { + "enabled": true, + "allowed": true + } + }, + "limits": { + "maxPromptLength": 30000, + "maxConversationLength": 256000, + "maxFiles": 100, + "maxFileSize": 7000000, + "maxTotalFileSize": 30000000, + "maxTotalPdfFilePages": 100 + } + } + ] +} +---- + +[[api-reference]] +== API Reference + +For complete documentation on model endpoints, compatibility versions, and capability schemas, see: + +* **https://tinymceai.api.tiny.cloud/docs#tag/Models[Models API Reference]**: Full documentation for model listing and configuration. +* **https://tinymceai.api.tiny.cloud/docs[Complete API Documentation]**: Interactive API reference with all {pluginname} endpoints. + +[[related-features]] +== Related Features + +* xref:tinymceai-chat.adoc[Chat]: Use models in interactive AI discussions and configure model selection. +* xref:tinymceai-review-plugin.adoc[Review]: Apply models to content analysis and improvement. +* xref:tinymceai-actions-plugin.adoc[Quick Actions]: Use models for content transformation tasks. +* xref:tinymceai.adoc[Plugin Reference]: Complete plugin configuration options including model settings. \ No newline at end of file diff --git a/modules/ROOT/pages/tinymceai-permissions.adoc b/modules/ROOT/pages/tinymceai-permissions.adoc new file mode 100644 index 0000000000..009a99e93b --- /dev/null +++ b/modules/ROOT/pages/tinymceai-permissions.adoc @@ -0,0 +1,265 @@ += TinyMCE AI JWT Permissions + +:navtitle: Permissions +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: JWT permissions system for TinyMCE AI +:description_short: JWT Permissions +:keywords: AI, JWT, permissions, authentication, tinymceai + +{pluginname} uses a permission-based access control system to manage user access to AI features. Permissions are specified in JWT tokens and control which features, models, and capabilities users can access. + +For information about JWT authentication setup and required claims, see xref:tinymceai-jwt-authentication-intro.adoc[JWT Authentication]. + +[[quick-reference]] +== Quick Reference + +[cols="2,3"] +|=== +|Category |Permissions + +|Admin +|`ai:admin` + +|Models +|`ai:models:*`, `ai:models::*`, `ai:models::`, `ai:models:agent` + +|Conversations +|`ai:conversations:*`, `ai:conversations:read`, `ai:conversations:write`, `ai:conversations:websearch`, `ai:conversations:reasoning` + +|Context +|`ai:conversations:context:*`, `ai:conversations:context:files:*`, `ai:conversations:context:files:`, `ai:conversations:context:urls` + +|Actions +|`ai:actions:*`, `ai:actions:custom`, `ai:actions:system:*`, `ai:actions:system:` + +|Reviews +|`ai:reviews:*`, `ai:reviews:custom`, `ai:reviews:system:*`, `ai:reviews:system:` +|=== + +[[use-cases]] +== Use Cases + +* **Role-based access**: Different user roles have different AI capabilities +* **Cost control**: Limit access to expensive models or features +* **Feature gating**: Enable specific AI features for premium users +* **Security**: Restrict access to sensitive AI operations + +[[permission-format]] +== Permission Format + +Permissions follow a hierarchical format: `ai:::` + +[[admin-permissions]] +== Admin Permissions + +[cols="2,3"] +|=== +|Permission |Description + +|`ai:admin` +|Grants full access to all {pluginname} features, models, and capabilities. Use with caution in production environments. +|=== + +[[model-permissions]] +== Model Permissions + +[cols="2,3"] +|=== +|Permission |Description + +|`ai:models:*` +|Access to all available AI models. Use with caution as this includes access to new models that may be more expensive. + +|`ai:models::*` +|Access to all models from a specific provider (for example, `ai:models:openai:*`, `ai:models:anthropic:*`). + +|`ai:models::` +|Access to a specific model (for example, `ai:models:openai:gpt-4o`, `ai:models:anthropic:claude-3-sonnet`). + +|`ai:models:agent` ⭐ Recommended +|Access to the agent model which automatically selects the best model for each request. This is the recommended permission for most use cases. +|=== + +[[conversation-permissions]] +== Conversation Permissions + +[cols="2,3"] +|=== +|Permission |Description + +|`ai:conversations:*` +|Full access to all conversation features including read, write, web search, and reasoning. + +|`ai:conversations:read` +|Ability to read and list conversations. + +|`ai:conversations:write` +|Ability to create and send messages in conversations. + +|`ai:conversations:websearch` +|Ability to use web search capability in conversations. + +|`ai:conversations:reasoning` +|Ability to use reasoning capability in conversations. +|=== + +[[context-permissions]] +== Context Permissions + +[cols="2,3"] +|=== +|Permission |Description + +|`ai:conversations:context:*` +|Access to all context types (files and URLs). + +|`ai:conversations:context:files:*` +|Access to all file types for context. + +|`ai:conversations:context:files:` +|Access to specific file formats (for example, `ai:conversations:context:files:pdf`, `ai:conversations:context:files:docx`). + +|`ai:conversations:context:urls` +|Ability to use web URLs as context sources. +|=== + +[[actions-permissions]] +== Actions Permissions + +[cols="2,3"] +|=== +|Permission |Description + +|`ai:actions:*` +|Access to all action types, including custom and system actions. + +|`ai:actions:custom` +|Ability to run custom actions with free-form prompts. + +|`ai:actions:system:*` +|Access to all pre-defined system actions. + +|`ai:actions:system:` +|Access to specific system actions. Examples: `ai:actions:system:improve-writing`, `ai:actions:system:fix-grammar`, `ai:actions:system:translate` +|=== + +[[reviews-permissions]] +== Reviews Permissions + +[cols="2,3"] +|=== +|Permission |Description + +|`ai:reviews:*` +|Access to all review types, including custom and system reviews. + +|`ai:reviews:custom` +|Ability to run custom reviews with free-form prompts. + +|`ai:reviews:system:*` +|Access to all pre-defined system reviews. + +|`ai:reviews:system:` +|Access to specific system reviews. Examples: `ai:reviews:system:correctness`, `ai:reviews:system:clarity`, `ai:reviews:system:make-tone-professional` +|=== + +[[permission-examples]] +== Permission Examples + +[[basic-user]] +=== Basic User + +[source,json] +---- +{ + "auth": { + "ai": { + "permissions": [ + "ai:conversations:read", + "ai:conversations:write", + "ai:models:agent", + "ai:conversations:context:files:pdf", + "ai:conversations:context:files:docx" + ] + } + } +} +---- + +[[premium-user]] +=== Premium User + +[source,json] +---- +{ + "auth": { + "ai": { + "permissions": [ + "ai:conversations:*", + "ai:models:*", + "ai:actions:system:*", + "ai:reviews:system:*" + ] + } + } +} +---- + +[[enterprise-admin]] +=== Enterprise Admin + +[source,json] +---- +{ + "auth": { + "ai": { + "permissions": [ + "ai:admin" + ] + } + } +} +---- + +[[restricted-user-review-only]] +=== Restricted User (Review Only) + +[source,json] +---- +{ + "auth": { + "ai": { + "permissions": [ + "ai:reviews:system:correctness", + "ai:reviews:system:clarity", + "ai:models:gpt-4.1-mini" + ] + } + } +} +---- + +[[best-practices]] +== Best Practices + +[[permission-design]] +=== Permission Design + +Begin with minimal, specific permissions based on actual requirements. Use wildcards only for testing environments and power users who need comprehensive access. Gradually expand permissions based on user needs and usage patterns. + +Avoid `ai:models:*` in production to prevent unexpected access to new expensive models. Use provider-specific permissions like `ai:models:openai:*` for better control, or specify exact models for maximum control. Start with common formats (PDF, DOCX, TXT, PNG, JPEG) and add specialized formats only when needed. + +[[error-handling]] +== Error Handling + +When a user lacks required permissions, the API returns a `403 Forbidden` error with the message "No permissions to the resource". Common issues include missing model permissions, file type restrictions, feature access without permission, and action/review access without permission. + +[[related-features]] +== Related Features + +* xref:tinymceai-jwt-authentication-intro.adoc[JWT Authentication]: JWT authentication setup and required claims. +* xref:tinymceai-models.adoc[AI Models]: Model selection and capabilities. +* xref:tinymceai-chat.adoc[Chat]: Interactive AI discussions. +* xref:tinymceai-review-plugin.adoc[Review]: Content improvement. +* xref:tinymceai-actions-plugin.adoc[Quick Actions]: Content transformation. diff --git a/modules/ROOT/pages/tinymceai-privacy.adoc b/modules/ROOT/pages/tinymceai-privacy.adoc new file mode 100644 index 0000000000..d63b40582c --- /dev/null +++ b/modules/ROOT/pages/tinymceai-privacy.adoc @@ -0,0 +1,6 @@ += TinyMCE AI Privacy + +:navtitle: Privacy +:description: Privacy considerations for TinyMCE AI +:description_short: Privacy considerations +:keywords: AI, privacy, data privacy, tinymceai diff --git a/modules/ROOT/pages/tinymceai-rest-api.adoc b/modules/ROOT/pages/tinymceai-rest-api.adoc new file mode 100644 index 0000000000..9924cedfcf --- /dev/null +++ b/modules/ROOT/pages/tinymceai-rest-api.adoc @@ -0,0 +1,7 @@ +:navtitle: REST API Reference +:pluginname: TinyMCE AI += {pluginname} REST API Reference +:plugincode: tinymceai +:description: REST API reference for TinyMCE AI +:description_short: REST API reference +:keywords: AI, REST API, API reference, tinymceai diff --git a/modules/ROOT/pages/tinymceai-review-plugin.adoc b/modules/ROOT/pages/tinymceai-review-plugin.adoc new file mode 100644 index 0000000000..781c05a86a --- /dev/null +++ b/modules/ROOT/pages/tinymceai-review-plugin.adoc @@ -0,0 +1,128 @@ += TinyMCE AI Review +:navtitle: Review +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: AI Review feature for TinyMCE AI plugin +:description_short: AI Review feature +:keywords: AI, review, reviews, tinymceai +:page-role: -toc + +The Review feature provides AI-powered quality assurance for content by running checks for grammar, style, tone, and more. It introduces an intuitive interface for reviewing and managing AI-suggested edits directly within the document, ensuring content meets professional standards with minimal manual effort. + +The Review feature is available as a plugin UI and through the xref:tinymceai-review-plugin.adoc#reviews-api[Reviews API]. This page covers both: + +* Plugin sections describe user-facing features and configuration. +* API sections cover REST API access (starting at xref:tinymceai-review-plugin.adoc#reviews-api[Reviews API]). + +[[demo]] +== Demo + +liveDemo::tinymceai-review[] + +The Review feature analyzes content and provides specific recommendations for grammar, style, clarity, and tone improvements. Unlike Actions that transform content directly, Reviews analyze content and provide suggestions without automatically changing the content. + +image::https://placehold.net/default.png[{pluginname} Review feature showing AI-powered quality assurance and suggested edits] + +[[integration]] +== Integration + +To start using the Review feature, first load the {pluginname} plugin in the editor configuration. The Review Mode button image:icons-premium/ai-review.svg[Review icon,24px] will appear in the AI user interface. See xref:tinymceai.adoc[Plugin Reference] for installation and enabling AI features. + +After picking one of the available commands in the Review Mode tab, the AI will analyze the document and propose a series of suggestions: + +image::https://placehold.net/default.png[{pluginname} Review sidebar with suggestions] + +While in the Review Mode, the editor remains read-only and allows browsing suggestions. Suggestions can be clicked in the sidebar or selected in the editor content (underlined): + +image::https://placehold.net/default.png[{pluginname} Review suggestion in content] + +Review suggestions can be accepted or dismissed by clicking the corresponding buttons. All suggestions can also be accepted using the "Accept all" button at the top of the user interface. Changes can be previewed in the same way as xref:tinymceai-chat.adoc#previewing-changes[Chat suggestions]. Changes that were accepted or dismissed become greyed out in the interface. The review can also be abandoned by clicking the "Exit review" button. + +Once reviewing is complete and all changes are accepted or rejected, click "Finish review" (the button state changes automatically) to return to the normal operation of the editor, where typing is possible. + +[[review-commands]] +== Review commands + +The feature comes with several review commands: + +[cols="1,1,1"] +|=== +|Command name |Command description |Additional information + +|**Proofread** |Check the text for errors in grammar, spelling and punctuation | + +|**Improve clarity** |Improve the logical structure and precision for a clearer message | + +|**Improve readability** |Adjust sentence structure and word choice to improve readability | + +|**Adjust length** |Shorten or lengthen the text as needed |_Longer_ and _Shorter_ options available + +|**Adjust tone and style** |Modify the text to a desired tone and style |Several tone and style options are available: _Casual, Direct, Friendly, Confident, Professional_ +|=== + +[NOTE] +==== +Custom review commands are not supported in the Review feature. Translation is available only through the API. This may change in future updates. +==== + +[[review-configuration]] +== Configuration + +Which review commands appear in the Review sidebar can be configured using the `tinymceai_reviews` option. See xref:tinymceai.adoc#tinymceai_reviews[`tinymceai_reviews`] in the Plugin Reference for details. + +[[reviews-api]] +== Reviews API + +The Review plugin feature is built on top of the Reviews API, which provides REST API access to review functionality. Reviews provide comprehensive content analysis and improvement suggestions. Unlike Actions that transform content directly, Reviews analyze content and provide specific recommendations for grammar, style, clarity, and tone improvements. + +**When to use Reviews vs Actions:** Use Reviews when analyzing entire documents for quality improvements and getting suggestions without automatically changing the content. Use Actions when transforming specific text content (fix grammar, translate, adjust tone). + +Reviews use streaming output with Server-Sent Events for real-time feedback as suggestions are generated. Each review type is optimized for specific improvement tasks, providing consistent, high-quality analysis of text structure, style, and quality. Reviews provide specific, actionable recommendations for content improvement. + +[[reviews-system-reviews-api]] +=== System Reviews + +{pluginname} provides built-in system reviews for comprehensive content analysis through the API. These correspond to the review commands available in the plugin UI: + +* **Correctness** (corresponds to "Proofread" in plugin): Fix grammar, spelling, and factual errors. See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the correctness endpoint. +* **Clarity** (corresponds to "Improve clarity" in plugin): Improve sentence structure, word choice, and logical flow. See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the clarity endpoint. +* **Readability** (corresponds to "Improve readability" in plugin): Enhance paragraph structure, transitions, and reading level. See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the readability endpoint. +* **Length Optimization** (corresponds to "Adjust length" in plugin): Expand or condense content while preserving key information. See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the length optimization endpoint. +* **Tone Adjustment** (corresponds to "Adjust tone and style" in plugin): Modify tone to casual, direct, friendly, confident, or professional styles. See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for tone adjustment endpoints. +* **Translation**: Translate content between languages with cultural adaptation. (Note: Translation is not currently available in the plugin UI, but is available through the API.) See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the translation endpoint. + +[[reviews-custom-reviews]] +=== Custom Reviews + +In addition to system reviews, custom reviews can be created tailored to specific content quality standards and editorial guidelines. Custom reviews allow defining specialized analysis criteria using custom prompts to control the review behavior. + +Unlike system reviews that use predefined identifiers, custom reviews use a unified endpoint where the analysis behavior is defined through a prompt parameter. See https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] for the custom reviews endpoint and implementation details. + +Custom reviews require the `ai:reviews:custom` permission in the JWT token. + +[[reviews-streaming]] +=== Streaming Responses + +Reviews use Server-Sent Events (SSE) for real-time streaming results. See the xref:tinymceai-streaming.adoc[Streaming Responses guide] for detailed implementation information. + +[[reviews-api-reference]] +=== API Reference + +For complete endpoint documentation, request/response schemas, authentication details, and additional parameters, see: + +* **https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API Reference]**: Full documentation for system and custom reviews endpoints with interactive examples + +The REST API documentation includes examples for: + +* Basic grammar review: see https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] +* Clarity improvement: see https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] +* Tone adjustment: see https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] +* Translation reviews: see https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] +* Custom reviews with custom prompts: see https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] +* Streaming responses: see https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API] + +[[related-features]] +== Related Features + +* xref:tinymceai-chat.adoc[AI chat]: For interactive discussions with document analysis and context. +* xref:tinymceai-actions-plugin.adoc[Quick actions]: For fast, stateless content transformations. diff --git a/modules/ROOT/pages/tinymceai-streaming.adoc b/modules/ROOT/pages/tinymceai-streaming.adoc new file mode 100644 index 0000000000..530b632a21 --- /dev/null +++ b/modules/ROOT/pages/tinymceai-streaming.adoc @@ -0,0 +1,128 @@ += TinyMCE AI Streaming + +:navtitle: Streaming +:pluginname: TinyMCE AI +:plugincode: tinymceai +:description: Streaming configuration for TinyMCE AI +:description_short: Streaming configuration +:keywords: AI, streaming, configuration, tinymceai + +Real-time AI interactions using Server-Sent Events (SSE) for immediate feedback and progressive content generation. + +[[overview]] +== Overview + +{pluginname} services use Server-Sent Events (SSE) to provide real-time streaming responses. This allows users to see AI-generated content as it is being created, providing immediate feedback and enabling interactive experiences. + +[[sse-event-types]] +== SSE Event Types + +Different AI services provide different types of streaming events. For service-specific event details, see: + +* xref:tinymceai-chat.adoc#conversations-streaming[Chat]: Interactive AI discussions with text streaming, web search sources, and reasoning. +* xref:tinymceai-review-plugin.adoc#reviews-streaming[Review]: Content improvement suggestions and review progress. +* xref:tinymceai-actions-plugin.adoc#actions-streaming[Quick Actions]: Content transformations and action progress. + +[[basic-implementation]] +== Basic Implementation + +Here is the standard pattern for consuming SSE streams: + +[source,javascript] +---- +const response = await fetch('/v1/your-endpoint', { + method: 'POST', + headers: { + 'Authorization': 'Bearer ', + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + // Request payload + }) +}); + +const reader = response.body.getReader(); +const decoder = new TextDecoder(); + +while (true) { + const { done, value } = await reader.read(); + if (done) break; + + const chunk = decoder.decode(value); + const lines = chunk.split('\n'); + + for (const line of lines) { + if (line.startsWith('data: ')) { + const data = JSON.parse(line.slice(6)); + + // Handle different event types + // See service-specific guides for detailed event handling: + // - Conversations: text-delta, source, reasoning, modification-delta + // - Reviews: review-delta, review-metadata + // - Actions: modification-delta, action-metadata + + switch (data.event) { + case 'error': + // Handle errors + console.error('Error:', data.data.message); + break; + default: + // Handle all other events + console.log('Event:', data.event, data.data); + } + } + } +} +---- + +[[event-handling-patterns]] +== Event Handling Patterns + +For detailed event handling examples specific to each service, see: + +* xref:tinymceai-chat.adoc#conversations-streaming[Chat]: Text streaming, web search sources, reasoning, and document modifications. +* xref:tinymceai-review-plugin.adoc#reviews-streaming[Review]: Review suggestions and progress tracking. +* xref:tinymceai-actions-plugin.adoc#actions-streaming[Quick Actions]: Content transformations and action progress. + +[[error-handling]] +== Error Handling + +Always handle errors gracefully: + +[source,javascript] +---- +if (data.event === 'error') { + const error = data.data; + console.error('Streaming error:', error.message); + + // Show user-friendly error message + showErrorMessage(error.message); + + // Optionally retry or fallback + if (error.retryable) { + setTimeout(() => retryRequest(), 1000); + } +} +---- + +[[progress-tracking]] +== Progress Tracking + +Use metadata events to show progress. For service-specific progress tracking examples, see the xref:tinymceai-review-plugin.adoc#reviews-streaming[Review streaming] section. + +[[api-reference]] +== API Reference + +For complete documentation on streaming endpoints, event schemas, and error codes, see: + +* **https://tinymceai.api.tiny.cloud/docs[Complete API Documentation]**: Interactive API reference with streaming implementation details. +* **https://tinymceai.api.tiny.cloud/docs#tag/Conversations[Conversations API]**: Streaming events for conversations. +* **https://tinymceai.api.tiny.cloud/docs#tag/Reviews[Reviews API]**: Streaming events for reviews. +* **https://tinymceai.api.tiny.cloud/docs#tag/Actions[Actions API]**: Streaming events for actions. + +[[next-steps]] +== Next Steps + +* xref:tinymceai-chat.adoc[Learn about Chat] for interactive AI discussions. +* xref:tinymceai-review-plugin.adoc[Learn about Review] for content improvement. +* xref:tinymceai-actions-plugin.adoc[Learn about Quick Actions] for content transformation. diff --git a/modules/ROOT/pages/tinymceai-with-jwt-authentication-nodejs.adoc b/modules/ROOT/pages/tinymceai-with-jwt-authentication-nodejs.adoc new file mode 100644 index 0000000000..5f1ed39c1b --- /dev/null +++ b/modules/ROOT/pages/tinymceai-with-jwt-authentication-nodejs.adoc @@ -0,0 +1,235 @@ += {pluginname} with JWT authentication (Node.js) Guide +:plugincode: tinymceai +:pluginname: TinyMCE AI +:navtitle: JWT Authentication setup for TinyMCE AI +:description: Guide on how to setup JWT Authentication with Node.js for TinyMCE AI with TinyMCE +:keywords: jwt, authentication, tinymceai, ai, node.js + +include::partial$auth/tinymceai/nodejs/intro-and-prerequisites.adoc[] + +include::partial$auth/tinymceai/nodejs/initial-project-setup.adoc[] + +== Generate a Public/Private Key Pair + +include::partial$auth/private-public-key-pairs-for-tiny-cloud-services.adoc[] + +== JWT Configuration Requirements + +This section explains what needs to be configured for JWT authentication, whether using a managed service (such as AWS or Azure JWT services) or setting up a manual endpoint. + +For complete information about JWT requirements, claims, and permissions, see xref:tinymceai-jwt-authentication-intro.adoc[JWT Authentication]. + +include::partial$auth/how-jwts-are-used.adoc[] + +=== JWT endpoint requirements + +A JSON Web Token (JWT) endpoint for {pluginname} requires: + +* The endpoint or server accepts a JSON HTTP POST request. +* User authentication: A method of verifying the user, and that they should have access to the {pluginname}. +* The JWTs are generated (signed) using the _private_ key that pairs with the _public_ key provided to link:{accountjwturl}[{accountpage} - JWT Keys]. +* The endpoint or server produces a JSON response with the token. {pluginname} will submit the token with requests to the AI service. + +=== Required JWT claims for {pluginname} + +JSON Web Tokens produced by the JWT endpoint must include the following claims: + +`+aud+` _(required)_:: +*Type:* `+String+` ++ +The `aud` is a case-sensitive string that must match a valid API key that has the {pluginname} plugin enabled. + +`+sub+` _(required)_:: +*Type:* `+String+` ++ +The `sub` claim identifies the user. This should be a unique identifier for the user making the request. + +`+iat+` _(required)_:: +*Type:* `+Number+` ++ +The `iat` represents the issue timestamp, specified as the number of seconds. For example, to set the issue time to the current timestamp, calculate the issue time as the current timestamp divided by 1000. + +.Example +[source,json] +---- +iat: Math.floor(Date.now() / 1000), // Issue timestamp +---- + +`+exp+` _(required)_:: +*Type:* `+Number+` ++ +The `exp` represents the expiration timestamp, specified as the number of seconds. For example, to set a validity period of 10 minutes, calculate the expiration time as the current timestamp plus 600 seconds. + +.Example +[source,json] +---- +exp: Math.floor(Date.now() / 1000) + (60 * 10) // Expiration time (10 minutes) +---- + +`+auth+` _(required)_:: +*Type:* `+Object+` ++ +The `auth` object contains AI-specific permissions that control which features the user can access. + +The following example grants access to conversations, the recommended agent model, and system actions and reviews. See xref:tinymceai-permissions.adoc[Permissions] for the full list of available permissions. + +.Example +[source,json] +---- +auth: { + ai: { + permissions: [ + "ai:conversations:read", + "ai:conversations:write", + "ai:models:agent", + "ai:actions:system:*", + "ai:reviews:system:*" + ] + } +} +---- + +[NOTE] +==== +See xref:tinymceai-permissions.adoc[Permissions] for a complete list of available permissions and best practices for configuring user access. +==== + +== Set up JWT Endpoint + +The following section shows how to create a JWT endpoint manually. If using a managed JWT service (such as AWS or Azure), configure it according to the requirements above and skip to the xref:#configure-tinymce[Configure {productname}] section. + +=== Server Setup (jwt.js) + +In the root directory, copy and paste the server setup code into the `jwt.js` file. + +[source,javascript] +---- +const express = require('express'); // Sets up the web server. +const jwt = require('jsonwebtoken'); // Generates and signs JWTs. +const cors = require('cors'); // Allows cross-origin requests. +const path = require('path'); // Handles file paths. + +const app = express(); +app.use(cors()); + +// Private key (Replace this with the actual key) +const privateKey = ` +-----BEGIN PRIVATE KEY----- +{Your private PKCS8 key goes here} +-----END PRIVATE KEY----- +`; + +app.use(express.static(path.join(__dirname, 'public'))); + +// JWT token generation endpoint +app.post('/jwt', (req, res) => { + const payload = { + aud: 'no-api-key', // Replace with the actual API key + sub: 'user-id', // Replace with actual user identifier + iat: Math.floor(Date.now() / 1000), // Issue timestamp + exp: Math.floor(Date.now() / 1000) + (60 * 10), // Expiration time (10 minutes) + // Permissions control which AI features the user can access. See the Permissions page for full details. + auth: { + ai: { + permissions: [ + 'ai:conversations:read', + 'ai:conversations:write', + 'ai:models:agent', + 'ai:actions:system:*', + 'ai:reviews:system:*' + ] + } + } + }; + + try { + // Tokens are signed with the RS256 algorithm using the private key + const token = jwt.sign(payload, privateKey, { algorithm: 'RS256' }); + res.json({ token }); + } catch (error) { + res.status(500).send('Failed to generate JWT token.'); + console.error(error.message); + } +}); + +const PORT = 3000; +app.listen(PORT, () => { + console.log(`Server running at http://localhost:${PORT}`); +}); +---- + +[NOTE] +==== +The JWT payload includes an `auth.ai.permissions` array that defines what AI features the user can access. Adjust these permissions based on requirements. See xref:tinymceai-permissions.adoc[Permissions] for more details on available permissions. +==== + +== Configure {productname} + +[[configure-tinymce-nodejs]] +=== Web Page (public/index.html) + +Inside the `public` folder where the `index.html` file was created, add the HTML setup code. + +[source,html] +---- + + + + {productname} with {pluginname} + + + + +

{pluginname} Demo

+ + + +---- + +[[model-configuration]] +=== Model configuration + +Model selection can be configured using `tinymceai_default_model` and `tinymceai_allow_model_selection`. See xref:tinymceai-chat.adoc#model-selection-configuration[Chat model configuration] for details. Model access is controlled by JWT permissions; see xref:tinymceai-permissions.adoc#model-permissions[Model permissions] for available model permissions and xref:tinymceai-models.adoc[AI Models] for the list of available models. + +.Example: Adding model options to the JWT setup +[source,html] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_default_model: 'agent-1', + tinymceai_allow_model_selection: true, + // This demo does not verify user session; it simulates an already-authenticated user. Integrate with your auth before returning tokens. + tinymceai_token_provider: () => { + return fetch('http://localhost:3000/jwt', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }).then(response => response.json()); + }, +}); +---- + +== Configuration and Running + +include::partial$auth/tinymceai/nodejs/configuration-steps.adoc[] diff --git a/modules/ROOT/pages/tinymceai-with-jwt-authentication-php.adoc b/modules/ROOT/pages/tinymceai-with-jwt-authentication-php.adoc new file mode 100644 index 0000000000..fa8fe2157b --- /dev/null +++ b/modules/ROOT/pages/tinymceai-with-jwt-authentication-php.adoc @@ -0,0 +1,238 @@ += {pluginname} with JWT authentication (PHP) Guide +:navtitle: JWT Authentication setup for TinyMCE AI +:description: Guide on how to setup JWT Authentication with PHP for TinyMCE AI with TinyMCE +:keywords: jwt, authentication, tinymceai, ai, php +:pluginname: TinyMCE AI +:plugincode: tinymceai + +include::partial$auth/tinymceai/php/intro-and-prerequisites.adoc[] + +include::partial$auth/tinymceai/php/initial-project-setup.adoc[] + +== Generate a Public/Private Key Pair + +include::partial$auth/private-public-key-pairs-for-tiny-cloud-services.adoc[] + +== JWT Configuration Requirements + +This section explains what needs to be configured for JWT authentication, whether using a managed service (such as AWS or Azure JWT services) or setting up a manual endpoint. + +For complete information about JWT requirements, claims, and permissions, see xref:tinymceai-jwt-authentication-intro.adoc[JWT Authentication]. + +include::partial$auth/how-jwts-are-used.adoc[] + +=== JWT endpoint requirements + +A JSON Web Token (JWT) endpoint for {pluginname} requires: + +* The endpoint or server accepts a JSON HTTP POST request. +* User authentication: A method of verifying the user, and that they should have access to the {pluginname}. +* The JWTs are generated (signed) using the _private_ key that pairs with the _public_ key provided to link:{accountjwturl}[{accountpage} - JWT Keys]. +* The endpoint or server produces a JSON response with the token. {pluginname} will submit the token with requests to the AI service. + +=== Required JWT claims for {pluginname} + +JSON Web Tokens produced by the JWT endpoint must include the following claims: + +`+aud+` _(required)_:: +*Type:* `+String+` ++ +The `aud` is a case-sensitive string that must match a valid API key that has the {pluginname} plugin enabled. + +`+sub+` _(required)_:: +*Type:* `+String+` ++ +The `sub` claim identifies the user. This should be a unique identifier for the user making the request. + +`+iat+` _(required)_:: +*Type:* `+Number+` ++ +The `iat` represents the issue timestamp, specified as the number of seconds. For example, to set the issue time to the current timestamp, calculate the issue time as the current timestamp divided by 1000. + +.Example +[source,json] +---- +iat: Math.floor(Date.now() / 1000), // Issue timestamp +---- + +`+exp+` _(required)_:: +*Type:* `+Number+` ++ +The `exp` represents the expiration timestamp, specified as the number of seconds. For example, to set a validity period of 10 minutes, calculate the expiration time as the current timestamp plus 600 seconds. + +.Example +[source,json] +---- +exp: Math.floor(Date.now() / 1000) + (60 * 10) // Expiration time (10 minutes) +---- + +`+auth+` _(required)_:: +*Type:* `+Object+` ++ +The `auth` object contains AI-specific permissions that control which features the user can access. + +The following example grants access to conversations, the recommended agent model, and system actions and reviews. See xref:tinymceai-permissions.adoc[Permissions] for the full list of available permissions. + +.Example +[source,json] +---- +auth: { + ai: { + permissions: [ + "ai:conversations:read", + "ai:conversations:write", + "ai:models:agent", + "ai:actions:system:*", + "ai:reviews:system:*" + ] + } +} +---- + +[NOTE] +==== +See xref:tinymceai-permissions.adoc[Permissions] for a complete list of available permissions and best practices for configuring user access. +==== + +== Set up JWT Endpoint + +The following section shows how to create a JWT endpoint manually. If using a managed JWT service (such as AWS or Azure), configure it according to the requirements above and skip to the xref:#configure-tinymce[Configure {productname}] section. + +=== Server Setup (jwt.php) + +In the root directory, copy and paste the server setup code into the `jwt.php` file. + +[source,php] +---- + "JWT auth failed: " . $message))); +} + +// Check for OpenSSL extension +if (!extension_loaded('openssl')) { + fatalError('The openssl extension must be enabled in php.ini.'); +} + +// Enable CORS +header("Access-Control-Allow-Origin: *"); +header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept"); + +// JWT payload +$payload = array( + "aud" => "no-api-key", // Replace with the actual API key + "sub" => "user-id", // Replace with actual user identifier + "iat" => time(), // Issue timestamp + "exp" => time() + 60 * 10, // Expiration time (10 minutes) + // Permissions control which AI features the user can access. See the Permissions page for full details. + "auth" => array( + "ai" => array( + "permissions" => array( + "ai:conversations:read", + "ai:conversations:write", + "ai:models:agent", + "ai:actions:system:*", + "ai:reviews:system:*" + ) + ) + ) +); + +try { + // Tokens are signed with the RS256 algorithm using the private key + $privateKey = << $token)); +} catch (Exception $e) { + fatalError($e->getMessage()); +} +?> +---- + +[NOTE] +==== +The JWT payload includes an `auth.ai.permissions` array that defines what AI features the user can access. Adjust these permissions based on requirements. See xref:tinymceai-permissions.adoc[Permissions] for more details on available permissions. +==== + +== Configure {productname} + +[[configure-tinymce-php]] +=== Web Page (index.html) + +Inside the root directory where the `index.html` file was created, add the HTML setup code. + +[source,html] +---- + + + + {productname} with {pluginname} + + + + +

{pluginname} Demo

+ + + +---- + +[[model-configuration]] +=== Model configuration + +Model selection can be configured using `tinymceai_default_model` and `tinymceai_allow_model_selection`. See xref:tinymceai-chat.adoc#model-selection-configuration[Chat model configuration] for details. Model access is controlled by JWT permissions; see xref:tinymceai-permissions.adoc#model-permissions[Model permissions] for available model permissions and xref:tinymceai-models.adoc[AI Models] for the list of available models. + +.Example: Adding model options to the JWT setup +[source,html] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_default_model: 'agent-1', + tinymceai_allow_model_selection: true, + // This demo does not verify user session; it simulates an already-authenticated user. Integrate with your auth before returning tokens. + tinymceai_token_provider: () => { + return fetch('http://localhost:3000/jwt.php', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + }).then(response => response.json()); + }, +}); +---- + +== Configuration and Running + +include::partial$auth/tinymceai/php/configuration-steps.adoc[] diff --git a/modules/ROOT/pages/tinymceai.adoc b/modules/ROOT/pages/tinymceai.adoc new file mode 100644 index 0000000000..45b7401f7f --- /dev/null +++ b/modules/ROOT/pages/tinymceai.adoc @@ -0,0 +1,141 @@ += TinyMCE AI Plugin +:navtitle: TinyMCE AI +:description: AI-powered features for TinyMCE AI including AI chat, AI review, and quick actions +:description_short: AI-powered features for {productname} +:keywords: AI, artificial intelligence, chat, review, quick actions, tinymceai +:pluginname: TinyMCE AI +:plugincode: tinymceai +:pluginminimumplan: enterpriseplan +:plugincategory: premium +:page-role: -toc + +include::partial$misc/admon-premium-plugin.adoc[] + +The {pluginname} plugin integrates AI-assisted authoring with rich-text editing. Users can interact through Actions, Reviews, or Conversations that can use relevant context from multiple sources. + +[[interactive-example]] +== Interactive example + +liveDemo::{plugincode}[] + +[[basic-setup]] +== Basic setup + +To set up the {pluginname} plugin in {productname}: + +* add `{plugincode}` to the `plugins` option in the editor configuration; +* configure the `tinymceai_token_provider` option to provide authentication tokens (must return `+{ token: string }+`); +* add the AI toolbar buttons to the `toolbar` option. The plugin provides: `+tinymceai-chat+` image:icons-premium/ai-assistant.svg[Chat icon,24px], `+tinymceai-quickactions+` image:icons/ai-prompt.svg[Quick Actions icon,24px], and `+tinymceai-review+` image:icons-premium/ai-review.svg[Review icon,24px]; + +[[minimal-setup]] +=== Minimal setup + +[source,js] +---- +tinymce.init({ + selector: 'textarea', // change this value according to the HTML + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[complete-setup]] +=== Complete setup example + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + content_id: 'document-123', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + }, + tinymceai_sidebar_type: 'static', + tinymceai_default_model: 'agent-1', + tinymceai_allow_model_selection: true, + tinymceai_chat_fetch_sources: async () => [ + { + label: 'My Documents', + sources: [ + { id: 'doc-1', label: 'Document 1', type: 'file' }, + { id: 'url-1', label: 'Web Page', type: 'web-resource' } + ] + } + ], + tinymceai_chat_fetch_source: async (id) => { + const res = await fetch(`/api/documents/\$\{id\}`); + const blob = await res.blob(); + const filename = `\$\{id\}.pdf`; + return { type: 'file', file: new File([blob], filename, { type: blob.type }) }; + }, + tinymceai_quickactions_custom: [ + { title: 'Explain like I am five', prompt: 'Explain the following text in simple terms.', type: 'chat' } + ] +}); +---- + +[[ui-control]] +== UI Control + +The AI interface is toggled through toolbar buttons or menu items. Clicking `+tinymceai-chat+` image:icons-premium/ai-assistant.svg[Chat icon,24px] opens the chat sidebar; clicking again minimizes it (chat history is preserved). Clicking `+tinymceai-review+` image:icons-premium/ai-review.svg[Review icon,24px] opens the review sidebar. + +To toggle sidebars programmatically, use the core `+ToggleSidebar+` command: + +[source,js] +---- +editor.execCommand('ToggleSidebar', false, 'tinymceai-chat'); +editor.execCommand('ToggleSidebar', false, 'tinymceai-review'); +---- + +[[keyboard-shortcuts]] +=== Keyboard shortcuts + +The following keyboard shortcuts are available for the AI interface: + +[cols="2,1,1",options="header"] +|=== +|Action |Windows |macOS +|Open or Close the AI Chat sidebar |Ctrl+J |Cmd+J +|=== + +To show the chat sidebar on load: + +[source,js] +---- +tinymce.init({ + selector: '#editor', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + sidebar_show: 'tinymceai-chat', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[options]] +== Options + +The following configuration options affect the behavior of the {pluginname} plugin. + +include::partial$configuration/tinymceai_options.adoc[leveloffset=+1] + +include::partial$misc/plugin-toolbar-button-id-boilerplate.adoc[] + +include::partial$misc/plugin-menu-item-id-boilerplate.adoc[] + +[[commands]] +== Commands + +The {pluginname} plugin provides the following {productname} commands. + +include::partial$commands/{plugincode}-cmds.adoc[] + + diff --git a/modules/ROOT/pages/uploadcare-image.adoc b/modules/ROOT/pages/uploadcare-image.adoc index 3e3c022665..903545b265 100644 --- a/modules/ROOT/pages/uploadcare-image.adoc +++ b/modules/ROOT/pages/uploadcare-image.adoc @@ -212,7 +212,7 @@ This icon will only appear when the `a11y_advanced_options` configuration option | Revert | -| image:icons/revert.svg[revert.svg] +| image:icons/revert-changes.svg[revert.svg] | Restores the image to its original state by undoing all edits. |=== diff --git a/modules/ROOT/partials/auth/how-jwts-are-used.adoc b/modules/ROOT/partials/auth/how-jwts-are-used.adoc index 5b50ac1b35..811b1a5e6f 100644 --- a/modules/ROOT/partials/auth/how-jwts-are-used.adoc +++ b/modules/ROOT/partials/auth/how-jwts-are-used.adoc @@ -11,4 +11,33 @@ ifeval::["{plugincode}" == "tinydrive"] . If your JWT endpoint authorizes the user, your JWT endpoint will send a JWT to {pluginname}, certifying the user. . When the user makes a request (such as adding or deleting a file), the JWT will be sent with the request to show that the user is authorized. This JWT is verified using the _public_ key stored on the {cloudname} Server. . The {cloudname} Server sends a response, indicating that content submission was successful (or unauthorized if necessary). +endif::[] + +ifeval::["{plugincode}" == "tinymceai"] +. {pluginname} requests a signed JWT on behalf of the user. +. If your JWT endpoint authorizes the user, your JWT endpoint will send a JWT to {pluginname}, certifying the user. +. The JWT includes a `sub` (subject) claim that identifies the user. This user identifier is used to lock down conversation history, AI-generated content, and other user-specific data to individual users, ensuring privacy and data isolation. +. When the user makes a request (such as starting a chat conversation, requesting AI actions, or submitting reviews), the JWT will be sent with the request to show that the user is authorized. This JWT is verified using the _public_ key stored on the AI service. +. The AI service sends a response, indicating that the request was successful (or unauthorized if necessary). +endif::[] + +ifeval::["{plugincode}" == "importword"] +. {pluginname} requests a signed JWT on behalf of the user. +. If your JWT endpoint authorizes the user, your JWT endpoint will send a JWT to {pluginname}, certifying the user. +. When the user makes a request (such as importing a document), the JWT will be sent with the request to show that the user is authorized. This JWT is verified using the _public_ key stored on the {pluginname} Server. +. The {pluginname} Server sends a response, indicating that content submission was successful (or unauthorized if necessary). +endif::[] + +ifeval::["{plugincode}" == "exportword"] +. {pluginname} requests a signed JWT on behalf of the user. +. If your JWT endpoint authorizes the user, your JWT endpoint will send a JWT to {pluginname}, certifying the user. +. When the user makes a request (such as exporting a document), the JWT will be sent with the request to show that the user is authorized. This JWT is verified using the _public_ key stored on the {pluginname} Server. +. The {pluginname} Server sends a response, indicating that content submission was successful (or unauthorized if necessary). +endif::[] + +ifeval::["{plugincode}" == "exportpdf"] +. {pluginname} requests a signed JWT on behalf of the user. +. If your JWT endpoint authorizes the user, your JWT endpoint will send a JWT to {pluginname}, certifying the user. +. When the user makes a request (such as exporting a document), the JWT will be sent with the request to show that the user is authorized. This JWT is verified using the _public_ key stored on the {pluginname} Server. +. The {pluginname} Server sends a response, indicating that content submission was successful (or unauthorized if necessary). endif::[] \ No newline at end of file diff --git a/modules/ROOT/partials/auth/private-public-key-pairs-for-tiny-cloud-services.adoc b/modules/ROOT/partials/auth/private-public-key-pairs-for-tiny-cloud-services.adoc index 5e4b309b95..456d573004 100644 --- a/modules/ROOT/partials/auth/private-public-key-pairs-for-tiny-cloud-services.adoc +++ b/modules/ROOT/partials/auth/private-public-key-pairs-for-tiny-cloud-services.adoc @@ -1,16 +1,20 @@ -The **{pluginname}** Server requires a _public_ key generated from the same _private_ key that will be used on your JSON Web Token (JWT) provider endpoint. The public key(s) stored on the {pluginname} Server are used to ensure that content is sent by authorized users. +The **{pluginname}** Server requires a _public_ key generated from the same _private_ key that will be used on the JSON Web Token (JWT) provider endpoint. The public key(s) stored on the {pluginname} Server are used to ensure that content is sent by authorized users. -There are two methods for generating and adding a public key in the JWT Keys section of your account portal: +There are two methods for generating and adding a public key in the JWT Keys section of the account portal: . Generate New Keypair at link:{accountjwturl}[{accountpage} - JWT Keys] (recommended). . Generate a key pair locally and Import Public Key at link:{accountjwturl}[{accountpage} - JWT Keys]. -== Generate a key pair using the {accountpage} JWT Keys page +=== Generate a key pair using the {accountpage} JWT Keys page The link:{accountjwturl}[{accountpage} - JWT Keys] page provides a "Generate New Keypair" option, providing a quick and secure way of generating the required keys. This will store a copy of the _public_ key, and provide a downloadable file for both the public and private keys. {companyname} does **not store** the _private_ key and the key pair **cannot** be retrieved later. +=== Generate a key pair locally and add it to the account + +This method involves two steps: generating the key pair locally, then adding the public key to the account portal. + [[generate-a-key-pair-locally]] -== Generate a key pair locally +==== Generate a key pair locally When generating a key pair locally, use one of the supported algorithms. include::partial$auth/jwt-supported-algorithms.adoc[] @@ -19,11 +23,11 @@ For instructions on generating a key pair locally, see: xref:generate-rsa-key-pa [[add-a-public-key-to-the-tiny-cloud-api-key]] ifeval::[{numberedHeading} == true] -= 2. Add a public key in the JWT Keys section of your account portal +==== 2. Add a public key in the JWT Keys section of the account portal endif::[] ifeval::[{numberedHeading} != true] -== Add a public key in the JWT Keys section of your account portal +==== Add a public key in the JWT Keys section of the account portal endif::[] -Once a public key has been generated locally, use the "Import Public Key" option in the JWT Keys section of your account portal at: link:{accountjwturl}[{accountpage} - JWT Keys]. +Once a public key has been generated locally, use the "Import Public Key" option in the JWT Keys section of the account portal at: link:{accountjwturl}[{accountpage} - JWT Keys]. diff --git a/modules/ROOT/partials/auth/tinymceai/jwt-setup-tinymceai.adoc b/modules/ROOT/partials/auth/tinymceai/jwt-setup-tinymceai.adoc new file mode 100644 index 0000000000..0f920b3829 --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/jwt-setup-tinymceai.adoc @@ -0,0 +1,86 @@ +[[setting-up-jwt-authentication]] +== Setting up JWT authentication + +To set up JSON Web Token (JWT) authentication for {productname} {pluginname}: + +. Add a public key to the {accountpage}, link:https://www.tiny.cloud/auth/login/[login]. +. Set up a JSON Web Token (JWT) Provider endpoint using link:{accountjwturl}[{accountpage} - JWT Keys] +. Configure {productname} to use the JWT endpoint. + +include::partial$auth/private-public-key-pairs-for-tiny-cloud-services.adoc[] + +[[set-up-a-json-web-token-jwt-endpoint]] +== Set up a JSON Web Token (JWT) endpoint + +include::partial$auth/how-jwts-are-used.adoc[] + +=== JWT endpoint requirements + +A JSON Web Token (JWT) endpoint for {pluginname} requires: + +* The endpoint or server accepts a JSON HTTP POST request. +* User authentication: A method of verifying the user, and that they should have access to the {pluginname}. +* The JWTs are generated (signed) using the _private_ key that pairs with the _public_ key provided to link:{accountjwturl}[{accountpage} - JWT Keys]. +* The endpoint or server produces a response containing the token (JSON or plain text). {pluginname} will submit the token with requests to the AI service. + +=== Required JWT claims for {pluginname} + +JSON Web Tokens produced by the JWT endpoint must include the following claims: + +`+aud+` _(required)_:: +*Type:* `+String+` ++ +The `aud` is a case-sensitive string that must match a valid API key that has the {pluginname} plugin enabled. + +`+sub+` _(required)_:: +*Type:* `+String+` ++ +The `sub` claim identifies the user. This should be a unique identifier for the user making the request. + +`+iat+` _(required)_:: +*Type:* `+Number+` ++ +The `iat` represents the issue timestamp, specified as the number of seconds. For example, to set the issue time to the current timestamp, calculate the issue time as the current timestamp divided by 1000. + +.Example +[source,json] +---- +iat: Math.floor(Date.now() / 1000), // Issue timestamp +---- + +`+exp+` _(required)_:: +*Type:* `+Number+` ++ +The `exp` represents the expiration timestamp, specified as the number of seconds. For example, to set a validity period of 10 minutes, calculate the expiration time as the current timestamp plus 600 seconds. + +.Example +[source,json] +---- +exp: Math.floor(Date.now() / 1000) + (60 * 10) // Expiration time (10 minutes) +---- + +`+auth+` _(required)_:: +*Type:* `+Object+` ++ +The `auth` object contains AI-specific permissions that control which features the user can access. + +.Example +[source,json] +---- +auth: { + ai: { + permissions: [ + "ai:conversations:read", + "ai:conversations:write", + "ai:models:agent", + "ai:actions:system:*", + "ai:reviews:system:*" + ] + } +} +---- + +[NOTE] +==== +See xref:tinymceai-permissions.adoc[Permissions] for a complete list of available permissions and best practices for configuring user access. +==== diff --git a/modules/ROOT/partials/auth/tinymceai/nodejs/configuration-steps.adoc b/modules/ROOT/partials/auth/tinymceai/nodejs/configuration-steps.adoc new file mode 100644 index 0000000000..89580518d4 --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/nodejs/configuration-steps.adoc @@ -0,0 +1,36 @@ +== Configuration Steps + +=== Add API Key + +* Replace `no-api-key` in both files with the actual {productname} API key +* The API key should be the same in both the HTML script source and the JWT payload + +=== Add Private Key + +* Replace the private key placeholder in `jwt.js` with the actual private key +* Make sure it's in `PKCS8` format +* Keep this key secure and never share it publicly + +=== Configure AI Permissions + +* Adjust the `auth.ai.permissions` array in the JWT payload based on requirements +* See xref:tinymceai-permissions.adoc[Permissions] for available permissions and best practices + +=== Configure model selection (optional) + +* Add `tinymceai_default_model` and `tinymceai_allow_model_selection` to the editor config if needed +* See xref:tinymceai-with-jwt-authentication-nodejs.adoc#model-configuration[Model configuration] for details + +=== Running the Project + +. Start the server: ++ +[source,bash] +---- +node jwt.js +---- + +. Open the browser to: `http://localhost:3000` +. The following should be visible: +* The {productname} editor +* AI feature buttons in the toolbar (tinymceai-chat, tinymceai-quickactions, tinymceai-review) diff --git a/modules/ROOT/partials/auth/tinymceai/nodejs/initial-project-setup.adoc b/modules/ROOT/partials/auth/tinymceai/nodejs/initial-project-setup.adoc new file mode 100644 index 0000000000..51213d134e --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/nodejs/initial-project-setup.adoc @@ -0,0 +1,41 @@ +== Quick Start Guide + +If a Node.js project is not already set up, follow the steps below to create a basic environment for integrating TinyMCE AI with JWT authentication. If a project is already configured, skip this section and proceed to the xref:tinymceai-with-jwt-authentication-nodejs.adoc#jwt-configuration-requirements[JWT Configuration Requirements] section. + +=== Project Setup + +[source,bash] +---- +# Create and enter project directory +mkdir tinymce-my-app +cd tinymce-my-app + +# Initialize project +npm init -y + +# Install required packages +npm install express cors jsonwebtoken +---- + +Verify that the `package.json` file now includes the required dependencies. + +=== Create Project Structure + +[source,bash] +---- +# Create the public folder for web files +mkdir public +touch public/index.html +touch jwt.js +---- + +The project should look like this: + +[source] +---- +/tinymce-my-app + /public + index.html (TinyMCE webpage) + jwt.js (Server code) + package.json (Project configuration) +---- diff --git a/modules/ROOT/partials/auth/tinymceai/nodejs/intro-and-prerequisites.adoc b/modules/ROOT/partials/auth/tinymceai/nodejs/intro-and-prerequisites.adoc new file mode 100644 index 0000000000..61af3cafc1 --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/nodejs/intro-and-prerequisites.adoc @@ -0,0 +1,31 @@ +== Introduction + +{pluginname} requires setting up JSON Web Token (JWT) authentication to maintain control over AI feature access. A JWT endpoint generates and provides authorization tokens that verify users are authorized to use AI features, preventing unauthorized access. As a standard web services authorization solution, JWT is documented extensively at link:https://jwt.io/[https://jwt.io/]. {productname} recommends using the libraries listed on link:https://www.jwt.io/libraries[jwt.io/libraries] to create JWT tokens. + +This guide provides a comprehensive walkthrough for integrating {pluginname} with {productname}, including {pluginname} functionality, by using a Node.js server for JWT token generation. It covers project setup, server configuration, and {productname} customization. + +=== What Will Be Built + +Before diving into the technical details, here is what will be achieved with this guide: + +* A working {productname} editor running the {pluginname} plugin +* A secure authentication system using JWT tokens +* A simple Node.js server to handle the authentication + +[TIP] +==== +This guide is designed for developers new to JWT authentication and {productname} integration. +==== + +=== Prerequisites + +Before starting, ensure you have: + +* Node.js installed on the computer (to check, run `node -v` in the terminal) +* A {productname} API key with TinyMCE AI enabled (get one from link:https://www.tiny.cloud/signup[TinyMCE's website]) +* Basic familiarity with the command line + +[IMPORTANT] +==== +Ensure the API key is ready before starting. It will be needed for both the server and client configuration. +==== diff --git a/modules/ROOT/partials/auth/tinymceai/php/configuration-steps.adoc b/modules/ROOT/partials/auth/tinymceai/php/configuration-steps.adoc new file mode 100644 index 0000000000..ea07404a7b --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/php/configuration-steps.adoc @@ -0,0 +1,36 @@ +== Configuration Steps + +=== Add API Key + +* Replace `no-api-key` in both files with the actual {productname} API key +* The API key should be the same in both the HTML script source and the JWT payload + +=== Add Private Key + +* Replace the private key placeholder in `jwt.php` with the actual private key +* Make sure it's in `PKCS8` format +* Keep this key secure and never share it publicly + +=== Configure AI Permissions + +* Adjust the `auth.ai.permissions` array in the JWT payload based on requirements +* See xref:tinymceai-permissions.adoc[Permissions] for available permissions and best practices + +=== Configure model selection (optional) + +* Add `tinymceai_default_model` and `tinymceai_allow_model_selection` to the editor config if needed +* See xref:tinymceai-with-jwt-authentication-php.adoc#model-configuration[Model configuration] for details + +=== Running the Project + +. Start the server: ++ +[source,bash] +---- +php -S localhost:3000 +---- + +. Open the browser to: `http://localhost:3000` +. The following should be visible: +* The {productname} editor +* AI feature buttons in the toolbar (tinymceai-chat, tinymceai-quickactions, tinymceai-review) diff --git a/modules/ROOT/partials/auth/tinymceai/php/initial-project-setup.adoc b/modules/ROOT/partials/auth/tinymceai/php/initial-project-setup.adoc new file mode 100644 index 0000000000..b8f8f89a3c --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/php/initial-project-setup.adoc @@ -0,0 +1,53 @@ +== Update PHP Configuration File + +Use the following command to locate the PHP configuration file: + +[source,bash] +---- +php --ini +---- + +Open the configuration file in a text editor and ensure the following settings are enabled: + +[source,ini] +---- +extension=openssl +extension_dir='ext' +---- + +[TIP] +The path to the extension directory may vary depending on the system. + +== Quick Start Guide + +=== Project Setup + +[source,bash] +---- +# Create and enter project directory +mkdir tinymce-app +cd tinymce-app +# Initialize Composer +composer require firebase/php-jwt +---- + +=== Create Project Structure + +[source,bash] +---- +# Create the public folder for web files +touch index.html +touch jwt.php +---- + +The project should look like this: + +[source] +---- +/tinymce-app + index.html (TinyMCE webpage) + jwt.php (Server code) + composer.json + composer.lock + vendor +---- diff --git a/modules/ROOT/partials/auth/tinymceai/php/intro-and-prerequisites.adoc b/modules/ROOT/partials/auth/tinymceai/php/intro-and-prerequisites.adoc new file mode 100644 index 0000000000..8b2d27940c --- /dev/null +++ b/modules/ROOT/partials/auth/tinymceai/php/intro-and-prerequisites.adoc @@ -0,0 +1,33 @@ +== Introduction + +{pluginname} requires setting up JSON Web Token (JWT) authentication to maintain control over AI feature access. A JWT endpoint generates and provides authorization tokens that verify users are authorized to use AI features, preventing unauthorized access. As a standard web services authorization solution, JWT is documented extensively at link:https://jwt.io/[https://jwt.io/]. {productname} recommends using the libraries listed on link:https://www.jwt.io/libraries[jwt.io/libraries] to create JWT tokens. + +This guide provides a comprehensive walkthrough for integrating {pluginname} with {productname}, including {pluginname} functionality, by using a PHP server for JWT token generation. It covers project setup, server configuration, and {productname} customization. + +=== What Will Be Built + +Before diving into the technical details, here is what will be achieved with this guide: + +* A working {productname} editor running the {pluginname} plugin +* A secure authentication system using JWT tokens +* A simple PHP server to handle the authentication + +[TIP] +==== +This guide is designed for developers new to JWT authentication and {productname} integration. +==== + +=== Prerequisites + +Before starting, ensure you have: + +* PHP installed on the computer (to check, run `php -v` in the terminal) +* OpenSSL installed on the computer (to check, run `openssl version` in the terminal) +* Composer installed on the computer (to check, run `composer -v` in the terminal) +* A {productname} API key with TinyMCE AI enabled (get one from link:https://www.tiny.cloud/signup[TinyMCE's website]) +* Basic familiarity with the command line + +[IMPORTANT] +==== +Ensure the API key is ready before starting. It will be needed for both the server and client configuration. +==== diff --git a/modules/ROOT/partials/commands/tinymceai-cmds.adoc b/modules/ROOT/partials/commands/tinymceai-cmds.adoc new file mode 100644 index 0000000000..b7f011a83c --- /dev/null +++ b/modules/ROOT/partials/commands/tinymceai-cmds.adoc @@ -0,0 +1,19 @@ +[cols="1,3",options="header"] +|=== +|Command name |Description + +|`+ToggleSidebar+` |Core command. Use `+editor.execCommand('ToggleSidebar', false, 'tinymceai-chat')+` or `+editor.execCommand('ToggleSidebar', false, 'tinymceai-review')+` to toggle the AI Chat or AI Review sidebar. +|=== + +.Examples +[source,js] +---- +// Open the AI Chat sidebar +tinymce.activeEditor.execCommand('ToggleSidebar', false, 'tinymceai-chat'); + +// Open the AI Review sidebar +tinymce.activeEditor.execCommand('ToggleSidebar', false, 'tinymceai-review'); + +// Close the current sidebar (pass same ID again to toggle off) +tinymce.activeEditor.execCommand('ToggleSidebar', false, 'tinymceai-chat'); +---- diff --git a/modules/ROOT/partials/configuration/icon_list.adoc b/modules/ROOT/partials/configuration/icon_list.adoc index 17901d0db6..8ef810d54b 100644 --- a/modules/ROOT/partials/configuration/icon_list.adoc +++ b/modules/ROOT/partials/configuration/icon_list.adoc @@ -19,6 +19,7 @@ | `+alt-text+` | image:icons/alt-text.svg[alt-text.svg] | `+alt-text.svg+` | `+arrow-left+` | image:icons/arrow-left.svg[arrow-left.svg] | `+arrow-left.svg+` | `+arrow-right+` | image:icons/arrow-right.svg[arrow-right.svg] | `+arrow-right.svg+` +| `+auto-image-enhancement+` | image:icons/auto-image-enhancement.svg[auto-image-enhancement.svg] | `+auto-image-enhancement.svg+` | `+blur+` | image:icons/blur.svg[blur.svg] | `+blur.svg+` | `+bold+` | image:icons/bold.svg[bold.svg] | `+bold.svg+` | `+bookmark+` | image:icons/bookmark.svg[bookmark.svg] | `+bookmark.svg+` @@ -36,14 +37,14 @@ | `+character-count+` | image:icons/character-count.svg[character-count.svg] | `+character-count.svg+` | `+checklist-rtl+` | image:icons/checklist-rtl.svg[checklist-rtl.svg] | `+checklist-rtl.svg+` | `+checklist+` | image:icons/checklist.svg[checklist.svg] | `+checklist.svg+` -| `+checkmark+` | image:icons/checkmark.svg[checkmark.svg] | `+checkmark.svg+` | `+checkmark-filled+` | image:icons/checkmark-filled.svg[checkmark-filled.svg] | `+checkmark-filled.svg+` +| `+checkmark+` | image:icons/checkmark.svg[checkmark.svg] | `+checkmark.svg+` | `+chevron-down+` | image:icons/chevron-down.svg[chevron-down.svg] | `+chevron-down.svg+` | `+chevron-left+` | image:icons/chevron-left.svg[chevron-left.svg] | `+chevron-left.svg+` | `+chevron-right+` | image:icons/chevron-right.svg[chevron-right.svg] | `+chevron-right.svg+` | `+chevron-up+` | image:icons/chevron-up.svg[chevron-up.svg] | `+chevron-up.svg+` -| `+close+` | image:icons/close.svg[close.svg] | `+close.svg+` | `+close-filled+` | image:icons/close-filled.svg[close-filled.svg] | `+close-filled.svg+` +| `+close+` | image:icons/close.svg[close.svg] | `+close.svg+` | `+code-sample+` | image:icons/code-sample.svg[code-sample.svg] | `+code-sample.svg+` | `+color-levels+` | image:icons/color-levels.svg[color-levels.svg] | `+color-levels.svg+` | `+color-picker+` | image:icons/color-picker.svg[color-picker.svg] | `+color-picker.svg+` @@ -57,7 +58,8 @@ | `+cut-column+` | image:icons/cut-column.svg[cut-column.svg] | `+cut-column.svg+` | `+cut-row+` | image:icons/cut-row.svg[cut-row.svg] | `+cut-row.svg+` | `+cut+` | image:icons/cut.svg[cut.svg] | `+cut.svg+` -| `+default-document-properties+` | image:icons/default-document-properties.svg[default-document-properties.svg] | `+default-document-properties.svg+` +| `+document-gear-properties+` | image:icons/document-gear-properties.svg[document-gear-properties.svg] | `+document-gear-properties.svg+` +| `+document-properties+` | image:icons/document-properties.svg[document-properties.svg] | `+document-properties.svg+` | `+drag+` | image:icons/drag.svg[drag.svg] | `+drag.svg+` | `+dropbox+` | image:icons/dropbox.svg[dropbox.svg] | `+dropbox.svg+` | `+duplicate-column+` | image:icons/duplicate-column.svg[duplicate-column.svg] | `+duplicate-column.svg+` @@ -71,6 +73,7 @@ | `+evernote+` | image:icons/evernote.svg[evernote.svg] | `+evernote.svg+` | `+export-pdf+` | image:icons/export-pdf.svg[export-pdf.svg] | `+export-pdf.svg+` | `+export-word+` | image:icons/export-word.svg[export-word.svg] | `+export-word.svg+` +| `+export+` | image:icons/export.svg[export.svg] | `+export.svg+` | `+exposure+` | image:icons/exposure.svg[exposure.svg] | `+exposure.svg+` | `+fb+` | image:icons/fb.svg[fb.svg] | `+fb.svg+` | `+feedback+` | image:icons/feedback.svg[feedback.svg] | `+feedback.svg+` @@ -95,7 +98,7 @@ | `+horizontal-rule+` | image:icons/horizontal-rule.svg[horizontal-rule.svg] | `+horizontal-rule.svg+` | `+huddle+` | image:icons/huddle.svg[huddle.svg] | `+huddle.svg+` | `+image-decorative+` | image:icons/image-decorative.svg[image-decorative.svg] | `+image-decorative.svg+` -| `+auto-image-enhancement+` | image:icons/auto-image-enhancement.svg[auto-image-enhancement.svg] | `+auto-image-enhancement.svg+` +| `+image-enhancements+` | image:icons/image-enhancements.svg[image-enhancements.svg] | `+image-enhancements.svg+` | `+image-options+` | image:icons/image-options.svg[image-options.svg] | `+image-options.svg+` | `+image+` | image:icons/image.svg[image.svg] | `+image.svg+` | `+import-word+` | image:icons/import-word.svg[import-word.svg] | `+import-word.svg+` @@ -110,10 +113,10 @@ | `+line-height+` | image:icons/line-height.svg[line-height.svg] | `+line-height.svg+` | `+line+` | image:icons/line.svg[line.svg] | `+line.svg+` | `+link+` | image:icons/link.svg[link.svg] | `+link.svg+` -| `+list-bull-default+` | image:icons/list-bull-default.svg[list-bull-default.svg] | `+list-bull-default.svg+` | `+list-bull-circle+` | image:icons/list-bull-circle.svg[list-bull-circle.svg] | `+list-bull-circle.svg+` -| `+list-bull-square+` | image:icons/list-bull-square.svg[list-bull-square.svg] | `+list-bull-square.svg+` +| `+list-bull-default+` | image:icons/list-bull-default.svg[list-bull-default.svg] | `+list-bull-default.svg+` | `+list-bull-disc+` | image:icons/list-bull-disc.svg[list-bull-disc.svg] | `+list-bull-disc.svg+` +| `+list-bull-square+` | image:icons/list-bull-square.svg[list-bull-square.svg] | `+list-bull-square.svg+` | `+list-num-default-rtl+` | image:icons/list-num-default-rtl.svg[list-num-default-rtl.svg] | `+list-num-default-rtl.svg+` | `+list-num-default+` | image:icons/list-num-default.svg[list-num-default.svg] | `+list-num-default.svg+` | `+list-num-lower-alpha-rtl+` | image:icons/list-num-lower-alpha-rtl.svg[list-num-lower-alpha-rtl.svg] | `+list-num-lower-alpha-rtl.svg+` @@ -128,7 +131,8 @@ | `+list-num-upper-roman+` | image:icons/list-num-upper-roman.svg[list-num-upper-roman.svg] | `+list-num-upper-roman.svg+` | `+lock+` | image:icons/lock.svg[lock.svg] | `+lock.svg+` | `+ltr+` | image:icons/ltr.svg[ltr.svg] | `+ltr.svg+` -| `+math+` | image:icons/math-equation.svg[math-equation.svg] | `+math-equation.svg+` +| `+math-equation+` | image:icons/math-equation.svg[math-equation.svg] | `+math-equation.svg+` +| `+mentions+` | image:icons/mentions.svg[mentions.svg] | `+mentions.svg+` | `+minus+` | image:icons/minus.svg[minus.svg] | `+minus.svg+` | `+more-drawer+` | image:icons/more-drawer.svg[more-drawer.svg] | `+more-drawer.svg+` | `+new-document+` | image:icons/new-document.svg[new-document.svg] | `+new-document.svg+` @@ -149,6 +153,7 @@ | `+paste-text+` | image:icons/paste-text.svg[paste-text.svg] | `+paste-text.svg+` | `+paste+` | image:icons/paste.svg[paste.svg] | `+paste.svg+` | `+permanent-pen+` | image:icons/permanent-pen.svg[permanent-pen.svg] | `+permanent-pen.svg+` +| `+photo-filter+` | image:icons/photo-filter.svg[photo-filter.svg] | `+photo-filter.svg+` | `+plus+` | image:icons/plus.svg[plus.svg] | `+plus.svg+` | `+preferences+` | image:icons/preferences.svg[preferences.svg] | `+preferences.svg+` | `+preview+` | image:icons/preview.svg[preview.svg] | `+preview.svg+` @@ -161,7 +166,7 @@ | `+resize-handle+` | image:icons/resize-handle.svg[resize-handle.svg] | `+resize-handle.svg+` | `+resize+` | image:icons/resize.svg[resize.svg] | `+resize.svg+` | `+restore-draft+` | image:icons/restore-draft.svg[restore-draft.svg] | `+restore-draft.svg+` -| `+revert+` | image:icons/revert.svg[revert.svg] | `+revert.svg+` +| `+revert-changes+` | image:icons/revert-changes.svg[revert-changes.svg] | `+revert-changes.svg+` | `+revision-history+` | image:icons/revision-history.svg[revision-history.svg] | `+revision-history.svg+` | `+rotate-left+` | image:icons/rotate-left.svg[rotate-left.svg] | `+rotate-left.svg+` | `+rotate-right+` | image:icons/rotate-right.svg[rotate-right.svg] | `+rotate-right.svg+` @@ -178,9 +183,9 @@ | `+spell-check+` | image:icons/spell-check.svg[spell-check.svg] | `+spell-check.svg+` | `+strike-through+` | image:icons/strike-through.svg[strike-through.svg] | `+strike-through.svg+` | `+subscript+` | image:icons/subscript.svg[subscript.svg] | `+subscript.svg+` -| `+superscript+` | image:icons/superscript.svg[superscript.svg] | `+superscript.svg+` -| `+suggestededits+` | image:icons/suggestededits.svg[suggestededits.svg] | `+suggestededits.svg+` | `+suggestededits-badge+` | image:icons/suggestededits-badge.svg[suggestededits-badge.svg] | `+suggestededits-badge.svg+` +| `+suggestededits+` | image:icons/suggestededits.svg[suggestededits.svg] | `+suggestededits.svg+` +| `+superscript+` | image:icons/superscript.svg[superscript.svg] | `+superscript.svg+` | `+table-caption+` | image:icons/table-caption.svg[table-caption.svg] | `+table-caption.svg+` | `+table-cell-classes+` | image:icons/table-cell-classes.svg[table-cell-classes.svg] | `+table-cell-classes.svg+` | `+table-cell-properties+` | image:icons/table-cell-properties.svg[table-cell-properties.svg] | `+table-cell-properties.svg+` @@ -218,9 +223,9 @@ | `+unlock+` | image:icons/unlock.svg[unlock.svg] | `+unlock.svg+` | `+unordered-list+` | image:icons/unordered-list.svg[unordered-list.svg] | `+unordered-list.svg+` | `+unselected+` | image:icons/unselected.svg[unselected.svg] | `+unselected.svg+` -| `+upload+` | image:icons/upload.svg[upload.svg] | `+upload.svg+` | `+upload-from-device+` | image:icons/upload-from-device.svg[upload-from-device.svg] | `+upload-from-device.svg+` | `+upload-from-link+` | image:icons/upload-from-link.svg[upload-from-link.svg] | `+upload-from-link.svg+` +| `+upload+` | image:icons/upload.svg[upload.svg] | `+upload.svg+` | `+user+` | image:icons/user.svg[user.svg] | `+user.svg+` | `+vertical-align+` | image:icons/vertical-align.svg[vertical-align.svg] | `+vertical-align.svg+` | `+vibrance+` | image:icons/vibrance.svg[vibrance.svg] | `+vibrance.svg+` @@ -231,4 +236,4 @@ | `+warning+` | image:icons/warning.svg[warning.svg] | `+warning.svg+` | `+zoom-in+` | image:icons/zoom-in.svg[zoom-in.svg] | `+zoom-in.svg+` | `+zoom-out+` | image:icons/zoom-out.svg[zoom-out.svg] | `+zoom-out.svg+` -|=== \ No newline at end of file +|=== diff --git a/modules/ROOT/partials/configuration/tinymceai_options.adoc b/modules/ROOT/partials/configuration/tinymceai_options.adoc new file mode 100644 index 0000000000..088a26788f --- /dev/null +++ b/modules/ROOT/partials/configuration/tinymceai_options.adoc @@ -0,0 +1,511 @@ +Configuration options are grouped by the feature they configure. Options in the General section apply to the plugin as a whole or to multiple features. + +[[options-general]] +== General options + +These options apply to the plugin overall or to multiple AI features (Chat, Quick Actions, Review). + +[TIP] +==== +For context toolbar use cases (a toolbar that appears when text is selected), use the xref:quickbars.adoc[Quick Toolbars] plugin and configure `+quickbars_selection_toolbar+` instead. +==== + +[[content_id]] +=== `+content_id+` + +A unique identifier for the document or content being edited. When set, chat history is scoped to this ID, allowing conversations to be preserved and associated with the specific document across sessions. When not set, all conversations are shown regardless of document. + +*Type:* `+String+` + +*Default value:* `+undefined+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + content_id: 'document-123', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_token_provider]] +=== `+tinymceai_token_provider+` + +A function that returns a Promise resolving to an object with a `+token+` property containing the signed JWT token for authenticating with the {pluginname} service. + +The JWT payload must include these required claims: + +* `+iat+`: Issued at time (provided by JWT libraries) +* `+exp+`: Expiration time (tokens cannot exceed 24 hours; 5-15 minutes recommended) +* `+aud+`: The {productname} API key +* `+auth+`: Authentication object (see separate authentication documentation) +* `+sub+`: Unique user ID + +*Type:* `+Function+` (`+() => Promise<{ token: string }>+`) + +*Default value:* `+undefined+` + +For JWT setup and required claims, see xref:tinymceai-jwt-authentication-intro.adoc[JWT Authentication]. + +The token endpoint may return the JWT in different formats. Handle both: + +* **JSON response**: Endpoint returns `+{ "token": "eyJ..." }+`. Use `+fetch(url).then(r => r.json())+`. +* **Plain text response**: Endpoint returns the raw JWT string. Use `+fetch(url).then(r => r.text()).then(token => ({ token }))+`. + +.Example: JSON response from custom endpoint +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_token_provider: () => { + return fetch('/api/tinymceai-token').then(r => r.json()); + } +}); +---- + +.Example: Plain text response from custom endpoint +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.text()).then(token => ({ token })); + } +}); +---- + +[[tinymceai_sidebar_type]] +=== `+tinymceai_sidebar_type+` + +Controls how the AI sidebar is displayed. With `+static+`, the sidebar renders inside the editor. With `+floating+`, it renders in a separate container outside the editor and can be dragged on the page. + +*Type:* `+String+` + +*Possible Values:* `+'static'+`, `+'floating'+` + +*Default value:* `+'static'+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_sidebar_type: 'floating', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[NOTE] +==== +Changing this property dynamically (after the editor has been initialized) is not supported and can result in unpredictable behavior. +==== + +[[tinymceai_default_model]] +=== `+tinymceai_default_model+` + +The default AI model to use when no model is explicitly selected. + +*Type:* `+String+` + +*Default value:* `+undefined+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_default_model: 'gemini-2-5-flash', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_allow_model_selection]] +=== `+tinymceai_allow_model_selection+` + +Whether users can select a different AI model from the chat interface. + +*Type:* `+Boolean+` + +*Possible Values:* `+true+`, `+false+` + +*Default value:* `+true+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_allow_model_selection: false, + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[options-chat]] +== Options for Chat + +These options configure the AI Chat sidebar, where users have interactive conversations with the AI and can add external sources for context. + +[[tinymceai_chat_fetch_sources]] +=== `+tinymceai_chat_fetch_sources+` + +A function that returns a Promise resolving to an array of additional context source groups. Each group has `+label+`, optional `+icon+`, and `+sources+` array. Each source has `+id+`, `+label+`, and `+type+` (`+'web-resource'+` or `+'file'+`). + +*Type:* `+Function+` (`+() => Promise+`) + +*Possible Values:* For source `+type+` property: `+'web-resource'+`, `+'file'+` + +*Default value:* `+() => Promise.resolve([])+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_chat_fetch_sources: async () => [ + { + label: 'My Documents', + icon: 'folder', + sources: [ + { id: 'doc-1', label: 'Document 1', type: 'file' }, + { id: 'url-1', label: 'Web Page', type: 'web-resource' } + ] + } + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_chat_fetch_source]] +=== `+tinymceai_chat_fetch_source+` + +A function that fetches the content for an additional source by ID. Receives the source `+id+` and returns a Promise resolving to the source content (either `+{ type: 'file', file: File }+` or `+{ type: 'web-resource', url: string }+`). + +*Type:* `+Function+` (`+(id: string) => Promise+`) + +*Possible Values:* For return object `+type+` property: `+'file'+`, `+'web-resource'+` + +*Default value:* `+(id) => Promise.resolve(\`Should fetch additional source with given \$\{id\}\`)+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_chat_fetch_sources: async () => [ + { label: 'Docs', sources: [{ id: 'doc-1', label: 'Document 1', type: 'file' }] } + ], + tinymceai_chat_fetch_source: async (id) => { + const res = await fetch(`/api/documents/\$\{id\}`); + const blob = await res.blob(); + const filename = `\$\{id\}.pdf`; + return { type: 'file', file: new File([blob], filename, { type: blob.type }) }; + }, + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_chat_welcome_message]] +=== `+tinymceai_chat_welcome_message+` + +Customises the welcome message displayed in the Chat sidebar when starting a new conversation. + +*Type:* `+String+` + +*Default value:* A default message introducing the AI assistant and its capabilities. + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_chat_welcome_message: '

Welcome! How can I help you today?

', + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[options-quickactions]] +== Options for Quick Actions + +These options configure the Quick Actions menu, which provides one-click AI transformations such as improve writing, fix grammar, translate, and change tone. + +[[tinymceai_quickactions_menu]] +=== `+tinymceai_quickactions_menu+` + +Array of control IDs that define the order of items in the Quick Actions menu. + +*Type:* `+Array+` of `+String+` + +*Default value:* +[source,js] +---- +[ + 'ai-quickactions-chat-prompts', + 'ai-quickactions-improve-writing', + 'ai-quickactions-continue-writing', + 'ai-quickactions-check-grammar', + 'ai-quickactions-change-length', + 'ai-quickactions-change-tone', + 'ai-quickactions-translate', + 'ai-quickactions-custom' +] +---- + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_quickactions_menu: [ + 'ai-quickactions-improve-writing', + 'ai-quickactions-check-grammar', + 'ai-quickactions-custom' + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_quickactions_chat_prompts]] +=== `+tinymceai_quickactions_chat_prompts+` + +Array of control IDs for the Chat Commands submenu within Quick Actions. + +*Type:* `+Array+` of `+String+` + +*Default value:* `+['ai-chat-explain', 'ai-chat-summarize', 'ai-chat-highlight-key-points']+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_quickactions_chat_prompts: [ + 'ai-chat-explain', + 'ai-chat-summarize', + 'ai-chat-highlight-key-points' + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_quickactions_change_tone_menu]] +=== `+tinymceai_quickactions_change_tone_menu+` + +Array of control IDs for the Change Tone submenu. + +*Type:* `+Array+` of `+String+` + +*Default value:* +[source,js] +---- +[ + 'ai-quickactions-tone-casual', + 'ai-quickactions-tone-direct', + 'ai-quickactions-tone-friendly', + 'ai-quickactions-tone-confident', + 'ai-quickactions-tone-professional' +] +---- + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_quickactions_change_tone_menu: [ + 'ai-quickactions-tone-casual', + 'ai-quickactions-tone-professional' + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_languages]] +=== `+tinymceai_languages+` + +Array of language options for the Translate submenu within Quick Actions. Each item has `+title+` (displayed in the menu) and `+language+` (language code sent to the API, for example `+'english'+`, `+'chinese'+`). + +*Type:* `+Array+` of `+Object+` + +*Default value:* +[source,js] +---- +[ + { title: 'English', language: 'english' }, + { title: 'Chinese (Simplified)', language: 'chinese' }, + { title: 'Spanish', language: 'spanish' }, + { title: 'German', language: 'german' }, + { title: 'Japanese', language: 'japanese' }, + { title: 'Portuguese', language: 'portuguese' }, + { title: 'Korean', language: 'korean' }, + { title: 'Italian', language: 'italian' }, + { title: 'Russian', language: 'russian' } +] +---- + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_languages: [ + { title: 'English', language: 'english' }, + { title: 'French', language: 'french' }, + { title: 'German', language: 'german' } + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[tinymceai_quickactions_custom]] +=== `+tinymceai_quickactions_custom+` + +Array of custom command objects rendered in the Custom Commands menu item. Each item can be type `+action+` (quick action with immediate preview) or type `+chat+` (opens in chat). + +* `+title+` - Text shown in the menu and chat history +* `+prompt+` - The actual prompt sent to the AI +* `+type+` - `+'action'+` or `+'chat'+` +* `+model+` - Required for `+action+` type only + +*Type:* `+Array+` of `+Object+` + +*Possible Values:* For `+type+` property: `+'action'+`, `+'chat'+` + +*Default value:* `+[]+` + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_quickactions_custom: [ + { + title: 'Add a quote from a famous person', + prompt: 'Add a quote from a known person, which would make sense in the context of the selected text.', + type: 'action', + model: 'gemini-2-5-flash' + }, + { + title: 'Summarize in 5 bullet points', + prompt: 'Summarize the selected text in 5 bullet points.', + type: 'chat' + } + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + +[[options-review]] +== Options for Review + +These options configure the AI Review sidebar, which provides content quality analysis and improvement suggestions. + +[[tinymceai_reviews]] +=== `+tinymceai_reviews+` + +Array of review command IDs that define which review types appear in the Review sidebar and their order. Only the listed reviews are available to users. + +*Type:* `+Array+` of `+String+` + +*Valid values:* +* `+'ai-reviews-proofread'+`: Check grammar, spelling, and punctuation +* `+'ai-reviews-improve-clarity'+`: Improve logical structure and precision +* `+'ai-reviews-improve-readability'+`: Adjust sentence structure and word choice +* `+'ai-reviews-change-length'+`: Shorten or lengthen text +* `+'ai-reviews-change-tone'+`: Modify tone and style + +*Default value:* +[source,js] +---- +[ + 'ai-reviews-proofread', + 'ai-reviews-improve-clarity', + 'ai-reviews-improve-readability', + 'ai-reviews-change-length', + 'ai-reviews-change-tone' +] +---- + +.Example +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'tinymceai', + toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review', + tinymceai_reviews: [ + 'ai-reviews-proofread', + 'ai-reviews-improve-clarity', + 'ai-reviews-change-tone' + ], + // Required for authentication + tinymceai_token_provider: () => { + return fetch('/api/token').then(r => r.json()); + } +}); +---- + diff --git a/modules/ROOT/partials/index-pages/premium-plugins.adoc b/modules/ROOT/partials/index-pages/premium-plugins.adoc index 8f1777535e..90b06e5a2a 100644 --- a/modules/ROOT/partials/index-pages/premium-plugins.adoc +++ b/modules/ROOT/partials/index-pages/premium-plugins.adoc @@ -200,6 +200,12 @@ xref:tableofcontents.adoc[Table of Contents] Insert a simple Table of Contents into the {productname} editor. +a| +[.lead] +xref:tinymceai-introduction.adoc[TinyMCE AI] + +AI-powered features for {productname} including AI chat, AI review, and quick actions. + a| [.lead] xref:tinydrive-introduction.adoc[Tiny Drive] diff --git a/modules/ROOT/partials/menu-item-ids/tinymceai-menu-items.adoc b/modules/ROOT/partials/menu-item-ids/tinymceai-menu-items.adoc new file mode 100644 index 0000000000..07e0bc9a78 --- /dev/null +++ b/modules/ROOT/partials/menu-item-ids/tinymceai-menu-items.adoc @@ -0,0 +1,10 @@ +[cols="1,1,2",options="header"] +|=== +|Menu item identifier |Default Menu Location |Description + +|image:icons-premium/ai-assistant.svg[Chat icon,24px] `+tinymceai-chat+` |Tools |Opens the AI Chat sidebar. +|image:icons/ai-prompt.svg[Quick Actions icon,24px] `+tinymceai-quickactions+` |Tools |Opens the Quick Actions menu. +|image:icons-premium/ai-review.svg[Review icon,24px] `+tinymceai-review+` |Tools |Opens the AI Review sidebar. +|=== + +For submenu and individual menu item identifiers (for example, `+ai-quickactions-improve-writing+`, `+ai-chat-explain+`), see xref:tinymceai-actions-plugin.adoc#configuring-quick-actions-menu[Configuring Quick Actions menu]. diff --git a/modules/ROOT/partials/toolbar-button-ids/tinymceai-toolbar-buttons.adoc b/modules/ROOT/partials/toolbar-button-ids/tinymceai-toolbar-buttons.adoc new file mode 100644 index 0000000000..7f4b0d9277 --- /dev/null +++ b/modules/ROOT/partials/toolbar-button-ids/tinymceai-toolbar-buttons.adoc @@ -0,0 +1,10 @@ +[cols="2,3",options="header"] +|=== +|Toolbar button identifier |Description + +|image:icons-premium/ai-assistant.svg[Chat icon,24px] `+tinymceai-chat+` |Opens the AI Chat sidebar for conversations with the AI assistant. +|image:icons/ai-prompt.svg[Quick Actions icon,24px] `+tinymceai-quickactions+` |Opens the Quick Actions menu (improve writing, fix grammar, translate, and similar). +|image:icons-premium/ai-review.svg[Review icon,24px] `+tinymceai-review+` |Opens the AI Review sidebar for suggested edits and content review. +|=== + +For submenu and individual action identifiers (for example, `+ai-quickactions-improve-writing+`, `+ai-chat-explain+`), see xref:tinymceai-actions-plugin.adoc#configuring-quick-actions-menu[Configuring Quick Actions menu].