You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is more of a UI enhancement/clarification than a bug...
After defining CKEditor config options which include a callback property (using the 'JavaScript' editor mode), toggling to the JSON mode will delete the callback property. Toggling back again to JavaScript mode, the property has been lost.
I now appreciate this is because JSON can't contain functions. But I hadn't considered that when this happened to me, and I thought I was just switching between two different ways of viewing the same data. When I saved, I hadn't realised the callback had been deleted, and all my CKEditor fields which were using this config broke.
So perhaps a warning about potential data loss could be a good idea when switching back from JavaScript to JSON mode? Similar to the warnings you have on field type dropdowns?
Thanks for considering!
Steps to reproduce
Create a new CKEditor config
Switch to the JavaScript config options editor and enter something with a callback. I was using this:
Description
I think this is more of a UI enhancement/clarification than a bug...
After defining CKEditor config options which include a
callback
property (using the 'JavaScript' editor mode), toggling to the JSON mode will delete the callback property. Toggling back again to JavaScript mode, the property has been lost.I now appreciate this is because JSON can't contain functions. But I hadn't considered that when this happened to me, and I thought I was just switching between two different ways of viewing the same data. When I saved, I hadn't realised the
callback
had been deleted, and all my CKEditor fields which were using this config broke.So perhaps a warning about potential data loss could be a good idea when switching back from JavaScript to JSON mode? Similar to the warnings you have on field type dropdowns?
Thanks for considering!
Steps to reproduce
callback
. I was using this:Additional info
"nystudio107/craft-code-editor": "1.0.13"
incomposer.json
as permonaco is not defined
on CP CKEditor configs #150); CP Field Inspect 1.4.4The text was updated successfully, but these errors were encountered: