|
|
@ -1,16 +1,15 @@
|
|
|
|
window.addEventListener('load',function () {
|
|
|
|
window.addEventListener('load', function () {
|
|
|
|
let dirx = 'ltr';
|
|
|
|
let dirx = 'ltr';
|
|
|
|
let editors = {};
|
|
|
|
let editors = {};
|
|
|
|
document.querySelectorAll('.ckeditorx')?.forEach(function (el) {
|
|
|
|
document.querySelectorAll('.ckeditorx')?.forEach(function (el) {
|
|
|
|
editors[el.getAttribute('name')] = CKEDITOR.replace(el.getAttribute('name'), {
|
|
|
|
editors[el.getAttribute('name')] = CKEDITOR.replace(el.getAttribute('name'), {
|
|
|
|
filebrowserUploadUrl: xupload,
|
|
|
|
filebrowserUploadUrl: xupload,
|
|
|
|
filebrowserUploadMethod: 'form',
|
|
|
|
filebrowserUploadMethod: 'form',
|
|
|
|
contentsLangDirection: dirx,
|
|
|
|
contentsLangDirection: dirx,
|
|
|
|
skin: 'moono-dark',
|
|
|
|
skin: 'moono-dark',
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// WIP: need font and color like website
|
|
|
|
CKEDITOR.addCss('.cke_editable { background-color: ' + website_bg + '; color: ' + website_text_color + ' ; font-family: ' + website_font + ' }');
|
|
|
|
CKEDITOR.addCss('.cke_editable { background-color: #212529; color: white }');
|
|
|
|
|
|
|
|
editors[el.getAttribute('name')].on('change', function (evt) {
|
|
|
|
editors[el.getAttribute('name')].on('change', function (evt) {
|
|
|
|
el.value = evt.editor.getData();
|
|
|
|
el.value = evt.editor.getData();
|
|
|
|
});
|
|
|
|
});
|
|
|
|