Skip to content

Commit dd2a51f

Browse files
committed
DOC-3356: Add missing chat_welcome_message option and update JWT about auth login comment.
1 parent 6f62e1b commit dd2a51f

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

modules/ROOT/pages/tinymceai-with-jwt-authentication-nodejs.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ Inside the `public` folder where the `index.html` file was created, add the HTML
187187
plugins: 'tinymceai',
188188
toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review',
189189
// tinymceai_token_provider fetches a token from the `/jwt` endpoint.
190+
// This demo does not verify user session; it simulates an already-authenticated user. Integrate with your auth before returning tokens.
190191
tinymceai_token_provider: () => {
191192
return fetch('http://localhost:3000/jwt', {
192193
method: 'POST',
@@ -219,6 +220,7 @@ tinymce.init({
219220
toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review',
220221
tinymceai_default_model: 'agent-1',
221222
tinymceai_allow_model_selection: true,
223+
// This demo does not verify user session; it simulates an already-authenticated user. Integrate with your auth before returning tokens.
222224
tinymceai_token_provider: () => {
223225
return fetch('http://localhost:3000/jwt', {
224226
method: 'POST',

modules/ROOT/pages/tinymceai-with-jwt-authentication-php.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ Inside the root directory where the `index.html` file was created, add the HTML
190190
plugins: 'tinymceai',
191191
toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review',
192192
// tinymceai_token_provider fetches a token from the `/jwt.php` endpoint.
193+
// This demo does not verify user session; it simulates an already-authenticated user. Integrate with your auth before returning tokens.
193194
tinymceai_token_provider: () => {
194195
return fetch('http://localhost:3000/jwt.php', {
195196
method: 'POST',
@@ -222,6 +223,7 @@ tinymce.init({
222223
toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review',
223224
tinymceai_default_model: 'agent-1',
224225
tinymceai_allow_model_selection: true,
226+
// This demo does not verify user session; it simulates an already-authenticated user. Integrate with your auth before returning tokens.
225227
tinymceai_token_provider: () => {
226228
return fetch('http://localhost:3000/jwt.php', {
227229
method: 'POST',

modules/ROOT/partials/configuration/tinymceai_options.adoc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Configuration options are grouped by the feature they configure. Options in the
55

66
These options apply to the plugin overall or to multiple AI features (Chat, Quick Actions, Review).
77

8+
[TIP]
9+
====
10+
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.
11+
====
12+
813
[[content_id]]
914
=== `+content_id+`
1015

@@ -234,6 +239,30 @@ tinymce.init({
234239
});
235240
----
236241

242+
[[tinymceai_chat_welcome_message]]
243+
=== `+tinymceai_chat_welcome_message+`
244+
245+
Customises the welcome message displayed in the Chat sidebar when starting a new conversation.
246+
247+
*Type:* `+String+`
248+
249+
*Default value:* A default message introducing the AI assistant and its capabilities.
250+
251+
.Example
252+
[source,js]
253+
----
254+
tinymce.init({
255+
selector: 'textarea',
256+
plugins: 'tinymceai',
257+
toolbar: 'tinymceai-chat tinymceai-quickactions tinymceai-review',
258+
tinymceai_chat_welcome_message: '<p>Welcome! How can I help you today?</p>',
259+
// Required for authentication
260+
tinymceai_token_provider: () => {
261+
return fetch('/api/token').then(r => r.json());
262+
}
263+
});
264+
----
265+
237266
[[options-quickactions]]
238267
== Options for Quick Actions
239268

0 commit comments

Comments
 (0)