could you please help with this replacement, I need CKEditor because of general file upload and storage support (mostly PDFs)?
The easy part was extending TextType form type and replacing WysiwygType (Pell) with FOSCKEditorBundle's CKEditorType.
But unfortunately CKEditor doesn't load at all. I debugged it a bit and found that UI element forms are loaded using innerHTML which doesn't execute script tags. CKEditor, on the other hand, consists of a textarea and 3 script tags: some inline JS code, external JS file loading, and some inline JS code again which relies on external JS file from second script tag.
My first attempt was to dynamically re-insert script tags using appendChild but didn't managed to ensure execution order - third script tag (inline code) is executed before the external JS file is loaded.
This could be fixed but I stopped at that point because this solution seems dirty and I wonder if there is any better approach...
Hello,
could you please help with this replacement, I need CKEditor because of general file upload and storage support (mostly PDFs)?
The easy part was extending TextType form type and replacing WysiwygType (Pell) with FOSCKEditorBundle's CKEditorType.
But unfortunately CKEditor doesn't load at all. I debugged it a bit and found that UI element forms are loaded using innerHTML which doesn't execute script tags. CKEditor, on the other hand, consists of a textarea and 3 script tags: some inline JS code, external JS file loading, and some inline JS code again which relies on external JS file from second script tag.
My first attempt was to dynamically re-insert script tags using appendChild but didn't managed to ensure execution order - third script tag (inline code) is executed before the external JS file is loaded.
This could be fixed but I stopped at that point because this solution seems dirty and I wonder if there is any better approach...