snippets star schaufler.ch

TinyMCE advanced ProcessWire

<?php
include('./index.php');

$fields = wire("fields")->find("name=body|sidebar");

foreach($fields as $field) {
    $field->theme_advanced_buttons1 = "formatselect,|,styleselect,styleprops,|,fontsizeselect,forecolor,|,bold,italic,underline,strikethrough,|,hr,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,indent,outdent,nonbreaking";
    $field->theme_advanced_buttons2 = "undo,redo,|,tablecontrols,|,pastetext,|,link,unlink,anchor,|,image,|,replace,|,removeformat,|,code,|,fullscreen";
    $field->theme_advanced_buttons3 = "";
    $field->theme_advanced_blockformats = "p,h2,h3,h4";
    $field->plugins = "inlinepopups,safari,media,paste,fullscreen,table,nonbreaking,searchreplace,style";
    $field->valid_elements = "*[*]";
    $field->content_css = "/site/templates/styles/content.css";
    $field->custom = "";
    $field->thirdparty = "";
    $field->save();
}
?>
Tags: php, processwire von Andy 19-12-2013