3 namespace dokuwiki\Action
;
5 use dokuwiki\Ui\Editor
;
6 use dokuwiki\Ui\PageView
;
13 * preview during editing
15 * @package dokuwiki\Action
17 class Preview
extends Edit
20 public function preProcess()
22 header('X-XSS-Protection: 0');
28 public function tplContent()
31 (new Editor())->show();
32 (new PageView($TEXT))->show();
36 * Saves a draft on preview
38 protected function savedraft()
41 $draft = new Draft($ID, $INFO['client']);
42 if (!$draft->saveDraft()) {
43 $errors = $draft->getErrors();
44 foreach ($errors as $error) {