close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

How to add or remove plugins without changing web assist generated code.

Thread began 6/25/2011 4:42 pm by neo314 | Last modified 4/06/2015 1:59 pm by neo314 | 4518 views | 1 replies

neo314

How to add or remove plugins without changing web assist generated code.

Hi All,

I use come different plugins with CKEditor from time to time, and I thought I might share this information in case it is useful to someone.

Adding or removing plugins before the editor loads is a piece of cake. This can be useful if you want to include plugins which are not part of the WA extension. To use plugins that are not part of the WA extension, you either need to hard code the plugin into the configuration file for CKEditor, or add a line to the generated code. In either case, when you edit the editor instance, you have to reapply your changes.

This is also useful if you have hard coded an additional plugin because you use it most of the time, but don't want it on a particular page. In that case, you can't use the WA GUI to control the plugin.

With this method, you won't have to do anything to the WA code when you edit the HTMLEditor instance.

To include or remove an additional plugin to the editor per page, do the following:

The extension includes the CKEditor JavaScript file when the PHP code for the editor instance is created. That isn't soon enough to do this, so in the head of the document, include the file yourself.

<script type="text/javascript" src="webassist/ckeditor/ckeditor.js"></script>

Now the object CKEDITOR has been instantiated. Just below this inclusion, add the following code:

<script type="text/javascript" src="webassist/ckeditor/ckeditor.js"></script>
<script type="application/javascript" language="javascript">
CKEDITOR.config.extraPlugins = 'bbcode';
CKEDITOR.config.removePlugins = 'smiley';
</script>

This code would include the bbcode plugin and remove the smiley plugin from all subsequent CKEditor instances on the page.

I have not looked into adding or removing a plugin after the CKEditor instance has been created, so I do not know if that is feasible. That would be helpful for adding or removing plugins to a specific instance of the editor. Right now, the best way to do that is to add a line to the WA code like this:

$CKEditor_config["extraPlugins "] = "bbcode, adobeair";
$CKEditor_config["removePlugins "] = "smiley";

That code will have to be redone if you use the WA GUI to edit the instance of the editor.

* Some of the plugins in the example code are controllable with the GUI which would obviously be a better method for controlling them. This is just an example.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...