Jump to content

copiable code


ben03

Recommended Posts

that only prevents the user from typing in the textarea. I can still copy and paste into a text editor.The only way I know to stop this is to place a transparent div (the same size as the textarea) over top of the textarea.

Link to comment
Share on other sites

But the transparent div will prevent copying, which seems to be contrary to the point.You could disable the textarea, maybe, though that messes with the color.I suspect ben03's reason for using a textarea instead of a div is so you can include HTML tags without having the tags be interpreted as tags? One way around that is to replace your opening "<" characters with "<". When the user copies, the entity will be copied as the character.(I actually don't know if that's true in all browsers, but it should be.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...