1 The `copy`, `cut` and `paste` directives are supplied by the
2 [[!iki plugins/cutpaste desc=cutpaste]] plugin.
4 With these directives you can store and recall pieces of text in a page:
6 * `\[[!cut id=name text="text"]]` memorizes the text allowing to recall it
7 using the given ID. The text being cut is not included in the output.
8 * `\[[!copy id=name text="text"]]` memorizes the text allowing to recall it
9 using the given ID. The text being cut *is* included in the output.
10 * `\[[!paste id=name]]` is replaced by the previously memorized text.
12 The text being cut, copied and pasted can freely include wiki markup, including
13 more calls to cut, copy and paste.
15 You do not need to memorize the text before using it: a cut directive can
16 follow the paste directive that uses its text. In fact, this is quite useful
17 to postpone big blocks of text like long annotations and have a more natural
20 \[[!toggleable id="cut" text="\[[!paste id=cutlongdesc]]"]]
21 \[[!toggleable id="copy" text="\[[!paste id=copylongdesc]]"]]
22 \[[!toggleable id="paste" text="\[[!paste id=pastelongdesc]]"]]
24 \[...some time later...]
26 \[[!cut id=cutlongdesc text="""
29 \[[!cut id=copylongdesc text="""
32 \[[!cut id=pastelongdesc text="""
36 This can potentially be used to create loops, but ikiwiki is clever and breaks
39 Since you can paste without using double quotes, copy and paste can be used to
40 nest directives that require multiline parameters inside each other:
42 \[[!toggleable id=foo text="""
43 \[[!toggleable id=bar text="\[[!paste id=baz]]"]]
46 \[[!cut id=baz text="""
50 [[!meta robots="noindex, follow"]]