Insert Redactor WYSIWYG Textarea

Submitted by remo - 2 years ago

When you create a custom single page interface or a block you might have come across some situations where you want to make it possible to enter formatted text. The snippet below shows you how you can insert the redactor WYSIWYG editor of concrete5.7

// get editor instance
$editor = Core::make('editor');

// optionally disable the concrete5 integration

// optionally control the plugins for redactor
$editor->getPluginManager()->deselect(array('table', 'underline', 'specialcharacters'));

// create a textarea with the name "description" and a predefined value
echo $editor->outputStandardEditor('description', 'Value');
Stats Categories Tags
comments powered by Disqus