tags:

views:

33

answers:

1

i have coded a forum and now im going to code the post a thread part.

i wonder how i shall proceed from here. i want it to be like Stackoverflow where you have some buttons above the textbox where you can click for different thing you want to insert eg. "hyperlink", "image", "code sample", "numbered list", "bulleted list" and so on.

are these free scripts or do you code them yourself?

and if the latter, are there some guides for this?

+1  A: 

I assume you mean the various editing possibilities to the top of the input field.

These are components that you can download and integrate into your own scripts. No need to necessarily code those from scratch. They are mostly based on pure JavaScript and do not require any specific server side language. Many can be loaded on top of a standard textarea.

Stack Overflow uses markdown as editing language. The closest (in editing capabilitles) freely available control for markdown I can find is wmd. There are also full-blown WYSIWYG editors out there like CKEditor.

Pekka
thx for the links especially to CKEditor. Do you think that one is an overkill for using in posting threads? Will users need all thoses word features?
weng
It might depend on your audience. For SO, the markdown is perfect, works with probably almost every browser, is fast and makes pasting code very easy. For non-technical users, a lightweight CKEditor may be the better choice.
Pekka
just one question. ive downloaded it but how do you actually install it? the documentation just says access the samples pages and i have done that. but i dont quite get how to implement it on my webpages textboxes and how it will be saved in my mysql and so on...is there some guide or have i misunderstood something?
weng
Check out http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Integration basically, you add all the necessary Javascript and CSS files to your page, create a `<textarea>` element and then follow the steps described in the guide to turn that area into the WYSIWYG editor.
Pekka
thx for the documentation. now i have it installed but i wonder how you customize the toolset above the textarea? (where is all the information for this?)
weng
It's all in the docs: http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar
Pekka