Question

Do anyone here know how to add custom BBCode tags to CKEditor 4? I have tried to look at ckeditor.js, but I can't seem to find the right part to edit.

Actually, I just have to change the align buttons to output [left], [right] and [center] tags instead of:

<div style="text-align: left">{TEXT_HERE}</div>

I have already tried to find it on Google, but everything I found was for older versions of CKEditor and/or the BBCode plugin.

Any help is appreciated!

Was it helpful?

Solution

I assume you want to edit this plugin: http://ckeditor.com/addon/bbcode

You just simply need to the 'div' tag to bbcodeMap and tagnameMap to be converted (and not rewritten to p tag). Another stap is to edit stylesMap by adding align: 'text-align'.

That shoudl work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top