I want to add equations in ck editor.But I am trying to use fmath plugin in ck editor,But I am unable to do that.
CKEDITOR.plugins.addExternal('fmath_formula', 'plugins/fmath_formula/', 'plugin.js');
// Add the button to toolbar
config.toolbar = [
['Templates', 'Styles', 'Format', 'Font', 'FontSize', 'TextColor', 'BGColor', 'Maximize', 'Image'],
['Source'],
['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'fmath_formula'],
['Table', 'HorizontalRule'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote']
]
};
mypage.js
$(document).ready(function () {
//CKEDITOR.plugins.addExternal('fmath_formula', 'plugins/fmath_formula/', 'plugin.js');
var ckeditor_config = {
width: 670,
height: 220,
toolbarCanCollapse: false,
removePlugins: 'elementspath',
toolbar: [['Bold', 'Italic', 'Underline', '-',
'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-',
'NumberedList', 'BulletedList', '-', 'Indent', 'Outdent', '-', 'Link', 'Unlink', '-',
'Image', 'Video', 'Templates', '-', 'Preview', 'Print', '-', 'Source', 'Styles', 'Format', 'FontSize', 'Font', 'TextColor', 'BGColor', 'fmath_formula']],
uiColor: '#9AB8F3'
};
$("textarea#editor1").val("").ckeditor(ckeditor_config);
});
CKEDITOR.plugins.addExternal('fmath_formula', 'plugins/fmath_formula/', 'plugin.js');
// Add the button to toolbar
config.toolbar = [
['Templates', 'Styles', 'Format', 'Font', 'FontSize', 'TextColor', 'BGColor', 'Maximize', 'Image'],
['Source'],
['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'fmath_formula'],
['Table', 'HorizontalRule'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote']
]
};
mypage.js
$(document).ready(function () {
//CKEDITOR.plugins.addExternal('fmath_formula', 'plugins/fmath_formula/', 'plugin.js');
var ckeditor_config = {
width: 670,
height: 220,
toolbarCanCollapse: false,
removePlugins: 'elementspath',
toolbar: [['Bold', 'Italic', 'Underline', '-',
'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-',
'NumberedList', 'BulletedList', '-', 'Indent', 'Outdent', '-', 'Link', 'Unlink', '-',
'Image', 'Video', 'Templates', '-', 'Preview', 'Print', '-', 'Source', 'Styles', 'Format', 'FontSize', 'Font', 'TextColor', 'BGColor', 'fmath_formula']],
uiColor: '#9AB8F3'
};
$("textarea#editor1").val("").ckeditor(ckeditor_config);
});
Re: fmath for ck editor
Maybe you need to change the way you are activating the plugin. The creator proposes using config.extraPlugins = 'fmath_formula';, not the external way. Maybe the different path is what's messing it up. Also, did you change the file fmath_formula/dialogs/configMathMLEditor.xml? Anyway, go over the author's instructions and maybe check out his site. He has a lot of info there.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: fmath for ck editor