tinymce / tinymce-react

Offical TinyMCE React component
MIT License
937 stars 152 forks source link

Trouble Configuring Local TinyMCE with create-react-app for Capacitor.js/Cordova Project #488

Closed nolanmak closed 7 months ago

nolanmak commented 7 months ago

Hello, I am currently working on a project using create-react-app that will be deployed as an iOS app through Capacitor.js (similar constraints apply for Cordova environments). I have encountered significant challenges in setting up TinyMCE locally within this framework and am seeking assistance or advice on how to properly configure it.

Issue Description: The primary issue is integrating TinyMCE locally within a create-react-app setup. I have tried placing the TinyMCE assets in the public folder and referencing them in the TinyMCE configuration, but this approach has led to the editors not initializing – they simply show a blank area with no console errors. I am using the tinymce-react wrapper for React integration. Here is a snippet of the configuration I'm using:

<Editor init={{ base_url: '/tinymce', suffix: '.min', }} />

Constraints and Considerations:

Specific Questions:

Any guidance, advice, or references to relevant documentation would be greatly appreciated. I am open to considering alternative approaches if they align with the project's constraints.

Thank you in advance for your help!

exalate-issue-sync[bot] commented 7 months ago

Internal Ref: INT-3262

nolanmak commented 7 months ago

The solution is to use tinymceScriptSrc.

 <Editor
  tinymceScriptSrc='/path/to/tinymce.min.js'
/>

tinymce-react documentation