ID:155658
 
mob/verb is at the top already.
    Show_Code(mob/M in world)
var/msg= input("Put your code here.", "Code") as text
var/code_doc = {"[src.name]([src.key]) would like to share this code with you:<br><br>[dm][msg][/dm]
"}

M << browse(code_doc,"window=Code")


I want to know how to put the msg in the DM visual code colors and stuff. The part with [dm]and [/dm] are actually <>. But since if I put the <> the code will close off in this post.
I think the DM tags only work with the website...

But I suppose you could try to make the code check for words like "if" and change the color to blue, and etc.

Not so positive about this, though.
Here's a library that will add the formatting for you, made by none-other than Lummox JR himself:
Syntax Highlighter

Also, you should use "as message" instead of "as text" for your input. That way, it will show more than one line.
In response to DarkCampainger
DarkCampainger wrote:
Here's a library that will add the formatting for you, made by none-other than Lummox JR himself:
Syntax Highlighter

Also, you should use "as message" instead of "as text" for your input. That way, it will show more than one line.

Thank you for the library. And I did use as message. That was just a bit of an old code from an hour before my last update. But, thank you for your help. I will check to see if it is what I am really looking for.



Edit: Yes, it works. Thank you.