Mathjx support
napestershine opened this issue · comments
How can I use Mathjax https://ckeditor.com/cke4/addon/mathjax, in FOSCkeditor ?
Thanks
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:
- Put 's' on plugin --> plugins
- Put the correct indentation on plugins: and following lines
- I´m not sure if the path should start with slash or not ('/bundles/fos...' or 'bundles/fos..')
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';