Closed napestershine closed 4 years ago
You have to download the zip, unzip it into public/bundles/fosckeditor/plugins/ and change the config/packages/fos_ckeditor.yml adding this:
fos_ckeditor:
default_config: simple_config
configs:
simple_config:
extraPlugins:
- 'mathjax'
plugins:
mathjax:
path: 'bundles/fosckeditor/plugins/mathjax/'
filename: 'plugin.js'
Hi @Julen10
here is my config:
fos_ck_editor:
default_config: default
configs:
default:
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters: []
extraPlugins:
- 'mathjax'
plugin:
mathjx:
path: 'bundles/fosckeditor/plugins/mathjax/'
filename: 'plugin.js'
is it right?
Thanks
@napestershine i have made a mistake, here is how your config should look like:
fos_ck_editor:
default_config: default
configs:
default:
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters: []
extraPlugins:
- 'mathjax'
plugins:
mathjx:
path: 'bundles/fosckeditor/plugins/mathjax/'
filename: 'plugin.js'
You should change:
default_config: default
configs:
default:
filebrowserBrowseRoute: elfinder
filebrowserBrowseRouteParameters: []
extraPlugins:
- 'mathjax'
plugins:
mathjx:
path: 'bundles/fosckeditor/plugins/mathjax/'
filename: 'plugin.js'```
@napestershine Yup, it works?
Nope. With this config I am getting console errors.
Share the errors. Do you have the plugin under public/bundles/fosckeditor/plugins/mathjax ?
Yes I have plugin there. I shared error in screenshot
The configuration is correct, but you have to add another property more "mathJaxLib", you have the info here. https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#mathjax-no-config
I tried it, but I am not sure where should I add it?
I don´t really know, but try it under fosckeditor: mathJaxLib: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS_HTML';
@Julen10 I have tried all options, but doesn't seems to work, can you try it once in your end?
How can I use Mathjax https://ckeditor.com/cke4/addon/mathjax, in FOSCkeditor ?
Thanks