Jump to content
php.lv forumi

Teksta papildināšanas pogas


janisetnies

Recommended Posts

Tātad jautājums ir, ko es izdariju?

 

no 35. rindas līdz 42. rindai šo:

// the text before the selection
	var pretext = textarea.value.substring(0, b.selectionStart);

	// the selected text with tags before and after
	var codetext = open + textarea.value.substring(b.selectionStart, b.selectionEnd) + close;

	// the text after the selection
	var posttext = textarea.value.substring(b.selectionEnd, textarea.value.length)

nomainiju pret šo:

// the text before the selection
	var pretext = textarea.value.substring(0, textarea.selectionStart);

	// the selected text with tags before and after
	var codetext = open + textarea.value.substring(textarea.selectionStart, textarea.selectionEnd) + close;

	// the text after the selection
	var posttext = textarea.value.substring(textarea.selectionEnd, textarea.value.length)

 

tālāk no 86. rindas līdz 90. rindai šo:

// the text before the selection
	var pretext = textarea.value.substring(0, b.selectionStart);

	// the text after the selection
	var posttext = textarea.value.substring(b.selectionEnd, textarea.value.length)

nomainiju pret šo:

// the text before the selection
	var pretext = textarea.value.substring(0, textarea.selectionStart);

	// the text after the selection
	var posttext = textarea.value.substring(textarea.selectionEnd, textarea.value.length)

 

tālāk 128. rindas līdz 132. rindai šo:

// the text before the selection
	var pretext = textarea.value.substring(0, b.selectionStart);

	// the text after the selection
	var posttext = textarea.value.substring(b.selectionEnd, textarea.value.length)

nomainiju pret šo:

// the text before the selection
	var pretext = textarea.value.substring(0, textarea.selectionStart);

	// the text after the selection
	var posttext = textarea.value.substring(textarea.selectionEnd, textarea.value.length)

 

textarea ir teksta laukuma nosaukums!

Edited by janisetnies
Link to comment
Share on other sites

×
×
  • Create New...