How To Include Code In Weebly Forums Comments and Forum Topics
We have seen more people facing difficulty with adding Code to “Comments” and “Forum Topics” in Weebly Forums. We now have installed WP-Markdown, which lets our users include HTML and CSS code easily with just a click. The comment box looks like this. Check further down for step-by-step instructions.
Step 1: Type your text
When you add any HTML or CSS code, it would normally be interpreted by the browser. In order for the browser to show your code as is, it needs to be marked as code to be shown in its literal form.
The first step is to paste your code in place. Add a new line above the code segment. Do the same for below the code segment.
Step 2: Highlight the part you want to post as code
Highlight the segment of code that you want to be shown as-is.
Step 3: Mark it as code using {}
While the code segment is highlighted, click the {} icon. Then submit your topic/reply.
This will ensure that the code is not interpreted by the browser and will be shown exactly as is. You will also be able to see a preview right below the comments. If you do not see a special formatting for the code segment in preview, then you are missing some thing.
There are other formatting options also that you can make use of.






Raju, I cannot get this to work properly. It is very frustrating. No matter how I try it, it always strips the greater than and less than tag elements
Ryan, can you please send the code in the feedback form ? The code part {} is a toggle. If clicked twice, it is equivalent to On and Off. Send me info about where you are trying to paste the code. I will try it and see.
Thanks for replying raju. Here are my examples:
http://weeblyforums.com/topic/embedded-video-not-playing-on-iphone/
http://weeblyforums.com/topic/3-titles/
http://weeblyforums.com/topic/frames-and-click-bank/
http://weeblyforums.com/topic/tall-header-image-not-displayed/
In each instance I used the code {} button to change the highlighted text into formatted code, and in each instance the preview of my post showed the code formatted and highlighted properly before I hit submit. Yet when the post is published, any tags or even just any opening and closing greater than/less than symbols are stripped from the text. It ia very very annoying and ultimately renders sharing code useless.
Thanks Ryan, I will check these and let you know. I was able to paste < and > without any problems many times in the past. I need to figure why it is working for me and not for others. Let me try it on a few different browsers/OSs and see.
Hello Ryan,
It seems to be working fine for me. I edited the topic at http://weeblyforums.com/topic/embedded-video-not-playing-on-iphone/#post-7611
Please check and let me know. I really want to find out why it did not work for you. Unless I see the problem, I won’t be able to have it fixed.
If it is some thing to do with the way it is posted, I can update the instructions, but I still need to know which part is confusing.
Appreciate you bringing it to my attention.
Hi Raju, after some investigation, I don’t think this has anything to do with which browsers are being used (actually I never did, since it was stripping the tagged code out after submitting the comment, but hey ho). Instead, I think there is an issue with either or both the permissions you have set for sub-admin level users, and/or the settings for the code escape plugin you’re using.
The user security levels are pretty much not going to change, unless you want people mucking around with your pages, big time. So lets just look at the plugin for now. I don’t know which comment plugin you are using, but here’s an article that makes the problem clear nad provides a fix to it. Even if you’re not using the same plugin, it could be helpful to figuring out what’s going on.
http://mikeage.net/2006/10/05/posting-code-in-wordpress-and-comments/
Hi Ryan,
We are using the wp-markdown plugin
http://wordpress.org/extend/plugins/wp-markdown/
There is no special privilege for admins as far as posting code is concerned.
I will anyway check it with a test account.
Others have posted code with < and > in the forums.
I just hope this isn’t some thing intermittent, which makes it difficult to narrow down.
OK, so the above test is done with the CODE shortcode, and as you can see, the comment was stripped of the HTML TITLE tag I wrapped the text in, but it formatted the text with a background as it should have done. After looking through the support articles of the link you pointed me to I found this, please read: http://wordpress.org/support/topic/plugin-wp-markdown-greater-than-is-incorrectly-encoded
<video width="320" height="240" controls autoplay poster="video.jpg"><source src="PASTE YOUR VIDEO LOCATION HERE" />
Your browser does not support the video tag.
</video>
Hi Raju, still having problems with the code formater. The above code snippet was posted here using the backtic method (one backtic at the beginning of the code, and one at the end)
I posts fine here, but when I attempted to post this in one of the forums, the code was stripped and all that was left was
Your browser does not support the video tag.For a forum where code formatting and posting for examples and support is vital, not having the ability to post code is really not sufficient. I’m hoping we can sort it out together, but there is clearly something wrong. The fact that the posts are formatted correctly in comments but not in the forum suggests that it is something to do with the forum add in for wordpress, or one of the related add ins.
Alright. Let me get to bottom of it this week. I appreciate your patience.
Hi Ryan,
All users can now post unrestricted html. Please give it a shot in the forums and let me know if you still face any issues.
All I want to find out is what a Weebly template’s horizontal size in inches is. Why? Because I rough draft organize my data in a familiar-to-me software of SmartDraw. Then I will create that layout into my new Weebly site.