|
|
@ -1,7 +1,8 @@
|
|
|
|
document.addEventListener('readystatechange',function () {
|
|
|
|
window.addEventListener('load',function () {
|
|
|
|
let dirx = 'ltr';
|
|
|
|
let dirx = 'ltr';
|
|
|
|
|
|
|
|
let editors = {};
|
|
|
|
document.querySelectorAll('.ckeditorx')?.forEach(function (el) {
|
|
|
|
document.querySelectorAll('.ckeditorx')?.forEach(function (el) {
|
|
|
|
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,
|
|
|
@ -10,6 +11,8 @@ document.addEventListener('readystatechange',function () {
|
|
|
|
|
|
|
|
|
|
|
|
// WIP: need font and color like website
|
|
|
|
// WIP: need font and color like website
|
|
|
|
CKEDITOR.addCss('.cke_editable { background-color: #212529; color: white }');
|
|
|
|
CKEDITOR.addCss('.cke_editable { background-color: #212529; color: white }');
|
|
|
|
|
|
|
|
editors[el.getAttribute('name')].on('change', function (evt) {
|
|
|
|
|
|
|
|
el.value = evt.editor.getData();
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|