public function testHtmlContent() { $theme = Theme::load('test'); $content = Content::load($theme, 'html-content.htm'); $this->assertEquals('<a href="#">Stephen Saucier</a> changed his profile picture — <small>7 hrs ago</small></div>', $content->markup); $this->assertEquals('<a href="#">Stephen Saucier</a> changed his profile picture — <small>7 hrs ago</small></div>', $content->parsedMarkup); }
public function onSave() { if (!$this->checkEditor()) { return; } $fileName = post('file'); $template = Content::load($this->getTheme(), $fileName); $template->fill(['markup' => post('content')]); $template->save(); }