# Configuring the CKEditor

**URL:** <https://forum.litium.com/t/configuring-the-ckeditor/1160>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [October 18, 2019, 12:20pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160 "2019-10-18T12:20:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonwid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonwid/32/86_2.png) [@jonwid](https://forum.litium.com/u/jonwid)\
**Post date:** [October 18, 2019, 12:20pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/1 "2019-10-18T12:20:19Z")

</div>

Hi. I’m trying to configure the CKEditor following the instructions in the documentation ([https://docs.litium.com/documentation/architecture/back-office\_1/configure-html-editor](https://docs.litium.com/documentation/architecture/back-office_1/configure-html-editor))

I did what is stated in the “Defining your own content style sheet (CSS)”. My own style sheet do appear but the Litium configured editor doesn’t load, instead you get the CKEditor full version.

I dug around on the forum and found [https://forum.litium.com/t/adding-plugins-to-the-html-editor/584/3](https://forum.litium.com/t/adding-plugins-to-the-html-editor/584/3) and found a way forward. This brings back (as it seems) the Litium configuration.

```
(function () {
CKEDITOR.plugins.addExternal('stylesheetparser', '/Site/Editor/plugins/stylesheetparser/');
})();

(function () {
var old = CKEDITOR.editorConfig;
CKEDITOR.editorConfig = function (config) {
    old(config);
    config.extraPlugins = 'stylesheetparser';
}
})();

```

The problem is that the link-button now has stopped working. When pushing the button I get a javascript error :

 ![Annotation%202019-10-18%20141854](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/e47efbd000cca871e3b0f3ab47c622c7085e2ebd.png)

Am I doing anything wrong?

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [October 18, 2019, 2:01pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/2 "2019-10-18T14:01:22Z")

</div>

I think you need to append the plugin to the current extraPlugins set, try using `+=` instead.

---

<div class="post-metadata">

**Author:** ![jonwid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonwid/32/86_2.png) [@jonwid](https://forum.litium.com/u/jonwid)\
**Post date:** [October 18, 2019, 2:13pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/3 "2019-10-18T14:13:38Z")

</div>

![Annotation%202019-10-18%20161109](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/1778b1ff74467f6b7143135fa758dcb6991a67dc.png)

That gives another error.  
I believe I got the plugin working before, the problem is that the Litium implementation of the “Link”-button stops working.

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [October 18, 2019, 2:24pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/4 "2019-10-18T14:24:45Z")

</div>

Sorry, you also need to add an `,` before the new plugin. So in total: `config.extraPlugins += ',stylesheetparser';`

---

<div class="post-metadata">

**Author:** ![jonwid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonwid/32/86_2.png) [@jonwid](https://forum.litium.com/u/jonwid)\
**Post date:** [October 18, 2019, 2:36pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/5 "2019-10-18T14:36:42Z")

</div>

Hm, yeah the error is gone and the link button is working. The problem is that the stylesheetparser plugin doesn’t seem to work anymore. 🙃

---

<div class="post-metadata">

**Author:** ![jonwid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonwid/32/86_2.png) [@jonwid](https://forum.litium.com/u/jonwid)\
**Post date:** [October 22, 2019, 1:07pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/6 "2019-10-22T13:07:02Z")

</div>

Anyone else has any input?

---

<div class="post-metadata">

**Author:** ![ton.nguyen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ton.nguyen/32/989_2.png) [@ton.nguyen](https://forum.litium.com/u/ton.nguyen)\
**Post date:** [October 23, 2019, 7:46am UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/7 "2019-10-23T07:46:22Z")

</div>

Please config the extraPlugins to be this one to remove the default divArea plugin:

```
config.extraPlugins = "stylesheetparser,iframedialog";
```

---

<div class="post-metadata">

**Author:** ![jonwid](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/jonwid/32/86_2.png) [@jonwid](https://forum.litium.com/u/jonwid)\
**Post date:** [October 23, 2019, 12:55pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/8 "2019-10-23T12:55:17Z")

</div>

Thanks, that did the trick!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [November 20, 2019, 12:55pm UTC](https://forum.litium.com/t/configuring-the-ckeditor/1160/9 "2019-11-20T12:55:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
