I'm using CKEditor whit bbcode plugin and I need to add custom tags, like: spoiler and link to site user. Tags spoiler work's like blockquote: click button and get code. I'd copy blockquote/plugin.js and changed all "blockquote" to "spoiler" and "quote" to "spoil". Then I'did add extraPlugins : 'spoiler' to config and button on toolbar. It's work's, but if click blockquote button, selected text, i have: [ quote ]some text[ /quote] but when I click my new button, I have:
=( doesnt work bbcode. Must bee like this:
And another button I need - link to user. It must work like that: after click show dialog with search field (ajax not a problem). When user choose some user and click "OK", in code add link. Something like this:
1 - id of user, Admin - his name.
May be someone did plugin's, which worked like this.
P.S. Sorry for my ugly English.
<p> <spoiler> <p> some text</p> </spoiler></p>
=( doesnt work bbcode. Must bee like this:
[spoiler]some text[/spoiler]
And another button I need - link to user. It must work like that: after click show dialog with search field (ajax not a problem). When user choose some user and click "OK", in code add link. Something like this:
[user=1]Admin[/user]
1 - id of user, Admin - his name.
May be someone did plugin's, which worked like this.
P.S. Sorry for my ugly English.
Re: How to add new tags in bbcode (CKEditor)?
I did, but it dsnt work
Plugin bbcode doesn't work whit many other plugins. For example, if on autogrow:
ckeditor will return code:
but if autogrow off, it will return
whith out tags.
To change it, I haft to change plugin code, but I not realy understand, how to change it to add other's tags. For example, html
And, for example, bbcode not work's whith tag [s][/s]
replace to bbcode
And bbcode to html