"NAKAMURA, Hiroshi" <nahi / keynauts.com> wrote in
<JIEJKAMAONAMHNNAOOOLIEJKCFAA.nahi / keynauts.com>: 

>
>How does the server interprete rbi_code tag?
>Does this patch engage your interest?
>Though I have not run the code...
>

To be honest, I hacked rw.cgi to get this thing running. Of course your
proposal (putting it into rd2rwiki-lib.rd) would make it much cleaner.
Would it eventually even make sense to generally extend rw2rwiki by
allowing the developer to register special tag-handlers in the
rd2rwiki-processor? Anyhow, if we decide to integrate the rbi_code-tag
(or however it should be called) into your rwiki we not only need the
"tag -> form"-conversion but also attach a javascript-function for
opening the ruby-interpreter-result window...Hmmm, we could circumvent
this though by putting the javascript code into the form-onSubmit
attribute! This would result in the following l o n g form-pattern:
"
<form method="POST" onSubmit="var ie=document.all?1:0;var
<ns=document.layers?1:0;var
<url;winStats='toolbar=no,location=no,directories=no,menubar=no,';winStats
<+='scrollbars=no,width=400,height=300';if (ie)
<{winStats+=',left=10,top=25'}else{winStats+=',screenX=10,screenY=25'};flo
<ater=window.open('','RubyResults',winStats);floater.focus();return
<true;" id="rubyinterpreter" TITLE="rubyinterpreter"
<ACTION="http://www.ruby.ch/rbx/rbinterp.rbx" target="RubyResults"> 
<textarea id="rubycode" name="cmd" rows="2"> 
#{content_str}
</textarea>
<input type="SUBMIT" value="interpret it!">
</form>
"

NOTE: Providing the absolute url to my interpreter allows *any* rwiki to
make use of this feature! 

A (small) problem remains: 
I set the rows attribute of the textarea dynamically, depending on the
code size. 

Thanks a lot Nahi.
Hopefully I (we) get some more feedback to this issue.

Clemens