====== DRAFT_SAVE ====== ---- dataentry event ---- Description: Modify draft saving DefaultAction: saving the draft Preventable: yes Added_dt: 2018-07-29 ---- This event is signalled by [[xref>saveDraft()]] in [[xref>inc/Draft.php]] when a draft is saved during an editing session, handlers can use it to modify the draft or execute additional actions. ===== Passed Data ===== This is the data you can use and modify in the event. This is also what is saved in serialized form as a draft at the end. $data = [ 'id' => 'pageid' 'prefix' => 'text before the edited section', 'text' => 'text of the edited section', 'suffix' => 'text after the edited section', 'date' => '1598944648', // unix timestamp of when editing started 'client' => 'andi', // client identification. user name, ip address // or similar 'cname' => 'data/cache/...', // cache file where the draft is to be saved 'errors' => [], // list of errors that should be shown to the end user ]; ===== See also ===== * [[codesearch>DRAFT_SAVE|Code related to this event]] used in any DokuWiki files, plugins and templates * [[devel:Action Plugins]] * [[devel:Events]] * Configuration Setting: [[config:usedraft]]