xref: /dokuwiki/inc/Action/Preview.php (revision ab583a1bc44ef1ef3b917647fc361aabd055c2ac)
1f21dad39SAndreas Gohr<?php
2f21dad39SAndreas Gohr
3f21dad39SAndreas Gohrnamespace dokuwiki\Action;
4f21dad39SAndreas Gohr
5*ab583a1bSAndreas Gohr/**
6*ab583a1bSAndreas Gohr * Class Preview
7*ab583a1bSAndreas Gohr *
8*ab583a1bSAndreas Gohr * preview during editing
9*ab583a1bSAndreas Gohr *
10*ab583a1bSAndreas Gohr * @package dokuwiki\Action
11*ab583a1bSAndreas Gohr */
12f21dad39SAndreas Gohrclass Preview extends Edit {
13f21dad39SAndreas Gohr
14*ab583a1bSAndreas Gohr    /** @inheritdoc */
15f21dad39SAndreas Gohr    public function preProcess() {
16f21dad39SAndreas Gohr        header('X-XSS-Protection: 0'); // FIXME is it okay to send it right away here?
17f21dad39SAndreas Gohr        act_draftsave('fixme'); // reimplement thisutility function and take of duplicate code in ajax.php
18f21dad39SAndreas Gohr
19f21dad39SAndreas Gohr        parent::preProcess();
20f21dad39SAndreas Gohr    }
21f21dad39SAndreas Gohr
22*ab583a1bSAndreas Gohr    /** @inheritdoc */
23f21dad39SAndreas Gohr    public function tplContent() {
24f21dad39SAndreas Gohr        global $TEXT;
25f21dad39SAndreas Gohr        html_edit();
26f21dad39SAndreas Gohr        html_show($TEXT);
27f21dad39SAndreas Gohr    }
28f21dad39SAndreas Gohr
29f21dad39SAndreas Gohr}
30