Hello,
Ive just started using CKEditor, Ive followed the tutorial to get the timestamp button to insertHTML.
If i want to have an external button on the website how can i add that to add text into my CKEditor textarea?
Thanks
Pete
Ive just started using CKEditor, Ive followed the tutorial to get the timestamp button to insertHTML.
If i want to have an external button on the website how can i add that to add text into my CKEditor textarea?
Thanks
Pete
Re: insertHTML from external button
Please check out the samples/api.html (you can find it in the CKEditor package you downloaded and also here: http://nightly.ckeditor.com/7597/_samples/api.html).
There's exactly what you need - HTML button inserting content (of the textarea in this case) to the currently focused editor. If you want to do the same for one specific editor, just call
on the right editor instance (which's returned by CKEDITOR.replace() or which you can get from CKEDITOR.instances).
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: insertHTML from external button
I managed to get it working from the txtArea like in the example. is it possible to have it so the text is in the button like insertHTML('<p>Hello There</p>');
Im really bad at javascript so dont have a clue how i can parse that into it.