Want to put source code snippets in my page with formatting. How?
How do I insert source code snippets and have them retain formatting (indenting, etc.)?
4
people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?You should be able to use the <raw> tag around code and then paste it into the HTML plugin so it displays as you wish.
Example:
<raw><a href="http://google.com">Go to Google<a></raw>
I’m hoping this helps
1 person says
this answers the question
-
Inappropriate?Hi Clif. Thanks for the response. That doesn't help. The <raw> tag eliminates all the whitespace and indentation altogether.
I'm trying to do the equivalent of Trac's "Preformatted Text":
http://trac.edgewall.org/wiki/WikiFor...
search in the page for "Preformatted Text"
I've tried using the HTMLtag but after multiple saves, all my indenting goes away.
</raw>
Thanks.
I’m frustrated
-
Inappropriate?<verbatim></verbatim>
no support (yet) in 2.0 -
Inappropriate?For V2, you just paste it in the page. You don't use source view, you don't need any special tags. Here's an example.
I’m wondering what the problem is
-
Inappropriate?Ok, now I see a problem. If you paste formatted HTML into a page, it will retain the formatting when you save it. However, when I go back and edit it a second time, the formatting for the HTML is lost. However, the Javascript formatting was not altered.
rajatrocks, what are the snippets you're trying to use? HTML, JS, C/C++/C##? If you'll show me the code you're trying to use, I'll see what it takes to make PBwiki "leave it alone".
I’m disappointed that WYSIWYG is still altering people's pages in ways they do not intend
-
Inappropriate?I just created a ticket to leave <pre> tags alone in the Point-and-Click editor, #820. That should be a pretty decent solution once it's implemented.
-
Inappropriate?I'm trying to put XML with whitespaces and tabs (for readability) into a page. So your HTML example illustrates the issue perfectly.
thanks.
In the meantime I've tried the HTML plug-in, but that's not so easy to use. The PRE tag solution sounds good.
I’m waiting...
Loading Profile...






