Jump to content
UBot Underground

Work with text editor wysiwyg


Recommended Posts

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.

Link to post
Share on other sites

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

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...