It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,
I'd like my users to be able to put source code samples inside posts on my web page - what is the best way to put code, maybe with coloring also...?
For example - when I try to put some C++ program I get first line ( [hash] include.....) wrongly "understood" by Vanilla... plus the line formatting is wrong...
using namespace std;
int main() { cout << "Hello world!" << endl; return 0; }
Ps. This probably depends on WYSIWYG editor plugin on my page... I use CLEditor... What would be better in this case?
Answers
use
another way
inline snippet use backticks
`snippet`or use
<code>snippet</code>wsiwyg editors can be configured to wrap code, however is good to be able to switch to source code.
Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •It does not work... for example here - when I write a comment and I want to put a line "hash include bracket iostream bracket" (using code keyword) I get:
include
Try it yourself....
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •im using GoogleCodePrettify 0.3 addon
addon : http://vanillaforums.org/addon/googlecodeprettify-plugin
demo : http://geek.lk/discussion/40
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •maybe this will help http://vanillaforums.org/discussion/comment/157262#Comment_157262
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •do it like so
Yes that is right
<, this is a limitation of this parser.Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •