This is aproximately what I'm doing also. (I don't have yet production code with<div>Tiny, but near to have)</div><div><br></div><div>Cheers.</div><div><br><div><div class="gmail_quote">2010/2/24 Richard Durr <span dir="ltr"><<a href="mailto:richard.durr@googlemail.com">richard.durr@googlemail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Maybe this helps:<br>
In your Component, add a method where you add all the files you need<br>
for tinymce:<br>
<br>
Component >> #updateRoot: anHtmlRoot<br>
super updateRoot: anHtmlRoot.<br>
anHtmlRoot javascript url: '<a href="http://url" target="_blank">http://url</a> to tinyMCE'<br>
"/js/tinymce/jscripts/tiny_mce/tiny_mce.js"<br>
<br>
and then add a script method like this:<br>
<br>
Component >> #script<br>
'<br>
tinyMCE.init({<br>
theme : "advanced",<br>
mode: "exact",<br>
elements : "elm1",<br>
theme_advanced_toolbar_location : "top",<br>
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,"<br>
+ "justifyleft,justifycenter,justifyright,justifyfull,formatselect,"<br>
+ "bullist,numlist,outdent,indent",<br>
theme_advanced_buttons2 : "link,unlink,anchor,image,separator,"<br>
+"undo,redo,cleanup,code,separator,sub,sup,charmap",<br>
theme_advanced_buttons3 : "",<br>
height:"350px",<br>
width:"600px"<br>
});<br>
'<br>
<br>
in your #renderContentOn: method add id="elm1" name="elm1" to your textarea.<br>
<br>
This should work..I hope ^^<br>
<div><div></div><div class="h5"><br>
On Tue, Feb 23, 2010 at 12:00 PM, John McKeon <<a href="mailto:p3anoman@gmail.com">p3anoman@gmail.com</a>> wrote:<br>
> Hello Bernat,<br>
> The only help I can offer regarding tinyMCE is to look at Seabreeze. Its a<br>
> WisualWorks based Seaside development environment. They use tinyMCE and<br>
> developed the complex mechanism required to feed the js files from a<br>
> WAFileLibrary. (The big problem is the subdirectory structure where tintMCE<br>
> expects to find its code. A subdirectory structure that makes me ill to look<br>
> at and the main reason why i shyed away from all other web dev environments<br>
> like rails and php; files on top of files, miles and miles of files.....but<br>
> I rant. Smalltalk took me away from all that :)<br>
> As far as writing JS in ST it turns out to pretty simple just don't try to<br>
> delve to deeply into the implementation of Scriptaculous, it may only<br>
> confuse you. Just render a textArea and add an onEnter: clause to render the<br>
> magical incantation required - at least I think that is how tmce works. It<br>
> is a long time since I looked into using it. Take a look at the onXXX:<br>
> methods of WATagBrush.<br>
> Hope this helps a bit.<br>
><br>
> On Mon, Feb 22, 2010 at 11:44 PM, AxiNat <<a href="mailto:tibabenfortlapalanca@gmail.com">tibabenfortlapalanca@gmail.com</a>><br>
> wrote:<br>
>><br>
>> I don't wanna be annoying, but I really can't find any specific info on<br>
>> embedding fairly complex javascript apps in Seaside.<br>
>><br>
>> I've read the whole chapter in the Seaside book, and some post by Ramon<br>
>> Leon (which points the way to go but doesn't get into the subject). I also<br>
>> googled a lot, but can't seem to find a nice howto going step by step.<br>
>><br>
>> For what I understand (which is ~0), I'd have to:<br>
>><br>
>> Add the .js file to my file library (in the case of TinyMCE, there's a lot<br>
>> of js files, so here comes my first problem)<br>
>> Create accessors in my file library for I really didn't understand what<br>
>> Subclass a WAComponent that will implement a method called script, which<br>
>> returns the said js file<br>
>> Obviously, something else that I'm totally missing<br>
>> Embed this component into the component I wish (I have no problems with<br>
>> this step)<br>
>><br>
>> I guess I really didn't understand how the whole thing works. One big<br>
>> issue is that I have no idea whatsoever about how Javascript works, but I'd<br>
>> really love to be able to keep away from coding something that's not<br>
>> Smalltalk in my web app.<br>
>><br>
>> Thank you and please excuse my dumbness ;)<br>
>><br>
>> Bernat.<br>
>><br>
>> 2010/2/22 Germán Arduino <<a href="mailto:garduino@gmail.com">garduino@gmail.com</a>><br>
>>><br>
>>> I think that the wiki of Tiny may help, in particular this page:<br>
>>><br>
>>> <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Installation" target="_blank">http://wiki.moxiecode.com/index.php/TinyMCE:Installation</a><br>
>>><br>
>>> Cheers.<br>
>>> Germán.<br>
>>><br>
>>><br>
>>> 2010/2/22 AxiNat <<a href="mailto:tibabenfortlapalanca@gmail.com">tibabenfortlapalanca@gmail.com</a>><br>
>>>><br>
>>>> Thanks, I knew about TinyMCE because I used to build websites in Joomla,<br>
>>>> which has a TinyMCE component, but I really have zero experience in<br>
>>>> embedding Javascript in a Seaside app, any quick howto available around?<br>
>>>><br>
>>>> 2010/2/22 Germán Arduino <<a href="mailto:garduino@gmail.com">garduino@gmail.com</a>><br>
>>>>><br>
>>>>> I like to embed TinyMCE: <a href="http://tinymce.moxiecode.com/" target="_blank">http://tinymce.moxiecode.com/</a> . Is a bit big,<br>
>>>>> but pretty complete.<br>
>>>>><br>
>>>>> Cheers.<br>
>>>>> Germán.<br>
>>>>><br>
>>>>><br>
>>>>> 2010/2/22 AxiNat <<a href="mailto:tibabenfortlapalanca@gmail.com">tibabenfortlapalanca@gmail.com</a>>:<br>
>>>>> > Hi all,<br>
>>>>> ><br>
>>>>> > So far I've been always using the WYSIWYG ShoreComponents text editor<br>
>>>>> > for my<br>
>>>>> > websites, but now I'd need something a little bit more complex, I'd<br>
>>>>> > just<br>
>>>>> > need to add the possibility to create links and add images to the<br>
>>>>> > text,<br>
>>>>> > nothing else.<br>
>>>>> ><br>
>>>>> > I wanted to modify the ShoreComponents editor myself, but my<br>
>>>>> > knowledge in<br>
>>>>> > Javascript is as extensive as my knowledge in the harvesting of the<br>
>>>>> > Korean<br>
>>>>> > pumpkin...<br>
>>>>> ><br>
>>>>> > What do you guys usually use?<br>
>>>>> ><br>
>>>>> > Thanks!<br>
>>>>> ><br>
>>>>> > Bernat Romagosa.<br>
>>>>> ><br>
>>>>> > --<br>
>>>>> ><br>
>>>>> > Ted Turner - "Sports is like a war without the killing."<br>
>>>>> > _______________________________________________<br>
>>>>> > seaside mailing list<br>
>>>>> > <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>>>>> > <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>>>>> ><br>
>>>>> ><br>
>>>>> _______________________________________________<br>
>>>>> seaside mailing list<br>
>>>>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>>>>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>><br>
>>>> Joan Crawford - "I, Joan Crawford, I believe in the dollar. Everything<br>
>>>> I earn, I spend."<br>
>>>> _______________________________________________<br>
>>>> seaside mailing list<br>
>>>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>>>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> seaside mailing list<br>
>>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>><br>
>> Jonathan Swift - "May you live every day of your life."<br>
>> _______________________________________________<br>
>> seaside mailing list<br>
>> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> <a href="http://jmck.seasidehosting.st" target="_blank">http://jmck.seasidehosting.st</a><br>
><br>
> _______________________________________________<br>
> seaside mailing list<br>
> <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
><br>
><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br><br clear="all"><br><br>
</div></div>