dbFields = array(
'tabSize'=>'2',
'toolbar'=>'"bold", "italic", "heading", "|", "quote", "unordered-list", "|", "link", "image", "code", "horizontal-rule", "|", "preview", "side-by-side", "fullscreen", "guide"',
'autosave'=>0
);
}
public function form()
{
$html = '
';
$html .= '';
$html .= '';
$html .= '
';
$html .= '';
$html .= '';
$html .= '';
$html .= '
';
$html .= '';
$html .= '';
$html .= 'getDbField('autosave')?'checked':'').'>';
$html .= '';
$html .= '
';
return $html;
}
public function adminHead()
{
global $layout;
$html = '';
// Load CSS and JS only on Controllers in array.
if(in_array($layout['controller'], $this->loadWhenController))
{
// Path plugin.
$pluginPath = $this->htmlPath();
// SimpleMDE css
$html .= '';
// Font-awesome is a dependency of SimpleMDE
$html .= '';
// SimpleMDE js
$html .= '';
// Hack for Bludit
$html .= '';
}
return $html;
}
public function adminBodyEnd()
{
global $layout;
$html = '';
// Load CSS and JS only on Controllers in array.
if(in_array($layout['controller'], $this->loadWhenController))
{
// Autosave
global $_Page, $_Post;
$autosaveID = $layout['controller'];
$autosaveEnable = $this->getDbField('autosave')?'true':'false';
if(isset($_Page)) {
$autosaveID = $_Page->key();
}
if(isset($_Post)) {
$autosaveID = $_Post->key();
}
$pluginPath = $this->htmlPath();
$html = '';
}
return $html;
}
}