Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hello @KK,

If there is a CKedit among editables (browser: latest FireFox) there is always a message popping up -
2019-04-12-122056.png
Very annoying
2019-04-12-122056.png (3.78 KiB) Viewed 1949 times


Is there anyone still maintaining couch/theme/_system/includes/admin/main.js? It clearly doesn't work as it was intended.
I have performed some debugging and found that CKeditor adds "%0D%0A" to the data and it triggers the warning.

I believe that check is not a good solution - "COUCH.data.formOriginal !== cur_data", because there is a problem serializing CKeditor's data in a form. Quoting a similar issue from Stack - "serialize() returns two different values depending on when you call it, even if you don't change any control value in the form" (link - https://stackoverflow.com/questions/571 ... lize-issue). Althought updateElement() is being called in COUCH app, the problem is still there.

Update: there are other similar issues posted all over the web - https://ckeditor.com/old/forums/CKEdito ... -serialize
Update2: Or maybe it is not even CKeditor's issue, but how serialization is meant to work. See https://stackoverflow.com/questions/319 ... lf-to-crlf

Also CKeditor has a working method checkDirty() - could be used like "CKEDITOR.instances[ key ].checkDirty() === true" - if it helps.

Can this be fixed? I am sure this is not a particular browser's problem, because the same happens in Chrome.
I am using latest Couch from git.

2019-04-12-122830.png
Ohhh.
2019-04-12-122830.png (6.6 KiB) Viewed 1949 times


Thanks and regards

No problem, I have coded a solution myself. Thanks for attention anyway!

Hi @trendoman,

Yes, I have noticed this annoyance - but only on some templates, not every one with CKEditor in it.

No problem, I have coded a solution myself.

That is great. Mind sharing the solution please?
3 posts Page 1 of 1
cron