Forum: Ruby on Rails dojo and rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
sergiborras (Guest)
on 2005-11-29 13:39
(Received via mailing list)
Hi there,

Does anyone now if Dojo can be used with Rails atm ? I am trying to
include the Dojo Rich Text Editor in a rhtml with no success.
kyle (Guest)
on 2005-11-29 18:43
(Received via mailing list)
It should work.
sergiborras (Guest)
on 2005-11-29 19:27
(Received via mailing list)
the following does not work in an .rhtml maybe i am doing something
wrong

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript"
src="file:///C|/dojo_svn/dojo.js"></script>
<script language="javascript" type="text/javascript">
dojo.require("dojo.widget.Editor");
</script>
</head>
<body>
<h1>New document</h1>
<div class="dojo-Editor">some text</div>
</body>
</html>
josh.charles (Guest)
on 2005-11-29 20:08
(Received via mailing list)
When you change it to an RHTML file, you need to change the src
attribute of your <script> tag to something served from the server,
even if it's just localhost.

Josh
a.filipowski (Guest)
on 2005-11-30 21:42
(Received via mailing list)
Has anyone gotten dojo to work? especially the rich text editor? I
downloaded the kitchen sink from the nightly build and tried using
the textbox call as well as the div call that they mention on  the
site but I can't get the editor to appear at all.

I have the following calls in my header for javascripts:

<%= javascript_include_tag 'prototype', 'behaviour', 'scriptaculous',
'prototype-ex', 'date-picker' %>
   <script src="http://localhost:3007/javascripts/dojo.js" type="text/
javascript"></script>
	<script type="text/javascript">dojo.require("dojo.widget.Editor");</
script>


But ca not for the life of me get the editor to appear.

Andrew
sergi borras (Guest)
on 2005-12-12 16:18
(Received via mailing list)
Yes, I did as Josh told me, and it worked for the the rt editor. As
long as the src attribute of the script tag points to a file served by
the server, it should work.
This topic is locked and can not be replied to.