954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Answer editor like this forum's ?

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.

armageddon11
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

its all a part of cms like vbulletin / phpbb

it take quite some work to implement your own

anilashanbhag
Junior Poster in Training
58 posts since Oct 2010
Reputation Points: 10
Solved Threads: 10
 

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.

armageddon11
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

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.

Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
 
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 ?

armageddon11
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

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.

Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
 
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 tags. Will it pose any problems to TinyMCE to provide explicit HTML tags?

armageddon11
Newbie Poster
4 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

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.

Fortinbra
Posting Whiz in Training
240 posts since Jan 2011
Reputation Points: 47
Solved Threads: 12
 

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.

Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: