You must Sign In to post a response.
  • Category: Suggestions and Feedback

    Writing html code in articles and forum

    Basically, I need to write some code in answering some questions in Forum. I saw that starting with [ CODE] and Ending with [ /CODE] display the code as it is. But, when I write my html code between these quote, It displays interpreted quote of html. Am I doing something wrong ?
  • #23525
    Can you make use of the HTML way of writing quotes? It is done by & lt; and & gt; (remove the space between ampersand and alphabets). That way HTML codes can be written easily.

  • #23526
    If I need to write 10/15 lines, it is not a good idea. One cannot waste time writing & lt; for < sign and & gt; for > in each line. For few lines it can be alternate. Any idea for larger code ?

  • #23527
    If you're asking about writing code in techulator articles then as far as I know there is no provision for it. I hope tony sir can chime in on this discussion and guide further. I have plenty of topics to write which involves code but unfortunately can't because there is no code beautifier included.

    If you want to write code in articles the best option is using Github Gist. You can just link to the gist if it is not embed-able here.

    One more trick is to take screenshot of small code snippet if that's what you want to show.

    I understand current limitations makes it harder to share code but these are our options for now.

  • #23530
    Since this website is not really a technical site where we address a lot of programming questions, that feature is not available for forum answers.

    However, for the original forum post (the question or message), there is a checkbox that says "Format as HTML", which editors can check or uncheck to format the text accordingly.

    An easier work around for you is to do a "Find and Replace" using notepad and replace the angle brackets with appropriate escape characters.

  • #23531
    Thank you @Tony Sir for your response. I hope find and replace is the best idea for writing multiple lines of code. Hope this helps others members future queries too.
    Happy Coding :)

  • #23581
    Please be more clear on what exactly is the problem you are having. It may not be exactly the same as the one faced by Vijay Kumar. If the problem is something different and not associated with coding, it is advisable to post your problem in a separate thread rather than mixing it in with this thread where it could get lost.


  • Sign In to post your comments