i want to said sorry in advance cuz you will see, im a real noob
CKEditor was by default on my website when i instal it, i find it great so i dont want to change it, but i need bbcode in my forum so i take a look in the docs and i find this page
http://docs.cksource.com/CKEditor_3.x/H ... ode_Output
but first i dont know where i need to enable it ( i try to add the code in the header of the config.js)
like so :
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.replace( 'editor1', { extraPlugins : 'bbcode' }); CKEDITOR.editorConfig = function( config ) { config.font_names = 'Arial/Arial, Helvetica, sans-serif;' + 'Courier New/Courier New, Courier, monospace;' + 'Times New Roman/Times New Roman, Times, serif;'; config.resize_enabled = false; config.width = '96%'; config.disableNativeSpellChecker = false; // ADVANCED EDITOR || DESACTIVED : SAVE - FORM,CHECKBOX,RADIO,TEXTFILED,TEXTAREA,SELECT,BUTTON,IMAGEBUTTON,HIDDENFIELD - FLASH - ABOUT config.toolbar_Full = [ { name: 'document', items : [ 'Source','-','NewPage','DocProps','Preview','Print','-','Templates' ] }, { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] }, { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] }, { name: 'links', items : [ 'Link','Unlink','Anchor' ] }, '/', { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] }, { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] }, { name: 'tools', items : [ 'Maximize', 'ShowBlocks' ] }, { name: 'insert', items : [ 'Video','syntaxhighlight' ] }, '/', { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] }, { name: 'colors', items : [ 'TextColor','BGColor' ] }, { name: 'insert', items : [ 'Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] }, ]; // BASIC EDITOR config.toolbar_Basic = [ [ 'Source', '-', 'Bold', 'Italic', 'Underline', '-', 'Image', 'Link', 'Smiley', '-', 'TextColor', 'RemoveFormat', '-', 'Scayt' ] ]; };
Re: bbcode plugin
Re: bbcode plugin
You should check out this BBCode samples page to get an idea of how it's done. Don't forget to check out the source code. There's useful hits in front of the // forward slashes.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
idk if is a good strart but i see in ckeditor.js
this
Re: bbcode plugin
Re: bbcode plugin
Re: bbcode plugin
You can tweak it after.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
to
i already try
but the code with the quote cause problem in the php :S
Re: bbcode plugin
As for the code, just put it in its entirety at the end of </textarea> anywhere you have an editor instance. Test it in your computer before messing around with your site's smart quotes. Open your ckeditor/_samples folder then open any file there with notepad, like enterkey.html for instance. Find </textarea> then paste the code below right after </textarea>.
Now just open enterkey.html the normal way. Your bolds and indents should be in brackets []. If you get it working there, you can get it working on your site too if you tweak your server and change 'editor1' to 'e_advanced', or whatever you call your text area.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
im on a creepy free host server xD
and i dont understant how make a tripslashes() function
Re: bbcode plugin
I haven't used stripslashes() but I've heard about that function. There's more than one way to do it. Try googling!
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
i already goolgle and i see alot of code but i dont know how to make a fonction in php
http://php.net/manual/fr/function.stripslashes.php
i look that and my brain want to suicide xD
i just start learning c++ and fonction are not wrote with the same syntax at all xD<
Edit:
what i realy dont understant if when i put bbcode in source mode
then i clic on source again i see my bbcode work with colors and image but when i send it i only see the raw code
Re: bbcode plugin
Re: bbcode plugin
Re: bbcode plugin
You need turn off smart quotes. Bumping threads won't make that happen; changing hosts will... Or you can ask this question in a php forum. The CKEditor is the least of your problems if you don't fix the quotes. Any text that you will write on your site will add slashes to quotes and apostrophes, whether you use CKEditor or not, so this really isn't a problem we are obliged to fix for you. Why don't you try using this code. I stripped the quotes. Put it right after </textarea> (maybe it will work and you will have a quick fix).
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Re: bbcode plugin
cuz all try i make i was getting an error