Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
2.0k views
in Q2A Core by
edited

how do i put the code snippet on the ask a question page like this one on icsejava.com

now how to put this snippet ?

I want it for my site i.e. googlekabaap.herobo.com/icsejava

 

please help me as this is a very very important for my website.

I love this q2a software but just this snippet is missing.!

 

 

(this is not a fake image this is a

screenschot taken by me from

icsejava.com)

Q2A version: Latest
by
a plugin could be done for this .
by
From where do i get that plugin from?  Please help me
by
I mean you could develop a plugin or hire a plugin developer for this . Use code snippet for ckeditor and one more highlighter plugin to highlight the code snippets . Send me an private message if you are  interested .
by
ckeditor itself supports code snippet, can be downloaded from here
http://ckeditor.com/addon/codesnippet
or download a new version of ckeditor with full features.

2 Answers

0 votes
by
There is actually a plugin for this. The thing is it is not a Q2A plugin. CKEditor is mostly a bunch of plugins and you can setup it the way you want and it doesn't have anything to do with Q2A. I think this particular CKEditor plugin is SyntaxHighlight: http://ckeditor.com/addon/syntaxhighlight . Read the CKEditor documentation to understand how to install plugins. Then refer to the qa-plugins/wysiwyg-editor Q2A plugin to perform the needed changes.
by
http://ckeditor.com/builder
I download the ckeditor from here
but now how do i put it on my question2answer site  ?

Please explain in details and thanx a lot for your help.
by
The downloaded file i extracted in qa-plugin but it does not show on the admin part of the website.... What must i do now ?
by
Yah you are correct pupi1985 . There is a highlighter plugin for CK editor . This is nothing but the highlight.js (papular highlighter library) package included .

But if we do this way , the code highlight will not work if the editor will not load . E.g editor does not load for closed questions , and if answer/comment is not allowed for anonymous users . Thats why I recomended him to make a separate plugin for syntax highlighting .
+1 vote
by
Hi Femin - 
 
Download ck editor by using the builder with necessary plugins . Dont forget to include the code snippet and syntax highlighter . Then download the plguin created by Sama55 here .  
 
Look at the code how he had developed the plugin . Then do the same to create your own editor . 
 
Then after check with q2a site is your editor is loading the CK editor or not and functions properly or not . If everything is fine then try to load the required css file from the syntax highlighter plugin in order to highlight your code . 
 
I would recommend you to create a separate syntax highlighter plugin . That will be helpfull in many ways . 
 
Hope this helps . 
 
 
by
can you please give me a direct link where i can download the files for plugin and can you please give me the content that i will have to add it to the config.js

i cannot understand it because i am new to all this things.
...