Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-07 18:46:45

apo
Member
From: Germany
Registered: 2004-10-27
Posts: 53

Code in article and comments?

anyone outta there who can tell me something about pasting code in articles and comments?

i know of the glxcode plugin, but what i want is something without the need of attaching a text file… isnt there anything builtin w/ textile thats proper working or something? :-/

Offline

#2 2005-11-07 21:36:57

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

Re: Code in article and comments?

What about the standard method? Wrapping everything in @ signs (if it’s one line) or in HTML code elements (if it’s longer).

With some CSS thrown in it shouldn’t be a problem. Especially the CSS property white-space:pre could be used.

Offline

#3 2005-11-08 00:21:35

apo
Member
From: Germany
Registered: 2004-10-27
Posts: 53

Re: Code in article and comments?

i thought about this too, but txp un-formattes it in quite an ugly way (at least when i tested it)

for example:

<code>
<html>
<head>
<style type=“text/css”>
<!—
#container { position:absolute; // Wichtig! width: 700px; left: 50%; // Dies, zusammen mit… margin-left: -350px; // … diesem zentriert das Ganze horizontal
}
—>
</style>
</head>
<body>
<div id=“container”>
</div>
</body>
</html>
</code>

^^ there you can see what i mean. here its the same. it doesnt handle it correctly.

Offline

Board footer

Powered by FluxBB