Questions and Answers

How do I collect points?

  • +4
    Chosen as best answer
  • +1
    Posted answer
  • +1
    Posted question
  • +1
    Thumb up
  • -1
    Thumb down

by Jimi C in Coding about February 13, 2012 open - report

Write HTML code in forum posts as code snippets

Hey guys, 

is ther a way to write html codes in forum posts? I mean, i want the code to be seen, not to be executed. It´s a tech community, so people want to place codes in the forums, i tried to wrap the code with <code>, but it doesn´t work.

I even asked in th TinyMCE forums, but got no answer yet.

Do you guys have any ideas on how to achieve that?


Answer: 1  •  Score 1  •  Views: 952

1 Answer
Browse by
  • 400

    by Nick about February 13, 2012

    You can do it right now withoit any problems. Try it


    <img src="" />



    echo "Hello world"



    Editor will simply wrap the code and it won't be executed.

    • Score: 0
    • Jimi C
      by Jimi C
      February 14, 2012

      Well, in Forums, but it would be in general i guess...
      You don´t have html enabled in this plugin right?

    • Nick
      by Nick
      February 14, 2012

      No html coding is allowed, but you can use editor buttons to make some basic formatting, add link, image or embedded video. I think that's more than enough for all regular users. And if you need to show some programming code - you can easily do it without...  more

    • Jimi C
      by Jimi C
      February 14, 2012

      But i can´t show programming code, if i place the code it shows your banner, not like here. Strange, maybe this Q&A editor is different from the forums.

    • Jimi C
      by Jimi C
      February 14, 2012

      I just noticed something, my articles plugin editor behaves just like yours here, i´ll take a look at the source code.

You must login to post an answer.