Extend Froala editor
1
Example of how to extend the Froala editor
use Backend\Classes\Controller;
public function boot()
{
// extend richeditor with custom color picker
Controller::extend(function ($widget) {
$widget->addJs('/plugins/aic/globals/assets/js/froala-color-picker.js');
});
}
/*
|------------------
| Extend Richeditor
|------------------
*/
+function ($) { "use strict";
$(document).render(function() {
if ($.FroalaEditor) {
$.FroalaEditor.DEFAULTS = $.extend($.FroalaEditor.DEFAULTS, {
colorsText: [
'REMOVE',
'#333333',
'#848484',
'#E0DFDD',
'#F8F6F3',
'#FFFFFF',
'#FF1616',
'#FD5E2B',
'#FFE836',
'#1EBF80',
'#2B7FFD',
'#EAF3FF',
'#E9B4A6'
]
});
}
})
}(window.jQuery);
There are no comments yet
Be the first one to comment