Hi all.
Can anybody point me in the right direction as to how to implement the editor that opens up when I click Start new thread or post reply?

Also when displaying the replies how is the feature with syntax highlighting and indentation for the code snippets implemented ?

Thanks.

its all a part of cms like vbulletin / phpbb

it take quite some work to implement your own

After some googling, I found TinyMCE and SyntaxHighlighter. But I'm not getting how to integrate those two. I'm using JSP/Servlets in the backend.

I've been using TinyMCE for a while. You need to have the library on your server side and include the library in the page. Don't forget the configuration in your javascript. Then you need to follow the format of a textarea element and it should automatically shows the editor for you.

I've been using TinyMCE for a while. You need to have the library on your server side and include the library in the page. Don't forget the configuration in your javascript. Then you need to follow the format of a textarea element and it should automatically shows the editor for you.

Okay. So I've got TinyMCE show up in the text area and the textual data gets inserted in the database. Now, when I retrieve the data from the database during display how do I make it so that the display is formatted by SyntaxHighlighter?

Sorry, I don't use SyntaxHighlighter. My codes are usually copy righted to the company I am working for. However, you may look at the SyntaxHighlighter demo and view its page source. From what I understand, you need a 'pre' tag and also load the library to the page. Then, you add the html-script property to the 'pre' tag. That's my guess.

Sorry, I don't use SyntaxHighlighter. My codes are usually copy righted to the company I am working for. However, you may look at the SyntaxHighlighter demo and view its page source. From what I understand, you need a 'pre' tag and also load the library to the page. Then, you add the html-script property to the 'pre' tag. That's my guess.

So, that means if I want the content from TinyMCE to be formatted by SyntaxHighlighter while displaying, I will need to wrap the code contents within <pre></pre> tags. Will it pose any problems to TinyMCE to provide explicit HTML tags?

Free CKEditor

my company uses it, though we abbreviate it lovingly "fcked" But it works nicely for what we're doing, which is working with Word documents.

Hmm... If you want WYSIWYG 'editor' which also displays a code format at the same time, I doubt there is one for you. The reason is the HTML element property limitation. Though, you could create one but would not be as much pretty as you want. If you see this forum, it only 'display' the code in whatever its format, but it will display as a textarea when you do the editing. In other words, you can accept the input using a WYSIWYG editor on a textarea, and then display it out on pre tag afterward. No editing & displaying at the same time (similar to this website).

@Fortinbra
Yes, The editor you are talking about is called Fckeditor which is a legitimate name. It's been around for a long time too. Not sure whether it is before TinyMCE.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.