bondikho 0 Posted December 14, 2021 Report Share Posted December 14, 2021 Is there a way to work with ubot studio wysiwyg Like append text, select text , delete text. Any ideas how can I make this possible Quote Link to post Share on other sites
PRO 69 Posted December 21, 2021 Report Share Posted December 21, 2021 I have done it multiple times. If you use the inbuilt browser, it can be done like so: 1. Use the "scrape attribute" function to extract the contents of the WYSIWYG editor text area element. 2. Then, edit the content directly inside UBot however you want (append, edit, replace etc.). 3. Last step is to update the WYSIWYG editor text area, putting the edited contents back in, using the "change attribute" command on it. Quote Link to post Share on other sites
PRO 69 Posted December 21, 2021 Report Share Posted December 21, 2021 Here I prepared some ready-made code as an example. You can run it and see how it works: comment("Go to the WYSIWYG editor and wait for it to load") navigate("https://fiddle.tiny.cloud/","Wait") wait(5) comment("We simply type something into it") type text($element offset(<tagname="html">,2),"test","Standard") wait(2) comment("Now we extract the contents from the WYSIWYG editor") set(#scraped_content,$scrape attribute(<(tagname="body" AND id="tinymce")>,"innerhtml"),"Global") comment("Now we will edit the contents inside of UBot, you can replace, append, whatever seems needed. Here we just insert new contents.") set(#scraped_content,"<h3>This is how to automate a WYSIWYG Editor in UBot Studio</h3><p>I have done it multiple times. If you use the inbuilt browser, it can be done like so :)</p>","Global") comment("Last step is to put the edited content back inside the editor. That\'s it!") change attribute(<(tagname="body" AND id="tinymce")>,"innerhtml",#scraped_content) How To Automate a WYSIWYG Editor with UBot Studio Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.