Search code examples
javascriptckeditor

I can't add the Source button to CKEditor 4's toolbar


I'm having trouble adding the Source button to CKEditor 4's toolbar. I just downloaded the new CKEditor today.

I'm using a config object named oConfig:

oConfig.toolbar = 'Custom';
oConfig.toolbar_Custom = [
  ['Bold', 'Source', 'Italic']
];

The toolbar shows up with only the Bold and Italic buttons. This example from CKEditor's docs tells me it should be working.


Solution

  • There are two reasons why it may be happening:

    1. You have downloaded the basic package, where the sourcearea plugin is not included.

    2. You are using CKEditor in inline mode. Source mode isn't available in inline mode yet.