ACE Editor how to insert/delete content?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
imacrobest
Posts: 13
Joined: Fri Aug 19, 2016 2:03 pm

ACE Editor how to insert/delete content?

Post by imacrobest » Mon Jul 23, 2018 12:35 am

Hi,

Does anyone know how to delete and insert content into ACE Editor?

I saw a post here https://forum.imacros.net/viewtopic.php?f=11&t=19803 but I can't work out on how to do it for ACE Editor
URL GOTO=javascript:void(tinyMCE.editors['proprty_desc'].setContent({{!COL4}}));

ACE editor example: https://ace.c9.io/#nav=embedding
java https://ace.c9.io/build/src/ace.js

iMacros chrome Extension: 10.0.2
iMacros_for_Chrome
Windows 10
Chrome Version 67.0.3396.99 (Official Build) (64-bit)
Last edited by imacrobest on Mon Jul 23, 2018 10:36 am, edited 1 time in total.
chivracq
Posts: 8201
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: ACE Editor how to insert/delete content

Post by chivracq » Mon Jul 23, 2018 1:43 am

imacrobest wrote:Hi,

Does anyone know how to delete and insert content into ACE Editor?

I saw a post here https://forum.imacros.net/viewtopic.php?f=11&t=19803 but I can't work out on how to do it for ACE Editor
URL GOTO=javascript:void(tinyMCE.editors['proprty_desc'].setContent({{!COL4}}));

ACE editor example: https://ace.c9.io/#nav=embedding
java https://ace.c9.io/build/src/ace.js

Code: Select all

iMacros chrome Extension: 10.0.2
iMacros_for_Chrome
Windows 10
Chrome Version 67.0.3396.99 (Official Build) (64-bit)
You could put a Question Mark to your Thread Title, you are not sharing a 'How-to'... :idea:

But, hum..., seems to work pretty straightforward for me from some Quick Test on the Site I use in my Script as Example as I couldn't find any "real" Example of your Editor from the Link(s) you provided without building myself some HTML Page, using the 'EVENT' Mode without ID's... (as ID's look Dynamic to me and I was too "lazy" to "insist" any further with dealing with ID's and with the 'TAG' Mode...):

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=https://alloyui.com/examples/ace-editor/real-world

EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>DIV:nth-of-type(2)>DIV" BUTTON=0
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>TEXTAREA" KEY=13

EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>TEXTAREA" CHARS="var x=\"lovely string\";"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>TEXTAREA" KEY=13
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)

>>>

+ Parallel Thread (Semi-Duplicate... :wink: ) in the 'iMacros Consultants' Sub-Forum:
- Pay Job - ACE Editor insert content
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
imacrobest
Posts: 13
Joined: Fri Aug 19, 2016 2:03 pm

Re: ACE Editor how to insert/delete content?

Post by imacrobest » Mon Jul 23, 2018 10:37 am

Awesome! Thank you for your help!
I have adjusted the posts
imacrobest
Posts: 13
Joined: Fri Aug 19, 2016 2:03 pm

Re: ACE Editor how to insert/delete content

Post by imacrobest » Mon Jul 23, 2018 11:45 am

All OKfor the TEXTAREA as I'm able to locate the ID for it.

But I can't find the class/ID for the selector, could I get a screenshot of where this is so I can trace it?

Code: Select all

EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>DIV:nth-of-type(2)>DIV" BUTTON=0
Thank u
chivracq
Posts: 8201
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: ACE Editor how to insert/delete content?

Post by chivracq » Mon Jul 23, 2018 12:12 pm

imacrobest wrote:Awesome! Thank you for your help!
I have adjusted the posts
Ah-ah...!, looks like I "missed" a "Paid Job", damned...!! :P
But OK, glad it works...
imacrobest wrote:All OKfor the TEXTAREA as I'm able to locate the ID for it.

But I can't find the class/ID for the selector, could I get a screenshot of where this is so I can trace it?

Code: Select all

EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>DIV:nth-of-type(2)>DIV" BUTTON=0
Thank u
It was a simple Click on the already existing first Line with the 'alert()' on that Site to get the Focus on this Line inside the Editor, as I chose to keep this Line, + a 'Enter' at the end to get a 2nd Line.
On your "real" Site, that first Line might not be present..., and you can then simply skip my first 2 'EVENT' Statements that are probably not needed..., although one of the 'nth-of-type(n)' might shift up as each (new) Line in this Editor gets its own 'DIV' Element.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply