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

Isomorphic Support #50

Closed
tim-field opened this issue May 18, 2016 · 7 comments
Closed

Isomorphic Support #50

tim-field opened this issue May 18, 2016 · 7 comments

Comments

@tim-field
Copy link

tim-field commented May 18, 2016

Thanks for writing this.

In an isomorphic app, this library fails when rendering on server with


                var $ = window.jQuery || window.Zepto;
                              ^
                TypeError: Cannot read property 'jQuery' of undefined
@tim-field
Copy link
Author

Just found #37

Hmm strange because I can include draft.js fine.

@ZeroCho
Copy link
Contributor

ZeroCho commented May 18, 2016

As I said in #37 I gave up and decided not to render react-rte in server-side.
If you solve this problem, plz let me know.
Actually it is not react-rte problem, but draft-js' or between two

@jonirrings
Copy link

@ZeroCho I've endeavoured to integrate, but failed too as the draft-js used ua-parser-js. shall we add an issue to the official draft-js repo?

@ZeroCho
Copy link
Contributor

ZeroCho commented May 20, 2016

@jonirrings yes, after I search for similar issues in draft-js repo

@sstur
Copy link
Owner

sstur commented May 20, 2016

I'm going to close this as I believe this is not possible until draft-js supports it.

@andrewmclagan
Copy link

andrewmclagan commented Jun 9, 2016

an interim solution

import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';

class MyComponent {
  render() {
    return (
      <div>
        { canUseDOM && React.createElement(require('react-rte')) }
      </div>
    );
  }
}

@artskar
Copy link

artskar commented Feb 14, 2017

@andrewmclagan thats is not working. :\

#175

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

6 participants