Skip to content

Instantly share code, notes, and snippets.

@adrexia
Created February 18, 2019 21:37
Show Gist options
  • Save adrexia/b48cb8c3323749a6f969d3e1e71cecea to your computer and use it in GitHub Desktop.
Save adrexia/b48cb8c3323749a6f969d3e1e71cecea to your computer and use it in GitHub Desktop.
$editor = HtmlEditorConfig::get('cms');
// Enable template plugin in the WYSIWYG editor//
$editor->enablePlugins('template');
$editor->insertButtonsAfter('tablecontrols', 'template');
//Specify location of your snippets//
$editor->setOptions(['template_templates'=> [
[
'title'=>'Quote - Text Color',
'src'=>'app/html/quote.html', // location of your html templates
'description'=>'A blockquote template that includes a citation - in the standard text color'
],
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment