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

TinyMCE image/html popups not working with deployed assets #121

Closed
coneybeare opened this issue Dec 28, 2012 · 10 comments
Closed

TinyMCE image/html popups not working with deployed assets #121

coneybeare opened this issue Dec 28, 2012 · 10 comments

Comments

@coneybeare
Copy link

On the local machine (served over pow) , the html and image popups work great. Once deployed, and my assets are compiled, uploaded to s3 and served over cloudfront, the popups do not work.

It is a bunch of "Undefined' is not an object errors.

Screen Shot 2012-12-28 at 10 43 54 AM

Any idea on what may be wrong?

@jipiboily
Copy link
Owner

Have you overwritten the application.js provided with Monologue? Could you maybe paste the content of the compiled application.js file?

Also, could you put both your Gemfile and Gemfile.lock in a gist? Maybe you have a tinymce-rails versions that has problems, never seen that one before.

Is there a way for me to see that project? Be it the source if it is open or the production setup you tried?

@coneybeare
Copy link
Author

I can't publicly share any of the code, but I will give you access to the private repo, and I can set you up with an admin login until we figure this out.

@jipiboily
Copy link
Owner

Thanks for that. It might have to do with tinymce-rails not really supporting being hosted on a CDN. This will have to be digged down a bit more. Some links that could be useful:

@coneybeare
Copy link
Author

Well, I spent a few hours on it, but TBH, it's not worth it. I just write blog posts locally while connected to my production DB and manually clear the cache.The only interesting solution I may have found is something found on the top of tiny_mce_popup.js:

// Uncomment and change this document.domain value if you are loading the script cross subdomains
// document.domain = 'moxiecode.com';

But in order for me to do this, it would require manually integrating tinymce and killing it in monologue, something that is not worth the effort. Feel free to close the ticket if you would like.

@jipiboily
Copy link
Owner

Thanks for following up. Sorry for that.

I'll close for now.

By the way, TinyMCE might be replaced at some point, if you have suggestions, do not hesitate to let me know. Main reason being for adding image upload. More here: #61

Regards.

@jvortmann
Copy link
Contributor

I still having this problem (the TinyMCE popup does not open when the assets are on S3).

Still hadn't had time to look into it.

Any news about it?

@jvortmann
Copy link
Contributor

@jipiboily I could make Monologue work and use the assets on S3.

BUT it was made using a hack. Take a look at https://github.com/jvortmann/monologue/tree/tinymce

I didn't have time to take a closer look and build a solution so Monologue works out-of-the-box with tinymce.
Also, we can think about other solutions for the embedded editor like http://aloha-editor.org/ (https://github.com/locomotivecms/aloha-rails) or this one http://jejacks0n.github.com/mercury/

@jipiboily
Copy link
Owner

@jvortmann thanks for that hack, might benefit other people! That said, like you said, it's a hack :)

PLUS, there are plans to have a support for image upload and we might change TinyMCE, which anyway, is not that good. Feel free to jump in here (#61).

PS: the aloha-rails gem does not look to be maintained...

@jipiboily
Copy link
Owner

Oh, forgot to mention: if you prefer editing your post in markdown, take a look at an extension I did: https://github.com/jipiboily/monologue-markdown. It could also give you ideas on how to replace TinyMCE with an extension for your specific needs!

@jvortmann
Copy link
Contributor

BTW,

I needed to overwrite the form view and add the tinymce javascript from the assets folder (where I force it to be) on the app I am using Monologue. Like this:

<script src="/assets/tinymce-jquery.js" type="text/javascript"></script>

I would use Markdown, but the app is for a client that is not into computers ;)

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

3 participants