Tags:
archive_me1Add my vote for this tag create new tag
, view all tags

Proposed handy hint

It's often the case that when you are building TWikiApplications, there are frequently used constructs that you want to add to the text - for example, searches, or actions, or other complex tags.

It's really not hard to add support for this to your edit skin.

The following example adds an action entry box to the edit template. It can be done by adding the following to the edit.pattern.tmpl, though it could of course be included from another topic or via a %TMPL:DEF definition.

<h3>Add action</h3>
Who: <input type="text" value="" name="action_who" />
Due: <input type="text" value="" name="action_due" /><br />
<textarea wrap="virtual" rows="3" cols="70" value="" name="action_desc">
</textarea>
<input type="button" value="Add action" onClick="document.main.text.value+='%ACTION{'+' due=\''+document.main.action_due.value+'\''+' who=\''+document.main.action_who.value+'\''+'}% '+document.main.action_desc.value.replace(/\n/g,'<br />')+'\n'" />
want to add extra functionality to skins, to support the adding of formatted text entered 

and it looks like this:

Add action

Who: Due:

Added as http://twiki.org/cgi-bin/view/TWiki/TWikiTip030

-- CrawfordCurrie - 21 Jun 2005

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2005-06-21 - CrawfordCurrie
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.