Find and replace text inside textarea

258 views
Skip to first unread message

Judy Ann De Luna

unread,
Jun 9, 2021, 10:16:48 PM6/9/21
to Autofill Chrome Extension
Hi, 

On the practice site, 
I would like to change the text 
"YUI 2 Rich Text Editor default text (inline iframe)." 
in this textbox 
"Type = Text  Name = ^yui2rte_editor$  Value = <b>This field was autofilled!</b>".

When I press my hotkey there are no changes.
This are some of the code I tried:

let e = document.querySelector('.yui2rte);
var i;
for(i=0; i < length.replacearray; i++){
var replaceword= replacearray[i][Math.floor(Math.random()*items.length)];
res = str.replace(/findword[i]/gi, replaceword);}

and this 
findword = ["YUI", "2 Rich", "Text", "Editor"];that.find('.yui2rte').each(function(){var full_text=$(this).text();$.each(f, function(i){full_text=full_text.replace((findword[i],"gi"), (replacearray[i]));});$(this).html(full_text);});

Have selected type: Javascript and the code is under Value. Maybe I'm mistake about the array but I have my array variables placed under "variables".

Hope someone can help
Thank you

Autofill Chrome Extension

unread,
Jun 13, 2021, 6:09:47 PM6/13/21
to Autofill Chrome Extension
Hi, have you tried to use the wizard to generate the rule for you? Enter the text you want in the box, then click on the Autofill lightning bolt icon.
Reply all
Reply to author
Forward
0 new messages