Asked this before but going to again about the editor

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Asked this before but going to again about the editor

Andrew Filipowski
I downloaded the latest nightly build this afternoon and am trying to  
get the editor to work. I am building an app in rails and I am using  
some of the prototype library as well as the scriptaculous library. I  
have the following statement in my header:

<script src="/javascripts/src/widget/__package__.js"></script>

I have also tried including the dojo.js file as well.

In every case using either the editor in a text area or using the  
editor in a div it never appears and the content is not usable. How  
do I use the dojo toolkit with rails?

thanks

Andrew

_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Asked this before but going to again about the editor

Alex Russell
On Tuesday 13 December 2005 11:13 am, Andrew Filipowski wrote:
> I downloaded the latest nightly build this afternoon and am trying to
> get the editor to work. I am building an app in rails and I am using
> some of the prototype library as well as the scriptaculous library. I
> have the following statement in my header:
>
> <script src="/javascripts/src/widget/__package__.js"></script>

Include dojo.js instead. You'll also need to require() the Editor (as in
all the examples), like this:

<script src="/path/to/dojo.js"
        type="text/javascript"></script>
<script type="text/javascript">
        dojo.require("dojo.widget.Editor");
</script>

And you should be good-to-go.

Regards

--
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Asked this before but going to again about the editor

Andrew Filipowski
Alex,
Thanks I finally figured out what my problem was. Time to go back to  
the drawing board on my app as the richtext editor will not work for  
me right now as is (either I have to wait for the editor to change or  
I have to make some changes). I wanted to use the textarea version  
however that one seems to not work on safari, and the entire thing  
seems to not work on firefox (i finally got the editor to load in  
safari). My main problem and perhaps this is something that can be  
fixed in the near future is that I had the editor residing in a dom  
that has display set to none. If I removed that div I am able to see  
the editor just fine but not in the textarea tag. Making my users  
click submit twice is not going to be an option for me right now so I  
will have to figure something else out. Also I found that including  
the dojo.js as mentioned is very slow, but perhaps that is the fact  
that I have prototype, scriptaculous a date picker and a custom  
library also loading. I would like to get these down but no one  
library has everything that I need in it. Dojo looks like it has the  
most promise and will definately keep my eye on it.

Andrew


On Dec 13, 2005, at 2:22 PM, Alex Russell wrote:

> On Tuesday 13 December 2005 11:13 am, Andrew Filipowski wrote:
>> I downloaded the latest nightly build this afternoon and am trying to
>> get the editor to work. I am building an app in rails and I am using
>> some of the prototype library as well as the scriptaculous library. I
>> have the following statement in my header:
>>
>> <script src="/javascripts/src/widget/__package__.js"></script>
>
> Include dojo.js instead. You'll also need to require() the Editor  
> (as in
> all the examples), like this:
>
> <script src="/path/to/dojo.js"
> type="text/javascript"></script>
> <script type="text/javascript">
> dojo.require("dojo.widget.Editor");
> </script>
>
> And you should be good-to-go.
>
> Regards
>
> --
> Alex Russell
> [hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
> [hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46

_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Asked this before but going to again about the editor

Alex Russell
On Tuesday 13 December 2005 11:50 am, Andrew Filipowski wrote:
> Alex,
> Thanks I finally figured out what my problem was. Time to go back to
> the drawing board on my app as the richtext editor will not work for
> me right now as is (either I have to wait for the editor to change or
> I have to make some changes). I wanted to use the textarea version
> however that one seems to not work on safari, and the entire thing
> seems to not work on firefox (i finally got the editor to load in
> safari).

What build are you working from? Both should work. If they don't, it's a
bug and should be fixed before we release 0.2 tomorrow.

> My main problem and perhaps this is something that can be
> fixed in the near future is that I had the editor residing in a dom
> that has display set to none. If I removed that div I am able to see
> the editor just fine but not in the textarea tag. Making my users
> click submit twice is not going to be an option for me right now so I
> will have to figure something else out.

When instantiated from a textarea, the editor hooks into the onsubmit
event of the form and should correctly populate the current editor
value into the textarea that is participating in the form. It should
Just Work (TM).

Can you show me a demo page where this *doesn't* work?

> Also I found that including
> the dojo.js as mentioned is very slow, but perhaps that is the fact
> that I have prototype, scriptaculous a date picker and a custom
> library also loading. I would like to get these down but no one
> library has everything that I need in it. Dojo looks like it has the
> most promise and will definately keep my eye on it.

More likely you're using a nightly snapshot and not a build at all. You
can get profile builds from:

        http://archive.dojotoolkit.org/nightly-profiles/

Regards

--
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Asked this before but going to again about the editor

Andrew Filipowski
Alex,
I went to the following page and downloaded dojo in a zip format from the link right at the top:


Just clicked on the zip link there.

Like I said I was able to get the editor to load when using with a div but not with a text area. And the div only worked on safari.

Here is some of the code that I am using (rails code) as this is all on my local machine right now and don't have a rails server set up anywhere to load this up to to show you:

<div id="edit<%= h(@question.id) %>">
<%= form_remote_tag( :update => 'SurveyDesignArea',
:url => {:action => 'update_text_design'}) %>
Your Text:<br/>
<br/>
<br/>
<%= javascript_include_tag 'dojo' %>
<script type="text/javascript" language="javascript">
            dojo.require("dojo.widget.Editor");
            </script>
            <textarea dojoType="Editor" id="question_text" name="question_text"><% @question.question_text %></textarea>
            <br/>
<br/>
<div dojoType="Editor"
                items="bold;italic;underline;strikethrough;">
                some content
            </div>
<%= hidden_field_tag(:id, @question.id) %>
<div id="profile_button" >
<%= submit_tag("Udate") %>
&nbsp;
<a href="javascript:void(0)" onclick="Question.cancel_edit_question(<%= h(@question.id) %>)">Cancel</a>
</div>
<%= end_form_tag %>
</div>

originally the div tag at the top had a style=display:none set however the editor would not load at all in both safari and firefox, also IE (windows box hitting my machine in the local network). I just went and downloaded the nightly profile kitchen sink and that did speed up so I guess I did grab a snapshot not a profile. the one i grabbed is the kitchen_sink-2005-12-13.zip however the textbox does not appear at all in either browser.

the cancel button calls to hide the div, and when I show the div again the div based editor does not contain any content nor is it editable anymore. This is something that I could work around but the textarea not working at all is something that I probably can't get around at this time. Especially since I can't get the editor to open in firefox.

Hope this helps feel free to contact me directly if you have any other questions or if there is any thing else I can do to help with this.

Andrew


On Dec 13, 2005, at 3:30 PM, Alex Russell wrote:

On Tuesday 13 December 2005 11:50 am, Andrew Filipowski wrote:
Alex,
Thanks I finally figured out what my problem was. Time to go back to
the drawing board on my app as the richtext editor will not work for
me right now as is (either I have to wait for the editor to change or
I have to make some changes). I wanted to use the textarea version
however that one seems to not work on safari, and the entire thing
seems to not work on firefox (i finally got the editor to load in
safari). 

What build are you working from? Both should work. If they don't, it's a 
bug and should be fixed before we release 0.2 tomorrow.

My main problem and perhaps this is something that can be 
fixed in the near future is that I had the editor residing in a dom
that has display set to none. If I removed that div I am able to see
the editor just fine but not in the textarea tag. Making my users
click submit twice is not going to be an option for me right now so I
will have to figure something else out.

When instantiated from a textarea, the editor hooks into the onsubmit 
event of the form and should correctly populate the current editor 
value into the textarea that is participating in the form. It should 
Just Work (TM).

Can you show me a demo page where this *doesn't* work?

Also I found that including 
the dojo.js as mentioned is very slow, but perhaps that is the fact
that I have prototype, scriptaculous a date picker and a custom
library also loading. I would like to get these down but no one
library has everything that I need in it. Dojo looks like it has the
most promise and will definately keep my eye on it.

More likely you're using a nightly snapshot and not a build at all. You 
can get profile builds from:


Regards

-- 
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46


_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Asked this before but going to again about the editor

Andrew Filipowski
Some clarifications,
After going and downloading this build I went ahead and tried it out on another windows box in the office. The textbox does work in IE. I am using allot of ajax calls though and I found that if I don't do a full page refresh the editor never appears. It also does work in IE when the page containing div is not displayed so the hiding and showing div issue is definatly something that is more non IE browser based than anything.

Thanks for all the help.

Andrew


On Dec 13, 2005, at 4:23 PM, Andrew Filipowski wrote:

Alex,
I went to the following page and downloaded dojo in a zip format from the link right at the top:


Just clicked on the zip link there.

Like I said I was able to get the editor to load when using with a div but not with a text area. And the div only worked on safari.

Here is some of the code that I am using (rails code) as this is all on my local machine right now and don't have a rails server set up anywhere to load this up to to show you:

<div id="edit<%= h(@question.id) %>">
<%= form_remote_tag( :update => 'SurveyDesignArea',
:url => {:action => 'update_text_design'}) %>
Your Text:<br/>
<br/>
<br/>
<%= javascript_include_tag 'dojo' %>
<script type="text/javascript" language="javascript">
            dojo.require("dojo.widget.Editor");
            </script>
            <textarea dojoType="Editor" id="question_text" name="question_text"><% @question.question_text %></textarea>
            <br/>
<br/>
<div dojoType="Editor"
                items="bold;italic;underline;strikethrough;">
                some content
            </div>
<%= hidden_field_tag(:id, @question.id) %>
<div id="profile_button" >
<%= submit_tag("Udate") %>
&nbsp;
<a href="javascript:void(0)" onclick="Question.cancel_edit_question(<%= h(@question.id) %>)">Cancel</a>
</div>
<%= end_form_tag %>
</div>

originally the div tag at the top had a style=display:none set however the editor would not load at all in both safari and firefox, also IE (windows box hitting my machine in the local network). I just went and downloaded the nightly profile kitchen sink and that did speed up so I guess I did grab a snapshot not a profile. the one i grabbed is the kitchen_sink-2005-12-13.zip however the textbox does not appear at all in either browser.

the cancel button calls to hide the div, and when I show the div again the div based editor does not contain any content nor is it editable anymore. This is something that I could work around but the textarea not working at all is something that I probably can't get around at this time. Especially since I can't get the editor to open in firefox.

Hope this helps feel free to contact me directly if you have any other questions or if there is any thing else I can do to help with this.

Andrew


On Dec 13, 2005, at 3:30 PM, Alex Russell wrote:

On Tuesday 13 December 2005 11:50 am, Andrew Filipowski wrote:
Alex,
Thanks I finally figured out what my problem was. Time to go back to
the drawing board on my app as the richtext editor will not work for
me right now as is (either I have to wait for the editor to change or
I have to make some changes). I wanted to use the textarea version
however that one seems to not work on safari, and the entire thing
seems to not work on firefox (i finally got the editor to load in
safari). 

What build are you working from? Both should work. If they don't, it's a 
bug and should be fixed before we release 0.2 tomorrow.

My main problem and perhaps this is something that can be 
fixed in the near future is that I had the editor residing in a dom
that has display set to none. If I removed that div I am able to see
the editor just fine but not in the textarea tag. Making my users
click submit twice is not going to be an option for me right now so I
will have to figure something else out.

When instantiated from a textarea, the editor hooks into the onsubmit 
event of the form and should correctly populate the current editor 
value into the textarea that is participating in the form. It should 
Just Work (TM).

Can you show me a demo page where this *doesn't* work?

Also I found that including 
the dojo.js as mentioned is very slow, but perhaps that is the fact
that I have prototype, scriptaculous a date picker and a custom
library also loading. I would like to get these down but no one
library has everything that I need in it. Dojo looks like it has the
most promise and will definately keep my eye on it.

More likely you're using a nightly snapshot and not a build at all. You 
can get profile builds from:


Regards

-- 
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46

_______________________________________________
Dojo-interest mailing list


_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Loading...