Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How would I use this with react-tinymce #132

Open
andrewhl opened this issue Nov 23, 2017 · 1 comment
Open

Question: How would I use this with react-tinymce #132

andrewhl opened this issue Nov 23, 2017 · 1 comment

Comments

@andrewhl
Copy link

I'm using react-tinymce with a create-react-app application. I would love to use this plugin, but I'm not quite sure how to integrate it.

I've tried downloading the source and loading it in as follows:

    <script src="https://cloud.tinymce.com/stable/tinymce.min.js?apiKey=..."></script>
    <script src="/ice.min.js" />

and in my react component implementation:

            <TinyMCE
                content={this.props.content}
                config={{
                    plugins: ['ice'],
                    height: 400,
                }}
                onChange={(e) => handleEditorChange(e, this.props)}
            />

but I get the following error:

Uncaught TypeError: Cannot read property 'appendChild' of undefined
    at tinymce.min.js?apiKey=...:43
(anonymous) @ tinymce.min.js?apiKey=...:43
setTimeout (async)
jsFontsKey @ tinymce.min.js?apiKey=...:43
fontsKey @ tinymce.min.js?apiKey=...:43
get @ tinymce.min.js?apiKey=..:43
(anonymous) @ tinymce.min.js?apiKey=..:44
d @ tinymce.min.js?apiKey=...:44
requestFingerprint @ tinymce.min.js?apiKey=...:44
g @ tinymce.min.js?apiKey=...:44
d @ tinymce.min.js?apiKey=...:44
fold @ tinymce.min.js?apiKey=...:43
(anonymous) @ tinymce.min.js?apiKey=...:44
(anonymous) @ tinymce.min.js?apiKey=...:44
(anonymous) @ tinymce.min.js?apiKey=...:44
invariant.js:42 Uncaught Error: Target container is not a DOM element.
    at invariant (invariant.js:42)
    at renderSubtreeIntoContainer (react-dom.development.js:17059)
    at Object.render (react-dom.development.js:17129)
    at Object../src/index.js (index.js:26)
    at __webpack_require__ (bootstrap bc887c91ff9f47c0e6d2:659)
    at fn (bootstrap bc887c91ff9f47c0e6d2:85)
    at Object.0 (dataURItoBlob.js:26)
    at __webpack_require__ (bootstrap bc887c91ff9f47c0e6d2:659)
    at ./node_modules/ansi-regex/index.js.module.exports (bootstrap bc887c91ff9f47c0e6d2:708)
    at bundle.js:712
@nsklyarov
Copy link

dont use react-tinymce, because it supported only tinymce 4xx version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants