Hi!
I went to try the plugin for CKEDITOR and I am getting this error.
Uncaught ReferenceError: CKEDITOR is not defined
<div id="gjs"></div>
<script type="text/javascript">
var editor = grapesjs.init({
container : '#gjs',
plugins: ['gjs-plugin-ckeditor'],
pluginsOpts: {
"gjs-plugin-ckeditor": {
options: { language: "en" }
}
}
});
</script>
edit: Just read #140 and realized, I should've posted this at artf/grapesjs-plugin-ckeditor? .. my bad
CKEditor is not included in the library
hey! @artf ,
I am facing the same problem "Uncaught ReferenceError: CKEDITOR is not defined at grapesjs-plugin-ckeditor.min.js:2" . I wont get your answer in this "CKEditor is not included in the library".
Sorry if i ask a silly one!
@prtjack you just have to include CKEditor library inside your project
what a wonderfull work @artf is there a specific version ! or just try latest always , i can t find docs on this please advise thanks.
wish you best
@prtjack any clues my friend
I tried including
<script src="https://cdn.ckeditor.com/4.9.2/standard/ckeditor.js"></script>
just before the
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/grapesjs-plugin-ckeditor.min.js"></script>
and came up with another error
Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "sharedspace" was not found at "https://cdn.ckeditor.com/4.9.2/standard/plugins/sharedspace/plugin.js?t=I3I8".
at CKEDITOR.resourceManager.<anonymous> (ckeditor.js:255)
at e (ckeditor.js:250)
at Array.z (ckeditor.js:250)
at y (ckeditor.js:250)
at HTMLScriptElement.A.CKEDITOR.env.ie.e.$.onerror (ckeditor.js:251)
Thank its working now
@prtjack @artf i got it , some text elements dose not open the dialog but if you added new one it works
exampls
This dose not work , on basic or standard, or even full
from
https://ckeditor.com/ckeditor-4/download/#ckeditor4
<script src="//cdn.ckeditor.com/4.9.2/standard/ckeditor.js"></script>
But this worked dont know why, but its not always working on all text elements, especially the one that are styled with old ( default toolbar like if you did bold in my case with old toolbar ) then added the ckeditor and tried double click nothing happens and says the following
Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "sharedspace" was not found at "http://cdn.ckeditor.com/4.9.2/standard/plugins/sharedspace/plugin.js?t=I3I8".
at CKEDITOR.resourceManager.<anonymous> (ckeditor.js:255)
at e (ckeditor.js:250)
at Array.z (ckeditor.js:250)
at y (ckeditor.js:250)
at HTMLScriptElement.A.CKEDITOR.env.ie.e.$.onerror (ckeditor.js:251)
@shareefhiasat were you able to fix this?I am getting the exact same issue
Warm regards
Milap
@milapshah15
Am using newsletter-preset , here is my scripts
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//feather.aviary.com/imaging/v3/editor.js"></script>
<script src="//unpkg.com/[email protected]/dist/grapes.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/grapesjs-plugin-export.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.9.2/ckeditor.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/grapesjs-plugin-ckeditor.min.js"></script>
The main notes to notice is
//cdn.ckeditor.com/4.9.2/standard/ckeditor.js
Worked.
Finally
About the js exception that appear for the old elements
But this worked dont know why, but its not always working on all text elements, especially the one that are styled with old ( default toolbar like if you did bold in my case with old toolbar ) then added the ckeditor and tried double click nothing happens and says the following
Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "sharedspace" was not found at "http://cdn.ckeditor.com/4.9.2/standard/plugins/sharedspace/plugin.js?t=I3I8".
at CKEDITOR.resourceManager.<anonymous> (ckeditor.js:255)
at e (ckeditor.js:250)
at Array.z (ckeditor.js:250)
at y (ckeditor.js:250)
at HTMLScriptElement.A.CKEDITOR.env.ie.e.$.onerror (ckeditor.js:251)
I believe its not backward compatable templates , meaning either you save your template with ckeditor included as plugin and continue that way, or the default way.
otherwise you may have little in compatabilities with element or you shall delete it and re add it ( i mean like text for example readd and re edit it.
@shareefhiasat It is working if I use the exact same libraries as you have and the point you said as it is not backward compatible.
Thanks for your help.
Warm regards
Milap
@shareefhiasat Thank you very much
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@milapshah15
Am using newsletter-preset , here is my scripts
The main notes to notice is
insert special character and insert table did not work with js exception.
Finally
About the js exception that appear for the old elements
I believe its not backward compatable templates , meaning either you save your template with ckeditor included as plugin and continue that way, or the default way.
otherwise you may have little in compatabilities with element or you shall delete it and re add it ( i mean like text for example readd and re edit it.