 DOC-2375: TinyMCE 7.1 Documentation. (#3242)
* DOC-2375: TinyMCE 7.1 Documentation.
* DOC-2368: Update bundling documentation for all premium plugins for new index.js files. (#3224)
* DOC-2368: Update bundling documentation for all premium plugins for new index.js files.
* DOC-2368: additional improvements.
* DOC-2368: additional copy edits to bundling-plugins.adoc and related partials,includes.
* Revert "DOC-2339: On-premises documentation for document converters. (#3180)"
This reverts commit 93d7ffed18df8cb3e375652998e98692b1665cee.
* DOC-2368: update plugin code ref.
* DOC-2368: delete plugin-file-plugins.adoc pages, update plugin.js for import code blocks.
* Update modules/ROOT/partials/plugin-files/plugin-file-bundling-message.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/partials/plugin-files/plugin-file-index.js.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/partials/plugin-files/plugin-file-bundling-also-requires.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/pages/bundling-plugins.adoc
* Update modules/ROOT/pages/bundling-plugins.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* DOC-2368: update plugin-file-list-emoticons.adoc file to include note.
* DOC-2368: add note to reference back to the tinymce v6 docs if version is equal to or less than 7.0.
* Update modules/ROOT/pages/bundling-plugins.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
---------
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* DOC-288 (#3262)
* DOC-2386: add Google Gemini integration guide (#3250)
* Add Google Gemini integration guide
* Update Gemini string response example to use Vertex AI
* Add admonition about access token security above each code example
* Fix indentation in code examples
* Update admonition from Mitch's suggestions
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* Improve code example comments about authentication
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* Remove pronouns from admon-ai-proxy.adoc and ai-gemini.adoc
* change order of nav items
* Apply suggestions from code review
Only include ai proxy admon once per page
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* DOC-2387: Add live demo to AI Assistant plugin page (#3260)
* DOC-2387: Add live demo to AI Assistant plugin page
* fix the authorization header in index.js
* update live demo content to match website ai demo
* add admonition that live demo uses proxy
* DOC-2385: add Amazon Bedrock integration guide (#3252)
* DOC-2384: Added local playbook and dev scripts (#3247)
* Initial draft for Amazon Bedrock integration guide
* change order of nav.adoc items
* add ai proxy admonition (will be functional once merged into tinymce/7)
* Revert "DOC-2384: Added local playbook and dev scripts (#3247)"
This reverts commit 8631a515b5158f49535ebb4a407283795c1502b2.
* Apply suggestions from code review
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* DOC-2399: Extract OpenAI integration code to separate page (#3270)
* add ai-openai.adoc page with OpenAI string and streaming code examples
* change ai_request to use minimal string response code example
* remove basic setup section from ai.adoc and fix options headings nesting levels
* add missing heading to ai-openai.adoc
* move openai to above proxy in nav.adoc
* add ai proxy admonitions (will be functional once merged into tinymce/7)
* only include ai proxy admon once per page
* change gemini prerequisites to ordered list
* DOC-2381: add new `Math` Plugin documentation for TinyMCE 7.1. (#3253)
* DOC-2381: add new Math plugin documentation for TinyMCE 7.1.
* Update modules/ROOT/examples/live-demos/math/index.js
* DOC-2381: update math demo, and removed examples of using equations.
* Update premium-plugins.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update modules/ROOT/pages/math.adoc
* DOC-2381: Demo update, and included examples of block vs inline.
* DOC-2381: Updated index.html for demo.
* Update modules/ROOT/examples/live-demos/math/index.html
* Update modules/ROOT/partials/misc/admon-requires-7.1v.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* add plugin to available-menu-items.adoc
* add plugin to available-toolbar-buttons.adoc
* add plugin to editor-command-identifiers.adoc
* add plugin to full-featured demo
* Update modules/ROOT/examples/live-demos/math/index.html
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/partials/menu-item-ids/math-menu-items.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/partials/toolbar-button-ids/math-toolbar-buttons.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/partials/menu-item-ids/math-menu-items.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Removed details - Update modules/ROOT/pages/math.adoc
* Details amended - Update modules/ROOT/pages/math.adoc
* Demo content updated - Update modules/ROOT/examples/live-demos/math/index.html
* Updated information - Update modules/ROOT/pages/math.adoc
* Added list separator -Update modules/ROOT/pages/math.adoc
* italicised some text- Update modules/ROOT/pages/math.adoc
* Apply suggestions from code review
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
Co-authored-by: Andrew Herron <andrew.herron@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
---------
Co-authored-by: spocke <spocke@moxiecode.com>
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
Co-authored-by: Andrew Herron <andrew.herron@tiny.cloud>
* DOC-2366: Add revision history diff API (#3278)
* DOC-2366: Add revision history API section
* DOC-2366: Clean up
* Update modules/ROOT/partials/plugin-apis/ai-apis.adoc
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* DOC-2401: Add integration docs for Azure OpenAI (#3273)
* DOC-2401: Add integration docs for Azure OpenAI
* Fix indentation in code
* DOC-2401: Edits to azure ai page
* Apply suggestions from code review
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* DOC-2401: Fix streaming snippet
* Update modules/ROOT/nav.adoc
* Update modules/ROOT/pages/ai-azure.adoc
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: Farzad Hayatbakhsh <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* DOC-2363: TinyMCE 7.1 release notes and changelog. (#3243)
* DOC-2363: TinyMCE 7.1 release notes and changelog.
* DOC-2384: Added local playbook and dev scripts (#3247)
* change default http-server address to 'localhost'
* DOC-2363: New `index.js` file that includes all plugin resources. (#3246)
* DOC-2363: New index.js file that includes all plugin resources.
* Update modules/ROOT/pages/7.1-release-notes.adoc
* Update modules/ROOT/pages/7.1-release-notes.adoc
* DOC-2363: Removed `aria-pressed` from the `More` button in sliding toolbar mode and replaced it with `aria-expanded` (#3267)
* DOC-2363: Removed aria-pressed from the More button in sliding toolbar mode and replaced it with aria-expanded.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
---------
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* DOC-2363: Notification accessibility improvements: added tooltips, keyboard navigation and shortcut to focus on notifications. (#3266)
* DOC-2363: Notification accessibility improvements: added tooltips, keyboard navigation and shortcut to focus on notifications.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
---------
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* DOC-2363: Add TINY-10597 release note entry (#3256)
* DOC-2363: Add TINY-10800 release note entry (#3255)
* DOC-2363: Dialog title was not announced in macOS VoiceOver, dialogs now use `aria-label` instead of `aria-labelledby` on macOS. (#3271)
* DOC-2363: Dialog title was not announced in macOS VoiceOver, dialogs now use aria-label instead of aria-labelledby on macOS.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: ToggleToolbarDrawer command did not toggle the toolbar in sliding mode when {skipFocus: true} parameter was passed. (#3265)
* DOC-2363: Firefox not announcing the iframe title when `iframe_aria_text` was set. (#3275)
* DOC-2363: Firefox not announcing the iframe title when was set.
* Update 7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* DOC-2363: release note entry for TINY-10725 (#3251)
* DOC-2363: add changelog for TinyMCE 7.1 core changes.
* DOC-2396: add Windows High Contrast mode support to 7.1 release notes (#3279)
* DOC-2396: add Windows High Contrast mode support to 7.1 release notes
* Apply suggestions from code review
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com>
* DOC-2363: Add TINY-10780 release note entry (#3254)
* DOC-2363: Included `itemprop`, `itemscope`, `itemtype` as valid HTML5 attributes in the core schema. (#3244)
* DOC-2363: Included itemprop, itemscope, itemtype as valid HTML5 attributes in the core schema.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: Accompanying Premium self-hosted server-side component changes in TinyMCE 7.1. (#3274)
* DOC-2363: Open link context menu action was not enabled for links on images. (#3277)
* DOC-2363: Open link context menu action was not enabled for links on images.
* DOC-2363: Add release note for open link context menu action issues
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
---------
Co-authored-by: Ben Tran <ben.tran@tiny.cloud>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* DOC-2363: Notification width was not constrained to the width of the editor. (#3268)
* DOC-2363: Notification width was not constrained to the width of the editor.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/changelog.adoc
* Update modules/ROOT/pages/changelog.adoc
* DOC-2363: Video and audio elements could not be played on Safari. (#3258)
* DOC-2363: Video and audio elements could not be played on Safari.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: In the custom view, the scrollbar of the container were not visible if its height was greater than the editor. (#3272)
* DOC-2363: In the custom view, the scrollbar of the container were not visible if its height was greater than the editor.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
* Update modules/ROOT/pages/7.1-release-notes.adoc
* Update modules/ROOT/pages/7.1-release-notes.adoc
* DOC-2363: Styles were not retained when toggling a list on and off. (#3269)
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: Added new `A11ycheckStart`, `A11ycheckStop`, `A11ycheckIgnore`, `A11ycheckRepair` and `A11ycheckShowDetails` events.. (#3245)
* DOC-2363: Added new A11ycheckStart, A11ycheckStop, A11ycheckIgnore, A11ycheckRepair and A11ycheckShowDetails events.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/partials/events/a11ychecker-events.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Add Accessibility Checker events to events page
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: Custom block elements with colon characters would throw errors. (#3259)
* DOC-2363: Custom block elements with colon characters would throw errors.
* DOC-2363: Custom block elements with colon characters would throw errors.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC--2363: Fixed accessibility issue by removing duplicate role (menu) attribute from color swatches. (#3261)
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: final copy edits and removal of trailing template material.
* Update modules/ROOT/pages/7.1-release-notes.adoc
* DOC-2363: add revisionhistory_diff_classes entry to the TinyMCE 7.1 release notes.
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Farzad Hayatbakhsh <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com>
Co-authored-by: Ben Tran <ben.tran@tiny.cloud>
* DOC-2408: update support page EOS dates to include 7.1 entry (#3284)
* DOC-2408: update support page EOS dates to include 7.1 entry
* Update modules/ROOT/partials/misc/supported-versions.adoc
---------
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: spocke <spocke@moxiecode.com>
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
Co-authored-by: Andrew Herron <andrew.herron@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com> 1 year ago  DOC-2375: TinyMCE 7.1 Documentation. (#3242)
* DOC-2375: TinyMCE 7.1 Documentation.
* DOC-2368: Update bundling documentation for all premium plugins for new index.js files. (#3224)
* DOC-2368: Update bundling documentation for all premium plugins for new index.js files.
* DOC-2368: additional improvements.
* DOC-2368: additional copy edits to bundling-plugins.adoc and related partials,includes.
* Revert "DOC-2339: On-premises documentation for document converters. (#3180)"
This reverts commit 93d7ffed18df8cb3e375652998e98692b1665cee.
* DOC-2368: update plugin code ref.
* DOC-2368: delete plugin-file-plugins.adoc pages, update plugin.js for import code blocks.
* Update modules/ROOT/partials/plugin-files/plugin-file-bundling-message.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/partials/plugin-files/plugin-file-index.js.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/partials/plugin-files/plugin-file-bundling-also-requires.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/pages/bundling-plugins.adoc
* Update modules/ROOT/pages/bundling-plugins.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* DOC-2368: update plugin-file-list-emoticons.adoc file to include note.
* DOC-2368: add note to reference back to the tinymce v6 docs if version is equal to or less than 7.0.
* Update modules/ROOT/pages/bundling-plugins.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
---------
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* DOC-288 (#3262)
* DOC-2386: add Google Gemini integration guide (#3250)
* Add Google Gemini integration guide
* Update Gemini string response example to use Vertex AI
* Add admonition about access token security above each code example
* Fix indentation in code examples
* Update admonition from Mitch's suggestions
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* Improve code example comments about authentication
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* Remove pronouns from admon-ai-proxy.adoc and ai-gemini.adoc
* change order of nav items
* Apply suggestions from code review
Only include ai proxy admon once per page
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* DOC-2387: Add live demo to AI Assistant plugin page (#3260)
* DOC-2387: Add live demo to AI Assistant plugin page
* fix the authorization header in index.js
* update live demo content to match website ai demo
* add admonition that live demo uses proxy
* DOC-2385: add Amazon Bedrock integration guide (#3252)
* DOC-2384: Added local playbook and dev scripts (#3247)
* Initial draft for Amazon Bedrock integration guide
* change order of nav.adoc items
* add ai proxy admonition (will be functional once merged into tinymce/7)
* Revert "DOC-2384: Added local playbook and dev scripts (#3247)"
This reverts commit 8631a515b5158f49535ebb4a407283795c1502b2.
* Apply suggestions from code review
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* DOC-2399: Extract OpenAI integration code to separate page (#3270)
* add ai-openai.adoc page with OpenAI string and streaming code examples
* change ai_request to use minimal string response code example
* remove basic setup section from ai.adoc and fix options headings nesting levels
* add missing heading to ai-openai.adoc
* move openai to above proxy in nav.adoc
* add ai proxy admonitions (will be functional once merged into tinymce/7)
* only include ai proxy admon once per page
* change gemini prerequisites to ordered list
* DOC-2381: add new `Math` Plugin documentation for TinyMCE 7.1. (#3253)
* DOC-2381: add new Math plugin documentation for TinyMCE 7.1.
* Update modules/ROOT/examples/live-demos/math/index.js
* DOC-2381: update math demo, and removed examples of using equations.
* Update premium-plugins.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
* Update modules/ROOT/pages/math.adoc
* DOC-2381: Demo update, and included examples of block vs inline.
* DOC-2381: Updated index.html for demo.
* Update modules/ROOT/examples/live-demos/math/index.html
* Update modules/ROOT/partials/misc/admon-requires-7.1v.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* add plugin to available-menu-items.adoc
* add plugin to available-toolbar-buttons.adoc
* add plugin to editor-command-identifiers.adoc
* add plugin to full-featured demo
* Update modules/ROOT/examples/live-demos/math/index.html
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/partials/menu-item-ids/math-menu-items.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/partials/toolbar-button-ids/math-toolbar-buttons.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/partials/menu-item-ids/math-menu-items.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
* Removed details - Update modules/ROOT/pages/math.adoc
* Details amended - Update modules/ROOT/pages/math.adoc
* Demo content updated - Update modules/ROOT/examples/live-demos/math/index.html
* Updated information - Update modules/ROOT/pages/math.adoc
* Added list separator -Update modules/ROOT/pages/math.adoc
* italicised some text- Update modules/ROOT/pages/math.adoc
* Apply suggestions from code review
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
Co-authored-by: Andrew Herron <andrew.herron@tiny.cloud>
* Update modules/ROOT/pages/math.adoc
Co-authored-by: spocke <spocke@moxiecode.com>
---------
Co-authored-by: spocke <spocke@moxiecode.com>
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
Co-authored-by: Andrew Herron <andrew.herron@tiny.cloud>
* DOC-2366: Add revision history diff API (#3278)
* DOC-2366: Add revision history API section
* DOC-2366: Clean up
* Update modules/ROOT/partials/plugin-apis/ai-apis.adoc
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* DOC-2401: Add integration docs for Azure OpenAI (#3273)
* DOC-2401: Add integration docs for Azure OpenAI
* Fix indentation in code
* DOC-2401: Edits to azure ai page
* Apply suggestions from code review
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* DOC-2401: Fix streaming snippet
* Update modules/ROOT/nav.adoc
* Update modules/ROOT/pages/ai-azure.adoc
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: Farzad Hayatbakhsh <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* DOC-2363: TinyMCE 7.1 release notes and changelog. (#3243)
* DOC-2363: TinyMCE 7.1 release notes and changelog.
* DOC-2384: Added local playbook and dev scripts (#3247)
* change default http-server address to 'localhost'
* DOC-2363: New `index.js` file that includes all plugin resources. (#3246)
* DOC-2363: New index.js file that includes all plugin resources.
* Update modules/ROOT/pages/7.1-release-notes.adoc
* Update modules/ROOT/pages/7.1-release-notes.adoc
* DOC-2363: Removed `aria-pressed` from the `More` button in sliding toolbar mode and replaced it with `aria-expanded` (#3267)
* DOC-2363: Removed aria-pressed from the More button in sliding toolbar mode and replaced it with aria-expanded.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
---------
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* DOC-2363: Notification accessibility improvements: added tooltips, keyboard navigation and shortcut to focus on notifications. (#3266)
* DOC-2363: Notification accessibility improvements: added tooltips, keyboard navigation and shortcut to focus on notifications.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
---------
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* DOC-2363: Add TINY-10597 release note entry (#3256)
* DOC-2363: Add TINY-10800 release note entry (#3255)
* DOC-2363: Dialog title was not announced in macOS VoiceOver, dialogs now use `aria-label` instead of `aria-labelledby` on macOS. (#3271)
* DOC-2363: Dialog title was not announced in macOS VoiceOver, dialogs now use aria-label instead of aria-labelledby on macOS.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: ToggleToolbarDrawer command did not toggle the toolbar in sliding mode when {skipFocus: true} parameter was passed. (#3265)
* DOC-2363: Firefox not announcing the iframe title when `iframe_aria_text` was set. (#3275)
* DOC-2363: Firefox not announcing the iframe title when was set.
* Update 7.1-release-notes.adoc
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
* DOC-2363: release note entry for TINY-10725 (#3251)
* DOC-2363: add changelog for TinyMCE 7.1 core changes.
* DOC-2396: add Windows High Contrast mode support to 7.1 release notes (#3279)
* DOC-2396: add Windows High Contrast mode support to 7.1 release notes
* Apply suggestions from code review
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com>
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com>
* DOC-2363: Add TINY-10780 release note entry (#3254)
* DOC-2363: Included `itemprop`, `itemscope`, `itemtype` as valid HTML5 attributes in the core schema. (#3244)
* DOC-2363: Included itemprop, itemscope, itemtype as valid HTML5 attributes in the core schema.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: Accompanying Premium self-hosted server-side component changes in TinyMCE 7.1. (#3274)
* DOC-2363: Open link context menu action was not enabled for links on images. (#3277)
* DOC-2363: Open link context menu action was not enabled for links on images.
* DOC-2363: Add release note for open link context menu action issues
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
---------
Co-authored-by: Ben Tran <ben.tran@tiny.cloud>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
* DOC-2363: Notification width was not constrained to the width of the editor. (#3268)
* DOC-2363: Notification width was not constrained to the width of the editor.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/changelog.adoc
* Update modules/ROOT/pages/changelog.adoc
* DOC-2363: Video and audio elements could not be played on Safari. (#3258)
* DOC-2363: Video and audio elements could not be played on Safari.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: In the custom view, the scrollbar of the container were not visible if its height was greater than the editor. (#3272)
* DOC-2363: In the custom view, the scrollbar of the container were not visible if its height was greater than the editor.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
* Update modules/ROOT/pages/7.1-release-notes.adoc
* Update modules/ROOT/pages/7.1-release-notes.adoc
* DOC-2363: Styles were not retained when toggling a list on and off. (#3269)
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: Added new `A11ycheckStart`, `A11ycheckStop`, `A11ycheckIgnore`, `A11ycheckRepair` and `A11ycheckShowDetails` events.. (#3245)
* DOC-2363: Added new A11ycheckStart, A11ycheckStop, A11ycheckIgnore, A11ycheckRepair and A11ycheckShowDetails events.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/partials/events/a11ychecker-events.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* Add Accessibility Checker events to events page
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: Custom block elements with colon characters would throw errors. (#3259)
* DOC-2363: Custom block elements with colon characters would throw errors.
* DOC-2363: Custom block elements with colon characters would throw errors.
* Update modules/ROOT/pages/7.1-release-notes.adoc
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
---------
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC--2363: Fixed accessibility issue by removing duplicate role (menu) attribute from color swatches. (#3261)
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
* DOC-2363: final copy edits and removal of trailing template material.
* Update modules/ROOT/pages/7.1-release-notes.adoc
* DOC-2363: add revisionhistory_diff_classes entry to the TinyMCE 7.1 release notes.
* Update modules/ROOT/pages/7.1-release-notes.adoc
---------
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: Farzad Hayatbakhsh <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com>
Co-authored-by: Ben Tran <ben.tran@tiny.cloud>
* DOC-2408: update support page EOS dates to include 7.1 entry (#3284)
* DOC-2408: update support page EOS dates to include 7.1 entry
* Update modules/ROOT/partials/misc/supported-versions.adoc
---------
Co-authored-by: Karl Kemister-Sheppard <karlkemistersheppard@gmail.com>
---------
Co-authored-by: ltrouton <46954949+ltrouton@users.noreply.github.com>
Co-authored-by: Shan <shanmen.ng@tiny.cloud>
Co-authored-by: Farzad Hayat <farzad.hayatbakhsh@tiny.cloud>
Co-authored-by: Mitchell Crompton <mitchell.crompton@tiny.cloud>
Co-authored-by: spocke <spocke@moxiecode.com>
Co-authored-by: shirqa <43625458+ShiridiGandham@users.noreply.github.com>
Co-authored-by: tiny-ben-tran <ben.tran@tiny.cloud>
Co-authored-by: Andrew Herron <andrew.herron@tiny.cloud>
Co-authored-by: Arvin(Jintao) Han <20640097+ArvinJ-H@users.noreply.github.com> 1 year ago |
|
:packageName: tinymce-react
ifeval::["{productUse}" == "bundle"] IMPORTANT: {companyname} does not recommend bundling the `tinymce` package. Bundling {productname} can be complex and error prone.
endif::[] The https://github.com/tinymce/tinymce-react[Official {productname} React component] integrates {productname} into React projects. This procedure creates a https://github.com/vitejs/vite-plugin-react-swc[basic React application] containing a {productname} editor.
For examples of the {productname} integration, visit https://tinymce.github.io/tinymce-react/[the tinymce-react storybook].
== Prerequisites
This procedure requires https://nodejs.org/[Node.js (and npm)].
== Procedure
. Use the https://github.com/vitejs/vite[Vite] package and the https://github.com/vitejs/vite-plugin-react-swc[React SWC plugin] to create a new React project named `+tinymce-react-demo+`. + [source,sh] ---- # npm 7+, extra double-dash is needed npm create vite@5 tinymce-react-demo -- --template react-swc ---- . Change to the newly created directory. + [source,sh] ---- cd tinymce-react-demo ----
ifeval::["{productSource}" == "cloud"] . Install the `+@tinymce/tinymce-react+` package. + [source,sh] ---- npm install @tinymce/tinymce-react ----
. Using a text editor, open `+./src/App.jsx+` and replace the contents with: + [source,jsx] ---- import { useRef } from 'react'; import { Editor } from '@tinymce/tinymce-react'; import './App.css';
export default function App() { const editorRef = useRef(null); const log = () => { if (editorRef.current) { console.log(editorRef.current.getContent()); } };
return ( <> <Editor apiKey='no-api-key' onInit={ (_evt, editor) => editorRef.current = editor } initialValue="<p>This is the initial content of the editor.</p>" init={{ height: 500, menubar: false, plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'code', 'help', 'wordcount' ], toolbar: 'undo redo | blocks | ' + 'bold italic forecolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }} /> <button onClick={log}>Log editor content</button> </> ); } ---- + This JavaScript file will create a component "`+App+`" containing a {productname} editor configured with basic features.
. Update the `+apiKey+` option in the editor element and include your link:{accountsignup}/[{cloudname} API key]. endif::[] ifeval::["{productSource}" == "package-manager"] ifeval::["{productUse}" == "host"] . Install the `+tinymce+`, `+@tinymce/tinymce-react+` and `+fs-extra+` packages. + [source,sh] ---- npm install tinymce @tinymce/tinymce-react fs-extra ----
. Setup a `postinstall` script to copy {productname} to the public directory for hosting + .postinstall.js [source,js] ---- import fse from 'fs-extra'; import path from 'path'; const topDir = import.meta.dirname; fse.emptyDirSync(path.join(topDir, 'public', 'tinymce')); fse.copySync(path.join(topDir, 'node_modules', 'tinymce'), path.join(topDir, 'public', 'tinymce'), { overwrite: true }); ---- + .package.json [source,json] ---- { // ... other content omitted for brevity ... "scripts": { // ... other scripts omitted for brevity ... "postinstall": "node ./postinstall.js" } } ---- + ..gitignore [source,.gitignore] ---- # ... other rules omitted for brevity ... /public/tinymce/ ----
. Run the `postinstall` to copy {productname} to the `public` directory + [source,sh] ---- npm run postinstall ----
. Using a text editor, open `+./src/App.jsx+` and replace the contents with: + [source,jsx] ---- import { useRef } from 'react'; import { Editor } from '@tinymce/tinymce-react'; import './App.css';
export default function App() { const editorRef = useRef(null); const log = () => { if (editorRef.current) { console.log(editorRef.current.getContent()); } }; return ( <> <Editor tinymceScriptSrc='/tinymce/tinymce.min.js' licenseKey='your-license-key' onInit={(_evt, editor) => editorRef.current = editor} initialValue='<p>This is the initial content of the editor.</p>' init={{ height: 500, menubar: false, plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'preview', 'help', 'wordcount' ], toolbar: 'undo redo | blocks | ' + 'bold italic forecolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }} /> <button onClick={log}>Log editor content</button> </> ); } ----
. Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
endif::[] ifeval::["{productUse}" == "bundle"] . Install the `+tinymce+` and `+@tinymce/tinymce-react+` packages + [source,sh] ---- npm install tinymce @tinymce/tinymce-react ----
. Using a text editor, create `+./src/BundledEditor.jsx+` and set the contents to: + [source,jsx] ---- import { Editor } from '@tinymce/tinymce-react';
// TinyMCE so the global var exists import 'tinymce/tinymce'; // DOM model import 'tinymce/models/dom/model' // Theme import 'tinymce/themes/silver'; // Toolbar icons import 'tinymce/icons/default'; // Editor styles import 'tinymce/skins/ui/oxide/skin';
// importing the plugin js. // if you use a plugin that is not listed here the editor will fail to load import 'tinymce/plugins/advlist'; import 'tinymce/plugins/anchor'; import 'tinymce/plugins/autolink'; import 'tinymce/plugins/autoresize'; import 'tinymce/plugins/autosave'; import 'tinymce/plugins/charmap'; import 'tinymce/plugins/code'; import 'tinymce/plugins/codesample'; import 'tinymce/plugins/directionality'; import 'tinymce/plugins/emoticons'; import 'tinymce/plugins/fullscreen'; import 'tinymce/plugins/help'; import 'tinymce/plugins/help/js/i18n/keynav/en'; import 'tinymce/plugins/image'; import 'tinymce/plugins/importcss'; import 'tinymce/plugins/insertdatetime'; import 'tinymce/plugins/link'; import 'tinymce/plugins/lists'; import 'tinymce/plugins/media'; import 'tinymce/plugins/nonbreaking'; import 'tinymce/plugins/pagebreak'; import 'tinymce/plugins/preview'; import 'tinymce/plugins/quickbars'; import 'tinymce/plugins/save'; import 'tinymce/plugins/searchreplace'; import 'tinymce/plugins/table'; import 'tinymce/plugins/visualblocks'; import 'tinymce/plugins/visualchars'; import 'tinymce/plugins/wordcount';
// importing plugin resources import 'tinymce/plugins/emoticons/js/emojis';
// Content styles, including inline UI like fake cursors import 'tinymce/skins/content/default/content'; import 'tinymce/skins/ui/oxide/content';
export default function BundledEditor(props) { return ( <Editor licenseKey='your-license-key' {...props} /> ); } ----
. Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
. Using a text editor, open `+./src/App.jsx+` and replace the contents with: + [source,jsx] ---- import { useRef } from 'react'; import BundledEditor from './BundledEditor' import './App.css';
export default function App() { const editorRef = useRef(null); const log = () => { if (editorRef.current) { console.log(editorRef.current.getContent()); } };
return ( <> <BundledEditor onInit={(_evt, editor) => editorRef.current = editor} initialValue='<p>This is the initial content of the editor.</p>' init={{ height: 500, menubar: false, plugins: [ 'advlist', 'anchor', 'autolink', 'help', 'image', 'link', 'lists', 'searchreplace', 'table', 'wordcount' ], toolbar: 'undo redo | blocks | ' + 'bold italic forecolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }} /> <button onClick={log}>Log editor content</button> </> ); } ---- endif::[] endif::[] ifeval::["{productSource}" == "zip"] ifeval::["{productUse}" == "host"] . Install the `+@tinymce/tinymce-react+` package. [source,sh] ---- npm install @tinymce/tinymce-react ----
. Unzip the content of the `+tinymce/js+` folder from the link:{download-enterprise}[{productname} zip] into the `+public+` folder. Afterwards the directory listing should be similar to below: + .> `tree -L 2 public` [source,text] ---- public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json ├── robots.txt └── tinymce ├── icons ├── langs ├── license.txt ├── models ├── plugins ├── skins ├── themes ├── tinymce.d.ts └── tinymce.min.js ----
. Using a text editor, open `+./eslint.config.js` and add `+'src/tinymce'+` to the `+ignores+` array. + .Diff of `.eslint.config.js` [source,patch] ---- export default tseslint.config( - { ignores: ['dist'] }, + { ignores: ['dist', 'src/tinymce'] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ['**/*.{ts,tsx}'], ----
. Using a text editor, open `+./src/App.jsx+` and replace the contents with: + [source,jsx] ---- import { useRef } from 'react'; import { Editor } from '@tinymce/tinymce-react'; import './App.css';
export default function App() { const editorRef = useRef(null); const log = () => { if (editorRef.current) { console.log(editorRef.current.getContent()); } }; return ( <> <Editor tinymceScriptSrc='/tinymce/tinymce.min.js' licenseKey='your-license-key' onInit={(_evt, editor) => editorRef.current = editor} initialValue='<p>This is the initial content of the editor.</p>' init={{ height: 500, menubar: false, plugins: [ 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'preview', 'help', 'wordcount' ], toolbar: 'undo redo | blocks | ' + 'bold italic forecolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }} /> <button onClick={log}>Log editor content</button> </> ); } ---- . Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key]. endif::[] ifeval::["{productUse}" == "bundle"]
. Install the `+@tinymce/tinymce-react+` and `+script-loader+` packages. + [source,sh] ---- npm install @tinymce/tinymce-react script-loader ----
. Unzip the content of the `+tinymce/js+` folder from the link:{download-enterprise}[{productname} zip] into the `+src+` folder. Afterwards the directory listing should be similar to below: + .> `tree -L 2 src` [source,text] ---- src ├── App.css ├── App.js ├── App.test.js ├── index.css ├── index.js ├── logo.svg ├── reportWebVitals.js ├── setupTests.js └── tinymce ├── icons ├── langs ├── license.txt ├── models ├── plugins ├── skins ├── themes ├── tinymce.d.ts └── tinymce.min.js ----
. Using a text editor, open `+./eslint.config.js+` and add `+'src/tinymce'+` to the `+ignores+` array. + .Diff of `.eslint.config.js` [source,patch] ---- diff --git a/eslint.config.js b/eslint.config.js index 092408a..1ab8db4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,7 +5,7 @@ import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint'
export default tseslint.config( - { ignores: ['dist'] }, + { ignores: ['dist', 'src/tinymce'] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ['**/*.{ts,tsx}'], ----
. Using a text editor, create `+./src/BundledEditor.jsx+` and set the contents to: + [source,jsx] ---- import { Editor } from '@tinymce/tinymce-react';
// TinyMCE so the global var exists import './tinymce/tinymce.min.js'; // DOM model import './tinymce/models/dom/model.min.js' // Theme import './tinymce/themes/silver/theme.min.js'; // Toolbar icons import './tinymce/icons/default/icons.min.js'; // Editor styles import './tinymce/skins/ui/oxide/skin.min.js';
// importing the plugin index.js file. // if you use a plugin that is not listed here the editor will fail to load import './tinymce/plugins/advlist'; import './tinymce/plugins/anchor'; import './tinymce/plugins/autolink'; import './tinymce/plugins/autoresize'; import './tinymce/plugins/autosave'; import './tinymce/plugins/charmap'; import './tinymce/plugins/code'; import './tinymce/plugins/codesample'; import './tinymce/plugins/directionality'; import './tinymce/plugins/emoticons'; import './tinymce/plugins/fullscreen'; import './tinymce/plugins/help'; import './tinymce/plugins/image'; import './tinymce/plugins/importcss'; import './tinymce/plugins/insertdatetime'; import './tinymce/plugins/link'; import './tinymce/plugins/lists'; import './tinymce/plugins/media'; import './tinymce/plugins/nonbreaking'; import './tinymce/plugins/pagebreak'; import './tinymce/plugins/preview'; import './tinymce/plugins/quickbars'; import './tinymce/plugins/save'; import './tinymce/plugins/searchreplace'; import './tinymce/plugins/table'; import './tinymce/plugins/visualblocks'; import './tinymce/plugins/visualchars'; import './tinymce/plugins/wordcount';
// importing plugin resources import './tinymce/plugins/emoticons/js/emojis.js';
// Content styles, including inline UI like fake cursors import './tinymce/skins/content/default/content.js'; import './tinymce/skins/ui/oxide/content.js';
export default function BundledEditor(props) { return ( <Editor licenseKey='your-lisense-key' {...props} /> ); } ----
. Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
. Using a text editor, open `+./src/App.jsx+` and replace the contents with: + [source,jsx] ---- import { useRef } from 'react'; import BundledEditor from './BundledEditor' import './App.css';
export default function App() { const editorRef = useRef(null); const log = () => { if (editorRef.current) { console.log(editorRef.current.getContent()); } }; return ( <> <BundledEditor onInit={(_evt, editor) => editorRef.current = editor} initialValue='<p>This is the initial content of the editor.</p>' init={{ height: 500, menubar: false, plugins: [ 'advlist', 'anchor', 'autolink', 'help', 'image', 'link', 'lists', 'searchreplace', 'table', 'wordcount' ], toolbar: 'undo redo | blocks | ' + 'bold italic forecolor | alignleft aligncenter ' + 'alignright alignjustify | bullist numlist outdent indent | ' + 'removeformat | help', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }' }} /> <button onClick={log}>Log editor content</button> </> ); } ---- endif::[] endif::[]
. Test the application using the Node.js development server. + * To start the development server, navigate to the `+tinymce-react-demo+` directory and run: + [source,sh] ---- npm run dev ----
* To stop the development server, select on the command line or command prompt and press _Ctrl+C_.
== Deploying the application to a HTTP server
The application will require further configuration before it can be deployed to a production environment. For information on configuring the application for deployment, see: https://vitejs.dev/guide/build[Building for Production] or https://vitejs.dev/guide/static-deploy.html[Deploying a Static Site].
To deploy the application to a local HTTP Server:
. Navigate to the `+tinymce-react-demo+` directory and run: + [source,sh] ---- npm run build ---- . You can optionally preview the production build by running: + [source,sh] ---- npm run preview ---- . Copy the contents of the `+tinymce-react-demo/dist+` directory to the root directory of the web server.
The application has now been deployed on the web server.
NOTE: Additional configuration is required to deploy the application outside the web server root directory, such as +http://localhost:<port>/my_react_application+.
== Next Steps
ifeval::["{productUse}" == "bundle"] * For information on bundling, see: xref:introduction-to-bundling-tinymce.adoc[] endif::[] * For examples of the {productname} integration, see: https://tinymce.github.io/tinymce-react/[the tinymce-react storybook]. * For information on customizing: ** {productname} integration, see: xref:react-ref.adoc[]. ** {productname}, see: xref:basic-setup.adoc[]. ** The React application, see: https://vitejs.dev/guide/#getting-started[Getting Started with Vite] or https://react.dev/learn[the React documentation].
|