[pmwiki-users] initialize input textarea

The Editor editor at fast.st
Thu Apr 5 05:31:43 CDT 2007


On 4/5/07, Petko Yotov <5ko at free.fr> wrote:
> On Thursday 05 April 2007 09:32, SteP wrote:
> > Cookbook.Input says that there currently isn't a mechanism to initialize
> > an input textarea control. Are there any plans to add a way to do it?
> > Are there workarounds? It seems quite complicated, since the initial value
> > could easily include quote characters and multiple lines.
> > TIA
>
> There is at least one workaround, see
> http://pmwiki.org/wiki/Cookbook/Textarea . Feel free to test it.
>
> Petko


Pm is planning on adding it soon, probably in connection with the
commenting system he has in mind, which is a related problem...

Here's the markup I use in ZAP, it's been working fine for quite a
while.  It's not as complex as Petko's but it does not allow it to be
filled from a Script just a wiki page, and there may be some other
things Petko has added.

Markup('textarea', 'inline', '/\\(:textarea (.*?):\\)/e',
"Keep('<textarea '.PQA(PSS('$1')).' class=inputbox>')");
Markup('textareaend', 'inline', '/\(:textareaend:\\)/', '</textarea>');

Perhaps it could be combined into one markup, using Petko's model...
Make sure you don't use both.

Cheers,
Dan



More information about the pmwiki-users mailing list