Skip to content
Advertisement

value of text.replace() to another variable

I have a code to clear and paste text after clicking a button. This text is pasted into two different textareas and therefore my code has to clean up the intercepted content a bit differently. The problem is that it doesn’t work to pass the content to another variable…

JavaScript

I want txtq and txte to format the value differently for <blockquote>, but data transfer from txt doesn’t work – why?

I need this efect for <quote>: console.log(txtq + '|' + txte + '|' + txt);//[hr][i]etc[/i] | [quote]n

but is working like that: console.log(txtq + '|' + txte + '|' + txt);//<blockquote>|<blockquote>|

Advertisement

Answer

For txtq and txte, you are modifiying txt var.

Insted of:

JavaScript

try:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement