2amigos / yii2-ckeditor-widget

CKEditor WYSIWYG widget for Yii2.
https://2amigos.us/open-source/ckeditor-widget
Other
172 stars 111 forks source link

Plugin uploadimage error #102

Closed gledsoneduardo closed 7 years ago

gledsoneduardo commented 7 years ago

Hi,

I would like to use this plugin http://ckeditor.com/addon/uploadimage I followed the steps of the tutorial and did: 1 - download the plugin and put it in the web folder 2 - added the code: $ This-> registerJs ("CKEDITOR.plugins.addExternal ('uploadimage', '/uploadimage/plugin.js', '');"); 3 - I added this code:

$ Form-> field ($ model, 'content') -> widget (CKEditor :: className (), [
                'Preset' => 'custom',
                'ClientOptions' => [
                    'ExtraPlugins' => 'uploadimage',
                    'ToolbarGroups' => [
                        ['Name' => 'undo'],
                        ['Name' => 'basicstyles', 'groups' => ['basicstyles', 'cleanup']]
                        ['Name' => 'colors'],
                        ['Name' => 'links', 'groups' => ['links', 'insert']]
                        ['Name' => 'others', 'groups' => ['others', 'about']]
                        ['Name' => 'uploadimage']
                    ]
                ]
            (I.e.

And I get the error in the console:

ckeditor.js:19 [CKEDITOR] Error code: uploadimage-config.(anonymous function) @ ckeditor.js:19h @ ckeditor.js:10window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.event.CKEDITOR.event.fire @ ckeditor.js:11window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.error @ ckeditor.js:18init @ plugin.js?t=H0CF:30(anonymous function) @ ckeditor.js:248g @ ckeditor.js:230n @ ckeditor.js:230v @ ckeditor.js:230(anonymous function) @ ckeditor.js:231 ckeditor.js:19 [CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-uploadimage-config(anonymous function) @ ckeditor.js:19h @ ckeditor.js:10window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.event.CKEDITOR.event.fire @ ckeditor.js:11window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.error @ ckeditor.js:18init @ plugin.js?t=H0CF:30(anonymous function) @ ckeditor.js:248g @ ckeditor.js:230n @ ckeditor.js:230v @ ckeditor.js:230(anonymous function) @ ckeditor.js:231

Any ideia??

tks

tonydspaniard commented 7 years ago

Isn't the error pointing to a line on your code? I cannot see anything on that error description apart from the issue on the uploadimage-configuration. Could it be that the uploadUrl is not configured: config.extraPlugins = 'uploadimage'; config.uploadUrl = '/uploader/upload.php';

http://docs.ckeditor.com/#!/guide/dev_file_upload

tonydspaniard commented 7 years ago

ping

tonydspaniard commented 7 years ago

No more info given. Closing this issue.