prbaron / pbckcode

A CKEditor plugin to easily add code into your article
Apache License 2.0
44 stars 26 forks source link

Uncaught TypeError: Cannot read property 'addCode' of undefined #9

Closed AdamiPL closed 11 years ago

AdamiPL commented 11 years ago

Hello, I installed this plugin on my website I plugged it into CKEditor and does not work. My config.js

CKEDITOR.editorConfig = function( config ) {
config.toolbarGroups = [
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
    { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'links' },
    { name: 'insert' },
    { name: 'forms' },
    { name: 'tools' },
    { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'others' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] },
    { name: 'styles' },
    { name: 'colors' },
    { name: 'pbckcode' }
];
    config.extraPlugins = 'pbckcode';
};

and error:

Uncaught TypeError: Cannot read property 'addCode' of undefined plugin.js:34 CKEDITOR.plugins.add.init plugin.js:34 (anonymous function) ckeditor.js:221 n ckeditor.js:202 r ckeditor.js:202 p ckeditor.js:202 (anonymous function) ckeditor.js:203

i copied all files from your plugin.

(sorry for my english)

prbaron commented 11 years ago

Hello, seems it is a translation error. What is the langage of CKEditor ?

AdamiPL commented 11 years ago

Polish language :)

prbaron commented 11 years ago

Which version of CKEditor ?

prbaron commented 11 years ago

When do you have the problem ? is it on init or when you do an action ?

AdamiPL commented 11 years ago

Newest. Today i downloaded from official ckeditor website.

prbaron commented 11 years ago

The version of the plugin in the CKEditor website is not the latest. Due to ACE code, I am not able to upload the plugin on the CKEditor website, so please download the last version from here : https://github.com/prbaron/PBCKCode/tags.

AdamiPL commented 11 years ago

On init script

AdamiPL commented 11 years ago

Yes i know but i downloaded from this site.

prbaron commented 11 years ago

I made some bug fixes with the v1.1.0, so please try it.

AdamiPL commented 11 years ago

its doesn't work :(

AdamiPL commented 11 years ago

ok its works... my mistake ... I have not changed the name of the plugin to pbckcode ...

AdamiPL commented 11 years ago

how can i use a prettify ?

prbaron commented 11 years ago

Just set the highlighter option when you init the pbckcode plugin, as in this example : http://prbaron.github.io/PBCKCode/demo-prettify.html