Closed woniesong92 closed 10 years ago
Is it not the right way to include javascript?
<script>
$("textarea#new-editor").editor();
</script>
@Petah @faceleg I've isolated this in a stripped down app. Might need your input.
@maxsong1002 @lionelrudaz @ymatagne please try the following:
//= require jquery-ui
then change to //= require jquery.ui.all
.$(".editable").editor()
to $(".editable").raptor()
(change the selector and options to suit).It seems that the jquery-rails gem doesn't provide jQuery UI 1.10 yet so we always need to use the jquery-ui-rails gem instead. I'll update the README with this information.
I need to talk to the Raptor Editor core guys about the consequences of step 2 above.
These changes work in my local tests. Please let me know your experiences.
Hi Tristan,
Thanks for the update.
If I set the selector to an ID, Raptor doesn't appear. If I set it as a class, like in your example, the program keeps loading and crashes.
I've updated my repo, maybe it helps.
I've seen that when the page crashes it sits and waits for a long time on some assets from raptor-editor.com
. It seems to me it's actually an issue with the raptor core, not this gem.
Damn!
What can I do then? Do I have to submit an issue to Raptor Editor?
I thought raptor-editor could be the perfect replacement for Mercury that even works on Internet Explorer. It's unfortunate such a critical error cannot be fixed. :(
@maxsong1002 although it is true that we are very close to our 1.0 release, as a beta it is normal for breaking changes to be made. We don't actually like making such changes, as we absolutely do know what it is like to be on the receiving end of them.
In saying this, our goal is to reach as stable and complete a product before v1.0 as possible, and at times this does mean that things need to change.
For example, $(selector).editor()
was changed to $(selector).raptor()
to ensure there would be no conflict with any current or future product that assumed editor()
would be available.
As for helping with issues, we try our best. What we cannot do however, is see what you see. The most helpful thing for us are either pastes of actual console / terminal output produced at the time of the issue, or a JSFiddle demonstrating the issue. Without either of these, determining the exact cause is at best difficult, at worst a wild goose chase.
As @faceleg from the Raptor core team has said, they're on the brink of a new release. This new release will change the way Raptor is compiled and downloaded so we are going to sit tight and release a new version of raptor-editor-rails around the same time. Until then, if you're still having difficulty, you may want to download and install Raptor manually from raptor-editor.com.
I'll make a note in the README too.
:+1: for closing this issue now, as it's not an issue for this gem. At least not for now.
Hi,
I'm getting this error "TypeError: $(...).raptor is not a function $("textarea#text").raptor();"
@pramachan What options did you use in your config.yml
? I think by default it downloads raptor in no conflict mode, in which case, you should use raptor(function($) { $("textarea#text").raptor(); });
Petah,
Thank you very much! Its working well.
I get the following error on Firebug after installing raptor-editor-rails successfully.
The textarea remains unchanged.
My settings:
_form.html.erb
application.js