r4 - 21 Jun 2005 - 10:43:50 - CrawfordCurrieYou are here: TWiki >  Codev Web > AddingFormattedTextDuringEdits
Tags:
, create new tag

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 | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo