lemonde / angular-ckeditor

CKEditor directive for Angular.
137 stars 133 forks source link

Adding MathJax support to ck editor options gives error - d.replace is not a funciton #56

Open iamdeadman opened 8 years ago

iamdeadman commented 8 years ago

I am trying to add mathjax plugin to my ck editor and getting the following error - >

Uncaught TypeError: d.replace is not a functionA @ ckeditor.js:249(anonymous function) @ ckeditor.js:248(anonymous function) @ ckeditor.js:475(anonymous function) @ ckeditor.js:236e @ ckeditor.js:231A @ ckeditor.js:231r @ ckeditor.js:231(anonymous function) @ ckeditor.js:232

I have tried the following things -> 1) included the directive in my partial html - <div ckeditor="data_options" ng-model="note.note_data" ready="onReady()"></div>

2) added configuration options in my controller -

$scope.data_options = {
            lang: 'en',
            allowedContent: true,
            entities: false,
            extraPlugins: ['mathjax'],
            mathJaxClass: 'm-equation',
            mathJaxLib: 'http://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS_HTML'
        };

But still I am getting the same error. Am I missing something ? If yes, then how can I get it to work