Tiny MCE editor and fill the field
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: Tiny MCE editor and fill the field
Hello green.pine,
It might have to do with the content in your !EXTRACT variable, for example, does it contain quote characters? This might be confusing the Javascript interpretation.
Can you post an example of your extracted text file?
It might have to do with the content in your !EXTRACT variable, for example, does it contain quote characters? This might be confusing the Javascript interpretation.
Can you post an example of your extracted text file?
Regards,
Tom, iMacros Support
Tom, iMacros Support
-
- Posts: 6
- Joined: Mon May 23, 2011 2:15 pm
Re: Tiny MCE editor and fill the field
I'm having the same problem posting to the tiny_mce url.
It works fine for smaller html strings but large ones will not post properly. My guess is that we are over running the URL length. I'd be glad to send you my variable string if you'd like to test.
Thanks
It works fine for smaller html strings but large ones will not post properly. My guess is that we are over running the URL length. I'd be glad to send you my variable string if you'd like to test.
Thanks
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: Tiny MCE editor and fill the field
Please see my post here regarding reading the contents from a file.wg@gregorigroup.com wrote:I'm having the same problem posting to the tiny_mce url.
It works fine for smaller html strings but large ones will not post properly. My guess is that we are over running the URL length. I'd be glad to send you my variable string if you'd like to test.
Thanks
Regards,
Tom, iMacros Support
Tom, iMacros Support
Re: Tiny MCE editor and fill the field
To overcome the limitation of passing the text directly to JavaScript, which requires proper escaping and may be problematic with extracted texts, the following trick can be used:
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.
The first line creates a temporary textarea with id "imacros2tinymce" and adds it to the page. On the second line iMacros fill this textarea with the required content. The third line takes this content, sends it to TinyMCE and destroys the temporary textarea. It's a pretty hacky solution, but it should do the trick...
Example macro:
(should open the TinyMCE example page and after 5 seconds change the editor content to My content filled by iMacros (now including quotes ' " !))
Tested with iMacros for Firefox 7.2.1.0 in FF 3.6.17
- Create a temporary textarea with unique ID
- Let iMacros set the required text to this textarea
- Use JavaScript to read its content and send it to TinyMCE
- Destroy the temporary textarea
Code: Select all
URL GOTO=javascript:void(function(){var<SP>ta=document.createElement("textarea");ta.id="imacros2tinymce";document.body.appendChild(ta);}());
TAG POS=1 TYPE=TEXTAREA ATTR=ID:imacros2tinymce CONTENT=EDITOR_CONTENTS
URL GOTO=javascript:void(function(){var<SP>ta=document.getElementById('imacros2tinymce');tinyMCE.editors['EDITOR_NAME'].setContent(ta.value);document.body.removeChild(ta);}());
The first line creates a temporary textarea with id "imacros2tinymce" and adds it to the page. On the second line iMacros fill this textarea with the required content. The third line takes this content, sends it to TinyMCE and destroys the temporary textarea. It's a pretty hacky solution, but it should do the trick...
Example macro:
Code: Select all
VERSION BUILD=7210419 RECORDER=FX
URL GOTO=http://tinymce.moxiecode.com/tryit/full.php
WAIT SECONDS=5
URL GOTO=javascript:void(function(){var<SP>ta=document.createElement("textarea");ta.id="imacros2tinymce";document.body.appendChild(ta);}());
TAG POS=1 TYPE=TEXTAREA ATTR=ID:imacros2tinymce CONTENT=My<SP>content<SP>filled<SP>by<SP><b>iMacros</b><SP>(now<SP>including<SP>quotes<SP>'<SP>"<SP>!)
URL GOTO=javascript:void(function(){var<SP>ta=document.getElementById('imacros2tinymce');tinyMCE.editors['content'].setContent(ta.value);document.body.removeChild(ta);}());
Tested with iMacros for Firefox 7.2.1.0 in FF 3.6.17
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: Tiny MCE editor and fill the field
Brilliant! Thanks for the tip Eagle!
Regards,
Tom, iMacros Support
Tom, iMacros Support
Re: Tiny MCE editor and fill the field
Can we fill this type of editor using this trick : Let me know if there is any expert, who can help on this type of text editor.
http://www.quikr.com/post-classifieds-ads
http://www.yolist.com/post-free-classified-ads
Thanks
Vicky
http://www.quikr.com/post-classifieds-ads
http://www.yolist.com/post-free-classified-ads
Thanks
Vicky