I am developing a Joomla 4 component which uses editors in a couple of different contexts.
The first is in a standard editor form field type and that is now using JCE without a problem after I installed the Pro version. It's also using a custom JCE profile that I set up.
The second manually assigns an editor to textarea inputs. Currently the view file has a line to import Joomla's native tinymce script and then calls tinymce.init with the selector of the input I want it to appear on, plus a few other parameters to say which buttons it wants on which toolbar etc.
I would like to be able to replace the editor in this context with JCE, and be able to programmatically specify which JCE profile it uses as well, but I'm not sure if it's possible or how to go about it.
I tried copying the CSS and script dependencies that I could see in the HTML for the view for the standard JCE implementation, but it's failing when it tries to access language files. I can also see the WfEditor.init function call in the HTML, but I assume this is generated by the JCE component somehow, so I'm hoping there is a straightforward way I can call JCE that will set up the dependencies for me as well as the init function. Can you help point me in the right direction please?
The first is in a standard editor form field type and that is now using JCE without a problem after I installed the Pro version. It's also using a custom JCE profile that I set up.
The second manually assigns an editor to textarea inputs. Currently the view file has a line to import Joomla's native tinymce script and then calls tinymce.init with the selector of the input I want it to appear on, plus a few other parameters to say which buttons it wants on which toolbar etc.
I would like to be able to replace the editor in this context with JCE, and be able to programmatically specify which JCE profile it uses as well, but I'm not sure if it's possible or how to go about it.
I tried copying the CSS and script dependencies that I could see in the HTML for the view for the standard JCE implementation, but it's failing when it tries to access language files. I can also see the WfEditor.init function call in the HTML, but I assume this is generated by the JCE component somehow, so I'm hoping there is a straightforward way I can call JCE that will set up the dependencies for me as well as the init function. Can you help point me in the right direction please?