Tiny MCE editor and fill the field

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Tiny MCE editor and fill the field

by BrianC on Thu Oct 07, 2010 8:30 am

Hi,

i have Tiny MCE box

Code: Select all
<textarea wrap="virtual" name="comment"></textarea>


and the imacros script:

Code: Select all
TAG POS=1 TYPE=TEXTAREA ATTR=NAME:comment CONTENT=ffff


iMacros can't fill the Tiny MCE box, how i can fix this problem?
BrianC
 
Posts: 12
Joined: Tue Sep 01, 2009 1:11 pm

Re: Tiny MCE editor and fill the field

by BrianC on Fri Oct 08, 2010 9:07 am

iMacros support filling Tiny MCE box?

Mayby someone know tricks?
BrianC
 
Posts: 12
Joined: Tue Sep 01, 2009 1:11 pm

Re: Tiny MCE editor and fill the field

by CodeLab on Fri Oct 08, 2010 10:09 am

There Is One Workaround Solution,
Works In Firefox, Had Not Checked In Other Browsers...

Run This Macro Code As It is And See If It Works For You...
This Macro Example Takes You TinyMCE Demo Site And Fill Content In Editor

Code: Select all
VERSION BUILD=7000908 RECORDER=FX
TAB T=1
'Goto TinyMCE Demo Site
URL GOTO=http://tinymce.moxiecode.com/examples/example_17.php
'Click The HTML Button
TAG POS=1 TYPE=SPAN ATTR=CLASS:mceIcon<SP>mce_code
'It Should Open In New Tab, If It Opens In New Window Instead,
'You Will Have To Tweak Your Firefox To Make Popups
'Open In New Tab Instead Of New Window
TAB T=2
FRAME F=0
'Enter Your Content In HTML Code Area
TAG POS=1 TYPE=TEXTAREA FORM=NAME:source ATTR=ID:htmlSource CONTENT=sometext
'Click Insert/Update Button
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:source ATTR=ID:insert
CodeLab
 
Posts: 100
Joined: Sun Dec 27, 2009 10:50 am

Re: Tiny MCE editor and fill the field

by Tom, Tech Support on Sat Oct 09, 2010 1:52 am

Thanks for that tip CodeLab!
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: Tiny MCE editor and fill the field

by BrianC on Sat Oct 09, 2010 6:05 am

I done this too, it is no problems, but I must fill box without html button and im tired try fix this.
BrianC
 
Posts: 12
Joined: Tue Sep 01, 2009 1:11 pm

Re: Tiny MCE editor and fill the field

by CodeLab on Sat Oct 09, 2010 7:48 am

Ok I Dont Have Complete Solution Here..

I'll Just Post What I Have...
Maybe Someone More Expert Can Take It From Here...

Code: Select all
VERSION BUILD=6700624 RECORDER=FX
'Goto TinnyMCE Demo Site
URL GOTO=http://tinymce.moxiecode.com/examples/example_17.php
'Fill my_content In TinyMCE
URL GOTO=javascript:window.frames[0].document.body.innerHTML="my_content"


There Is Little Problem With Above Code...
After Second URL GOTO Is Executed, You Are Taken To A Blank Page With Only "my_content" On It
You Hit Browser Back Button And You See my_content Filled In TinyMCE

Here The iMacros BACK Command Wont Work
Because Technically 2nd URL Goto Does Not Goto A Website (Or I Think So).

So, Perhaps Another Solution Could Be..
1) Goto Any Page
2) Then Goto Webpage With TinyMCE
3) Run This javascript:window.frames[0].document.body.innerHTML="my_content"
4) Then Use BACK

And Completed Code Becomes Something Like This...

Code: Select all
VERSION BUILD=6700624 RECORDER=FX
URL GOTO=http://google.com
URL GOTO=http://tinymce.moxiecode.com/examples/example_17.php
URL GOTO=javascript:window.frames[0].document.body.innerHTML="my_content"
BACK


This Is Indeed A Dirty Solution (Or So I Think), Just Posting It, Maybe Someone Expert Can Make It Better...
CodeLab
 
Posts: 100
Joined: Sun Dec 27, 2009 10:50 am

Re: Tiny MCE editor and fill the field

by BrianC on Sat Oct 09, 2010 8:27 am

WOW, this work for now. I testet on 2 sites with box Tiny MCE and work. I go tested more. Big Thanks for You.

I don't know how work this but work :) line with: URL GOTO=http://google.com not nessesery, work fine on one GOTO.

One more time Thanks.
BrianC
 
Posts: 12
Joined: Tue Sep 01, 2009 1:11 pm

Re: Tiny MCE editor and fill the field

by CodeLab on Sat Oct 09, 2010 8:31 am

Happy To Help :D
Cheers :D
CodeLab
 
Posts: 100
Joined: Sun Dec 27, 2009 10:50 am

Re: Tiny MCE editor and fill the field

by iToo on Sun Oct 17, 2010 11:26 pm

can anyone help me getting a script like this to work through php/iimrunner.exe?

want to use basically the same script (which I already made myself) to parse some text from .csv into a .php page with some text fields.
Thanks!
iToo
 
Posts: 13
Joined: Sun Oct 17, 2010 7:28 pm

Re: Tiny MCE editor and fill the field

by samydel76 on Sun Jan 02, 2011 2:45 pm

Hi, I have a problem with tinymce, I tried all the suggestions I have read on this forum, but I can not find the solution to put a value on my textarea. The script my imacro record is:

VERSION BUILD=7031111 RECORDER=FX
TAB T=1
URL GOTO=http://www.mundoanuncio.com/publicar/zona/california_293/categoria/eroticos_profesionales_18.html
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form ATTR=ID:titol CONTENT=This<SP>is<SP>the<SP>title<SP>of<SP>my<SP>ad<SP>that<SP>I<SP>want<SP>to<SP>publish
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form ATTR=ID:ciudad CONTENT=My<SP>City
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form ATTR=ID:barrio CONTENT=My<SP>Neighborhood
FRAME F=1
TAG POS=1 TYPE=P ATTR=TXT:This<SP>is<SP>the<SP>full<SP>contents<SP>of<SP>the<SP>ad<SP>you<SP>want<SP>to<SP>post.
FRAME F=0
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form ATTR=ID:mail CONTENT=myemail@email.es

Can anyone help? I tried all the options that you have posted, but I have not been successful.

Thank you very much.
samydel76
 
Posts: 1
Joined: Sun Jan 02, 2011 2:35 pm

Re: Tiny MCE editor and fill the field

by Eagle on Tue Feb 01, 2011 4:17 am

You can actually control TinyMCE simply using it's JavaScript interface and the URL command. This line should do the trick:
Code: Select all
URL GOTO=javascript:void(tinyMCE.editors['EDITOR_NAME'].setContent('EDITOR_CONTENTS'));

where EDITOR_NAME is name of the textarea the editor is associated with and EDITOR_CONTENTS is what you want to set the contents to (remember to keep the iMacros syntax - <SP> instead of space etc.).

Example macro:
Code: Select all
VERSION BUILD=7031111 RECORDER=FX
URL GOTO=http://tinymce.moxiecode.com/tryit/full.php
WAIT SECONDS=5
URL GOTO=javascript:void(tinyMCE.editors['content'].setContent('My<SP>content<SP>filled<SP>by<SP><b>iMacros</b>'));

(should open the TinyMCE example page and after 5 seconds change the editor content to My content filled by iMacros)

Tested with iMacros for Firefox 7.0.3.0
Eagle
 
Posts: 2
Joined: Tue Feb 01, 2011 2:45 am

Re: Tiny MCE editor and fill the field

by Tom, Tech Support on Thu Feb 03, 2011 5:03 am

Excellent tip Eagle, thanks for sharing!
Regards,

Tom, iMacros Support
Tom, Tech Support
 
Posts: 3300
Joined: Mon May 31, 2010 9:59 am

Re: Tiny MCE editor and fill the field

by GoSu on Mon Feb 21, 2011 11:46 pm

Eagle thanks for the idea, it works perfectly.
GoSu
 
Posts: 8
Joined: Sat Feb 19, 2011 10:36 pm

Re: Tiny MCE editor and fill the field

by Marzy on Tue Apr 19, 2011 11:02 am

Am not able to make this work! When trying to access the TINYmce the Imacros Browser locks-up and shuts down! :shock:
Marzy
 
Posts: 1
Joined: Thu Mar 31, 2011 11:03 pm

Re: Tiny MCE editor and fill the field

by green.pine on Sun Apr 24, 2011 12:43 am

thanks;
this works nicely,

but i tried to make it little more automated and instead of typing some text put the value of extracted text file there, some works and some not,
it has problem with either data volume or format, I could not figure it out.
I removed all line break in the text file and tried again but it did not work, i removed some of the text it did work, then opened the text file and copy some of the text and pasted it at the end and it did work, can not figure it out the behavior.

is there some kind of memory limitation for JS?
or text should be in any special format?
here is how i used the js code:
Code: Select all
URL GOTO=javascript:void(tinyMCE.editors['wsMainEditor'].setContent('{{!EXTRACT}}'));

in my macro I set it to read a text file from my computer.

appreciate a solution to this.
green.pine
 
Posts: 62
Joined: Thu Nov 04, 2010 10:21 am

Next

Return to iMacros for Firefox

Who is online

Users browsing this forum: Bing [Bot] and 11 guests

-->