You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

594 lines
18 KiB

4 years 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
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
4 years ago
  1. :packageName: tinymce-react
  2. ifeval::["{productUse}" == "bundle"]
  3. IMPORTANT: {companyname} does not recommend bundling the `tinymce` package. Bundling {productname} can be complex and error prone.
  4. endif::[]
  5. 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.
  6. For examples of the {productname} integration, visit https://tinymce.github.io/tinymce-react/[the tinymce-react storybook].
  7. == Prerequisites
  8. This procedure requires https://nodejs.org/[Node.js (and npm)].
  9. == Procedure
  10. . 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+`.
  11. +
  12. [source,sh]
  13. ----
  14. # npm 7+, extra double-dash is needed
  15. npm create vite@5 tinymce-react-demo -- --template react-swc
  16. ----
  17. . Change to the newly created directory.
  18. +
  19. [source,sh]
  20. ----
  21. cd tinymce-react-demo
  22. ----
  23. ifeval::["{productSource}" == "cloud"]
  24. . Install the `+@tinymce/tinymce-react+` package.
  25. +
  26. [source,sh]
  27. ----
  28. npm install @tinymce/tinymce-react
  29. ----
  30. . Using a text editor, open `+./src/App.jsx+` and replace the contents with:
  31. +
  32. [source,jsx]
  33. ----
  34. import { useRef } from 'react';
  35. import { Editor } from '@tinymce/tinymce-react';
  36. import './App.css';
  37. export default function App() {
  38. const editorRef = useRef(null);
  39. const log = () => {
  40. if (editorRef.current) {
  41. console.log(editorRef.current.getContent());
  42. }
  43. };
  44. return (
  45. <>
  46. <Editor
  47. apiKey='no-api-key'
  48. onInit={ (_evt, editor) => editorRef.current = editor }
  49. initialValue="<p>This is the initial content of the editor.</p>"
  50. init={{
  51. height: 500,
  52. menubar: false,
  53. plugins: [
  54. 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
  55. 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
  56. 'insertdatetime', 'media', 'table', 'code', 'help', 'wordcount'
  57. ],
  58. toolbar: 'undo redo | blocks | ' +
  59. 'bold italic forecolor | alignleft aligncenter ' +
  60. 'alignright alignjustify | bullist numlist outdent indent | ' +
  61. 'removeformat | help',
  62. content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
  63. }}
  64. />
  65. <button onClick={log}>Log editor content</button>
  66. </>
  67. );
  68. }
  69. ----
  70. +
  71. This JavaScript file will create a component "`+App+`" containing a {productname} editor configured with basic features.
  72. . Update the `+apiKey+` option in the editor element and include your link:{accountsignup}/[{cloudname} API key].
  73. endif::[]
  74. ifeval::["{productSource}" == "package-manager"]
  75. ifeval::["{productUse}" == "host"]
  76. . Install the `+tinymce+`, `+@tinymce/tinymce-react+` and `+fs-extra+` packages.
  77. +
  78. [source,sh]
  79. ----
  80. npm install tinymce @tinymce/tinymce-react fs-extra
  81. ----
  82. . Setup a `postinstall` script to copy {productname} to the public directory for hosting
  83. +
  84. .postinstall.js
  85. [source,js]
  86. ----
  87. import fse from 'fs-extra';
  88. import path from 'path';
  89. const topDir = import.meta.dirname;
  90. fse.emptyDirSync(path.join(topDir, 'public', 'tinymce'));
  91. fse.copySync(path.join(topDir, 'node_modules', 'tinymce'), path.join(topDir, 'public', 'tinymce'), { overwrite: true });
  92. ----
  93. +
  94. .package.json
  95. [source,json]
  96. ----
  97. {
  98. // ... other content omitted for brevity ...
  99. "scripts": {
  100. // ... other scripts omitted for brevity ...
  101. "postinstall": "node ./postinstall.js"
  102. }
  103. }
  104. ----
  105. +
  106. ..gitignore
  107. [source,.gitignore]
  108. ----
  109. # ... other rules omitted for brevity ...
  110. /public/tinymce/
  111. ----
  112. . Run the `postinstall` to copy {productname} to the `public` directory
  113. +
  114. [source,sh]
  115. ----
  116. npm run postinstall
  117. ----
  118. . Using a text editor, open `+./src/App.jsx+` and replace the contents with:
  119. +
  120. [source,jsx]
  121. ----
  122. import { useRef } from 'react';
  123. import { Editor } from '@tinymce/tinymce-react';
  124. import './App.css';
  125. export default function App() {
  126. const editorRef = useRef(null);
  127. const log = () => {
  128. if (editorRef.current) {
  129. console.log(editorRef.current.getContent());
  130. }
  131. };
  132. return (
  133. <>
  134. <Editor
  135. tinymceScriptSrc='/tinymce/tinymce.min.js'
  136. licenseKey='your-license-key'
  137. onInit={(_evt, editor) => editorRef.current = editor}
  138. initialValue='<p>This is the initial content of the editor.</p>'
  139. init={{
  140. height: 500,
  141. menubar: false,
  142. plugins: [
  143. 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap',
  144. 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
  145. 'insertdatetime', 'media', 'table', 'preview', 'help', 'wordcount'
  146. ],
  147. toolbar: 'undo redo | blocks | ' +
  148. 'bold italic forecolor | alignleft aligncenter ' +
  149. 'alignright alignjustify | bullist numlist outdent indent | ' +
  150. 'removeformat | help',
  151. content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
  152. }}
  153. />
  154. <button onClick={log}>Log editor content</button>
  155. </>
  156. );
  157. }
  158. ----
  159. . Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
  160. endif::[]
  161. ifeval::["{productUse}" == "bundle"]
  162. . Install the `+tinymce+` and `+@tinymce/tinymce-react+` packages
  163. +
  164. [source,sh]
  165. ----
  166. npm install tinymce @tinymce/tinymce-react
  167. ----
  168. . Using a text editor, create `+./src/BundledEditor.jsx+` and set the contents to:
  169. +
  170. [source,jsx]
  171. ----
  172. import { Editor } from '@tinymce/tinymce-react';
  173. // TinyMCE so the global var exists
  174. import 'tinymce/tinymce';
  175. // DOM model
  176. import 'tinymce/models/dom/model'
  177. // Theme
  178. import 'tinymce/themes/silver';
  179. // Toolbar icons
  180. import 'tinymce/icons/default';
  181. // Editor styles
  182. import 'tinymce/skins/ui/oxide/skin';
  183. // importing the plugin js.
  184. // if you use a plugin that is not listed here the editor will fail to load
  185. import 'tinymce/plugins/advlist';
  186. import 'tinymce/plugins/anchor';
  187. import 'tinymce/plugins/autolink';
  188. import 'tinymce/plugins/autoresize';
  189. import 'tinymce/plugins/autosave';
  190. import 'tinymce/plugins/charmap';
  191. import 'tinymce/plugins/code';
  192. import 'tinymce/plugins/codesample';
  193. import 'tinymce/plugins/directionality';
  194. import 'tinymce/plugins/emoticons';
  195. import 'tinymce/plugins/fullscreen';
  196. import 'tinymce/plugins/help';
  197. import 'tinymce/plugins/help/js/i18n/keynav/en';
  198. import 'tinymce/plugins/image';
  199. import 'tinymce/plugins/importcss';
  200. import 'tinymce/plugins/insertdatetime';
  201. import 'tinymce/plugins/link';
  202. import 'tinymce/plugins/lists';
  203. import 'tinymce/plugins/media';
  204. import 'tinymce/plugins/nonbreaking';
  205. import 'tinymce/plugins/pagebreak';
  206. import 'tinymce/plugins/preview';
  207. import 'tinymce/plugins/quickbars';
  208. import 'tinymce/plugins/save';
  209. import 'tinymce/plugins/searchreplace';
  210. import 'tinymce/plugins/table';
  211. import 'tinymce/plugins/visualblocks';
  212. import 'tinymce/plugins/visualchars';
  213. import 'tinymce/plugins/wordcount';
  214. // importing plugin resources
  215. import 'tinymce/plugins/emoticons/js/emojis';
  216. // Content styles, including inline UI like fake cursors
  217. import 'tinymce/skins/content/default/content';
  218. import 'tinymce/skins/ui/oxide/content';
  219. export default function BundledEditor(props) {
  220. return (
  221. <Editor
  222. licenseKey='your-license-key'
  223. {...props}
  224. />
  225. );
  226. }
  227. ----
  228. . Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
  229. . Using a text editor, open `+./src/App.jsx+` and replace the contents with:
  230. +
  231. [source,jsx]
  232. ----
  233. import { useRef } from 'react';
  234. import BundledEditor from './BundledEditor'
  235. import './App.css';
  236. export default function App() {
  237. const editorRef = useRef(null);
  238. const log = () => {
  239. if (editorRef.current) {
  240. console.log(editorRef.current.getContent());
  241. }
  242. };
  243. return (
  244. <>
  245. <BundledEditor
  246. onInit={(_evt, editor) => editorRef.current = editor}
  247. initialValue='<p>This is the initial content of the editor.</p>'
  248. init={{
  249. height: 500,
  250. menubar: false,
  251. plugins: [
  252. 'advlist', 'anchor', 'autolink', 'help', 'image', 'link', 'lists',
  253. 'searchreplace', 'table', 'wordcount'
  254. ],
  255. toolbar: 'undo redo | blocks | ' +
  256. 'bold italic forecolor | alignleft aligncenter ' +
  257. 'alignright alignjustify | bullist numlist outdent indent | ' +
  258. 'removeformat | help',
  259. content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
  260. }}
  261. />
  262. <button onClick={log}>Log editor content</button>
  263. </>
  264. );
  265. }
  266. ----
  267. endif::[]
  268. endif::[]
  269. ifeval::["{productSource}" == "zip"]
  270. ifeval::["{productUse}" == "host"]
  271. . Install the `+@tinymce/tinymce-react+` package.
  272. [source,sh]
  273. ----
  274. npm install @tinymce/tinymce-react
  275. ----
  276. . 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:
  277. +
  278. .> `tree -L 2 public`
  279. [source,text]
  280. ----
  281. public
  282. ├── favicon.ico
  283. ├── index.html
  284. ├── logo192.png
  285. ├── logo512.png
  286. ├── manifest.json
  287. ├── robots.txt
  288. └── tinymce
  289. ├── icons
  290. ├── langs
  291. ├── license.txt
  292. ├── models
  293. ├── plugins
  294. ├── skins
  295. ├── themes
  296. ├── tinymce.d.ts
  297. └── tinymce.min.js
  298. ----
  299. . Using a text editor, open `+./eslint.config.js` and add `+'src/tinymce'+` to the `+ignores+` array.
  300. +
  301. .Diff of `.eslint.config.js`
  302. [source,patch]
  303. ----
  304. export default tseslint.config(
  305. - { ignores: ['dist'] },
  306. + { ignores: ['dist', 'src/tinymce'] },
  307. {
  308. extends: [js.configs.recommended, ...tseslint.configs.recommended],
  309. files: ['**/*.{ts,tsx}'],
  310. ----
  311. . Using a text editor, open `+./src/App.jsx+` and replace the contents with:
  312. +
  313. [source,jsx]
  314. ----
  315. import { useRef } from 'react';
  316. import { Editor } from '@tinymce/tinymce-react';
  317. import './App.css';
  318. export default function App() {
  319. const editorRef = useRef(null);
  320. const log = () => {
  321. if (editorRef.current) {
  322. console.log(editorRef.current.getContent());
  323. }
  324. };
  325. return (
  326. <>
  327. <Editor
  328. tinymceScriptSrc='/tinymce/tinymce.min.js'
  329. licenseKey='your-license-key'
  330. onInit={(_evt, editor) => editorRef.current = editor}
  331. initialValue='<p>This is the initial content of the editor.</p>'
  332. init={{
  333. height: 500,
  334. menubar: false,
  335. plugins: [
  336. 'advlist', 'autolink', 'lists', 'link', 'image', 'charmap',
  337. 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
  338. 'insertdatetime', 'media', 'table', 'preview', 'help', 'wordcount'
  339. ],
  340. toolbar: 'undo redo | blocks | ' +
  341. 'bold italic forecolor | alignleft aligncenter ' +
  342. 'alignright alignjustify | bullist numlist outdent indent | ' +
  343. 'removeformat | help',
  344. content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
  345. }}
  346. />
  347. <button onClick={log}>Log editor content</button>
  348. </>
  349. );
  350. }
  351. ----
  352. . Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
  353. endif::[]
  354. ifeval::["{productUse}" == "bundle"]
  355. . Install the `+@tinymce/tinymce-react+` and `+script-loader+` packages.
  356. +
  357. [source,sh]
  358. ----
  359. npm install @tinymce/tinymce-react script-loader
  360. ----
  361. . 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:
  362. +
  363. .> `tree -L 2 src`
  364. [source,text]
  365. ----
  366. src
  367. ├── App.css
  368. ├── App.js
  369. ├── App.test.js
  370. ├── index.css
  371. ├── index.js
  372. ├── logo.svg
  373. ├── reportWebVitals.js
  374. ├── setupTests.js
  375. └── tinymce
  376. ├── icons
  377. ├── langs
  378. ├── license.txt
  379. ├── models
  380. ├── plugins
  381. ├── skins
  382. ├── themes
  383. ├── tinymce.d.ts
  384. └── tinymce.min.js
  385. ----
  386. . Using a text editor, open `+./eslint.config.js+` and add `+'src/tinymce'+` to the `+ignores+` array.
  387. +
  388. .Diff of `.eslint.config.js`
  389. [source,patch]
  390. ----
  391. diff --git a/eslint.config.js b/eslint.config.js
  392. index 092408a..1ab8db4 100644
  393. --- a/eslint.config.js
  394. +++ b/eslint.config.js
  395. @@ -5,7 +5,7 @@ import reactRefresh from 'eslint-plugin-react-refresh'
  396. import tseslint from 'typescript-eslint'
  397. export default tseslint.config(
  398. - { ignores: ['dist'] },
  399. + { ignores: ['dist', 'src/tinymce'] },
  400. {
  401. extends: [js.configs.recommended, ...tseslint.configs.recommended],
  402. files: ['**/*.{ts,tsx}'],
  403. ----
  404. . Using a text editor, create `+./src/BundledEditor.jsx+` and set the contents to:
  405. +
  406. [source,jsx]
  407. ----
  408. import { Editor } from '@tinymce/tinymce-react';
  409. // TinyMCE so the global var exists
  410. import './tinymce/tinymce.min.js';
  411. // DOM model
  412. import './tinymce/models/dom/model.min.js'
  413. // Theme
  414. import './tinymce/themes/silver/theme.min.js';
  415. // Toolbar icons
  416. import './tinymce/icons/default/icons.min.js';
  417. // Editor styles
  418. import './tinymce/skins/ui/oxide/skin.min.js';
  419. // importing the plugin index.js file.
  420. // if you use a plugin that is not listed here the editor will fail to load
  421. import './tinymce/plugins/advlist';
  422. import './tinymce/plugins/anchor';
  423. import './tinymce/plugins/autolink';
  424. import './tinymce/plugins/autoresize';
  425. import './tinymce/plugins/autosave';
  426. import './tinymce/plugins/charmap';
  427. import './tinymce/plugins/code';
  428. import './tinymce/plugins/codesample';
  429. import './tinymce/plugins/directionality';
  430. import './tinymce/plugins/emoticons';
  431. import './tinymce/plugins/fullscreen';
  432. import './tinymce/plugins/help';
  433. import './tinymce/plugins/image';
  434. import './tinymce/plugins/importcss';
  435. import './tinymce/plugins/insertdatetime';
  436. import './tinymce/plugins/link';
  437. import './tinymce/plugins/lists';
  438. import './tinymce/plugins/media';
  439. import './tinymce/plugins/nonbreaking';
  440. import './tinymce/plugins/pagebreak';
  441. import './tinymce/plugins/preview';
  442. import './tinymce/plugins/quickbars';
  443. import './tinymce/plugins/save';
  444. import './tinymce/plugins/searchreplace';
  445. import './tinymce/plugins/table';
  446. import './tinymce/plugins/visualblocks';
  447. import './tinymce/plugins/visualchars';
  448. import './tinymce/plugins/wordcount';
  449. // importing plugin resources
  450. import './tinymce/plugins/emoticons/js/emojis.js';
  451. // Content styles, including inline UI like fake cursors
  452. import './tinymce/skins/content/default/content.js';
  453. import './tinymce/skins/ui/oxide/content.js';
  454. export default function BundledEditor(props) {
  455. return (
  456. <Editor
  457. licenseKey='your-lisense-key'
  458. {...props}
  459. />
  460. );
  461. }
  462. ----
  463. . Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
  464. . Using a text editor, open `+./src/App.jsx+` and replace the contents with:
  465. +
  466. [source,jsx]
  467. ----
  468. import { useRef } from 'react';
  469. import BundledEditor from './BundledEditor'
  470. import './App.css';
  471. export default function App() {
  472. const editorRef = useRef(null);
  473. const log = () => {
  474. if (editorRef.current) {
  475. console.log(editorRef.current.getContent());
  476. }
  477. };
  478. return (
  479. <>
  480. <BundledEditor
  481. onInit={(_evt, editor) => editorRef.current = editor}
  482. initialValue='<p>This is the initial content of the editor.</p>'
  483. init={{
  484. height: 500,
  485. menubar: false,
  486. plugins: [
  487. 'advlist', 'anchor', 'autolink', 'help', 'image', 'link', 'lists',
  488. 'searchreplace', 'table', 'wordcount'
  489. ],
  490. toolbar: 'undo redo | blocks | ' +
  491. 'bold italic forecolor | alignleft aligncenter ' +
  492. 'alignright alignjustify | bullist numlist outdent indent | ' +
  493. 'removeformat | help',
  494. content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
  495. }}
  496. />
  497. <button onClick={log}>Log editor content</button>
  498. </>
  499. );
  500. }
  501. ----
  502. endif::[]
  503. endif::[]
  504. . Test the application using the Node.js development server.
  505. +
  506. * To start the development server, navigate to the `+tinymce-react-demo+` directory and run:
  507. +
  508. [source,sh]
  509. ----
  510. npm run dev
  511. ----
  512. * To stop the development server, select on the command line or command prompt and press _Ctrl+C_.
  513. == Deploying the application to a HTTP server
  514. 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].
  515. To deploy the application to a local HTTP Server:
  516. . Navigate to the `+tinymce-react-demo+` directory and run:
  517. +
  518. [source,sh]
  519. ----
  520. npm run build
  521. ----
  522. . You can optionally preview the production build by running:
  523. +
  524. [source,sh]
  525. ----
  526. npm run preview
  527. ----
  528. . Copy the contents of the `+tinymce-react-demo/dist+` directory to the root directory of the web server.
  529. The application has now been deployed on the web server.
  530. NOTE: Additional configuration is required to deploy the application outside the web server root directory, such as +http://localhost:<port>/my_react_application+.
  531. == Next Steps
  532. ifeval::["{productUse}" == "bundle"]
  533. * For information on bundling, see: xref:introduction-to-bundling-tinymce.adoc[]
  534. endif::[]
  535. * For examples of the {productname} integration, see: https://tinymce.github.io/tinymce-react/[the tinymce-react storybook].
  536. * For information on customizing:
  537. ** {productname} integration, see: xref:react-ref.adoc[].
  538. ** {productname}, see: xref:basic-setup.adoc[].
  539. ** The React application, see: https://vitejs.dev/guide/#getting-started[Getting Started with Vite] or https://react.dev/learn[the React documentation].