[pmwiki-users] Help to toggle wrap for textarea in edit-form

Daniel Andersson list at daniel-gr-andersson.com
Fri May 13 10:20:42 CDT 2011


Hi Esteve

Excellent.

Can I include the line from the recipe
document.getElementById("text").setAttribute("wrap","off");
in my EditForm somehow?

This recipe could definitely come to good use.


Thanks

/Daniel

On 05/13/2011 02:55 PM, Esteve Boix wrote:
>
> Take a look at AjaxEditSupport, a recipe I wrote
> (http://www.pmwiki.org/wiki/Cookbook/AjaxEditSupport).
> I changed the textarea wrapping to make the search functionality work.
>
> Regards,
> Esteve
>
> Al 12/05/11 20:43, En/na Daniel Andersson ha escrit:
>> Hi again
>>
>> Can I modify e_textarea in the Edit Form?
>>
>> I've been searching through the PmWiki site and the mailing list
>> trying to get my head around this.
>>
>> Haven't anyone done this before?
>>
>>
>> /Daniel
>>
>> On 05/05/2011 01:25 PM, Daniel Andersson wrote:
>>> Hi all
>>>
>>> I want to toggle wrap for the textarea in the edit-form, since I edit
>>> broad simple tables 50 times a day.
>>>
>>> I have some working HTML javascript code to do this below.
>>> What is the best way to go about this?
>>>
>>> When I edit my Site.EditForm from PmWiki I find (:input e_textarea:),
>>> but I'm not sure how to insert my HTML and Javascript here.
>>>
>>> <HTML>
>>> <BODY>
>>> <SCRIPT type='text/javascript'><!--
>>> function set_wrap(b, t) {
>>> var ta = document.getElementById(t), n = ta.cloneNode(true);
>>> n.setAttribute('wrap', b.options[b.selectedIndex].value);
>>> ta.parentNode.replaceChild(n, ta);
>>> }
>>> --></SCRIPT>
>>> <FORM>
>>> <TEXTAREA id='off' cols='15' wrap='off'>One, Two, Three, Four, Five,
>>> Six, Seven, Eight, Nine, Ten</TEXTAREA>
>>> <SELECT onChange='set_wrap( this, "off" );'>
>>> <OPTION value='soft'>soft</OPTION>
>>> <OPTION value='off' selected>off</OPTION>
>>> <OPTION value='hard'>hard</OPTION>
>>> </SELECT>
>>> </FORM>
>>> </BODY>
>>> </HTML>
>>>
>>>
>>> PS. Any tip of a Firefox add-on to toggle wrap compatible with Firefox
>>> 3.5? Wrap Switcher 1.1 only works with 3.0.
>>>
>>>
>>> Cheers
>>> Daniel
>>>
>>> _______________________________________________
>>> pmwiki-users mailing list
>>> pmwiki-users at pmichaud.com
>>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>
>>
>> _______________________________________________
>> pmwiki-users mailing list
>> pmwiki-users at pmichaud.com
>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>
>>
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users




More information about the pmwiki-users mailing list