adding source code to post
-
hi, I’m trying to post some java source code in a new post which is a java tutorial. the problem is that when I used de code and /code tags, it shows the code IN ONE SINGLE LINE. I don’t know what is the problem here. it also shows some HTML tags like p or br.
I’m quite frustrated, as showing code as plain text isn’t nice at all, but I’m facing this problem when using de CODE tags :( any help?
The blog I need help with is: (visible only to logged in users)
-
The software strips all blogger posts JavaScript out to preserve security on this multiuser blogging platform.
http://en.support.wordpress.com/code/#javascript
http://en.support.wordpress.com/code/posting-source-code/
See also http://en.support.wordpress.com/com-vs-org/ -
-
i didn’t even talk about javascript, dunno why you mention it. all i want is to post source code in a tutorial post.
-
-
[code language="java"]
String cadena = "Hola ";
cadena = cadena + "amigo, ";
cadena = cadena + "yo me dedico a la programacion";System.out.println(cadena);
[/code] -
If this does not help you http://en.support.wordpress.com/code/posting-source-code/ then type modlook into the tags on this thread and wait patiently for Staff assistance please.
-
that’s what I posted, but instead of showing 5 lines, it shows everything in just one line, plus, it adds some tags I didn’t add. thats the problem.
this is what wordpress shows 1 just one line.
String cadena = “Hola “;
cadena = cadena + “amigo, “;
cadena = cadena + “yo me dedico a la programacion”;</p><p>System.out.println(cadena); -
-
I apologize for the off base reference to JavaScript i made originally, I’ll tag this thread for a Staff follow-up. Please subscribe to the thread so you are notified when they respond and please be patient while waiting.
-
-
Hi there,
I’m sorry for the trouble you had posting that code. I just took a look at your blog, and I’m not seeing the problem you described. Here’s what I see in that blog post: https://cloudup.com/cl0Gez-ZEKq
If the code is still showing up incorrectly for you, can you make a screenshot of what you see there? You can upload screenshots to your Media Library under Media > Add New in your dashboard, or you can use an online service like Snaggy.
- The topic ‘adding source code to post’ is closed to new replies.