Jump to content

unchangeable String


alim

Recommended Posts

with help this command i can put a string insted of a selected one :tinyMCE.execCommand('mceInsertRawHTML', false, "blabla");but i can delete this string insinde the Tiny editor with the Del Button ( Keyboard ) ! How can make it undeletable or unchangeable ??? Does anybody have an idea ?

Link to comment
Share on other sites

You could make it private within a custom object, but the custom object can still be deleted (if someone knows its name):

function CustomObject(string){	this.getString = function(){		return string;	};}var myObj = new CustomObject('my private string');alert(myObj.getString());

Link to comment
Share on other sites

He's asking about a user-interface question. You can't stop someone from hitting the delete or backspace key or any other key to overwrite selected text. You can write the text into an element that does not allow editing though, like a div. Or you can check for a keypress and reset to text to whatever it was before they hit the key.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...