Jump to content
UBot Underground

[ SOLVED | TinyMCE / IFRAME Javascript? - Need to fill it with a Blog Post


Recommended Posts

I need to fill this textarea - that has been taken over by tinyMCE with my $spin blog post content.

 

I have been able to "randomly" and < 40% somehow get text from uBot into the text area box by changing the attribute of this :

 

<textarea id="form-body" name="form-body" cols="42" rows="20" style="width:100%;height:480px;"></textarea>

 

http://content.screencast.com/users/sputnikkk13/folders/Jing/media/75be9d7a-7566-4425-a97c-ce3bb7b7a7a6/2010-04-13_0100.png

 

Here's another screen grab of stuff as well ... I think this is what I need to be manipulating to get my content into this blog reliably. I dont see any toggle on/off of the editor in the mass that is this table/form.

 

<TD class="mceIframeContainer mceFirst mceLast" class="mceIframeContainer">
<IFRAME style="WIDTH: 100%; HEIGHT: 434px" id=form-body_ifr src='javascript:""' frameBorder=0></IFRAME></TD>

 

http://content.screencast.com/users/sputnikkk13/folders/Jing/media/27c8892f-7f1b-4a9d-8a59-4a50c6b03e26/2010-04-13_0100.png

 

How can I get the job done with uBot?

  • Like 1
Link to post
Share on other sites

How I Kicked tinyMCE's ASS today!!! and you can too ...

 

1. tinymce uses javascript as the web page loads to takeover a standard textarea tagset to add its wysiwyg editor tools.

 

2. Its a javascript code - so we need to use javascript to disable the editor - which removes the IFRAME and pop-up tinyMCE uses to make our lives miserable.

 

3. I have no idea if this will work at every site, and I have a feeling certain sites will lose the ability to put html code in the text area boxes if tinyMCE is removed - just a hunch - my site doesnt - so Im cool with this solution. If you use this, and you can no longer at rich text or html to the textarea, and you need to - like for backlinks - you'll need to find another workaround.

 

4. Here's the JavaScript code I found on the tinyMCE developers forum and API documentations, wiki-examples. Where mydiv is the ID of the tinyMCE host html tags. These will be either DIV or TEXTAREA tagset as I understand it.

 

tinyMCE.execCommand('mceRemoveControl',false,'mydiv');

 

So I went and read how this POS editor worked cuz it was making me bonkers! Found out there was code to turn it off. Only issue with that is - you need to have the DIV or other html tag that tinyMCE is parasiting into / in / on whatever in order to use the code. So I used the nifty little uBot "Choose By Attribute" to see the details of the [textarea ] [/textarea] tags to see what the ID=??? or name was ... See images

 

 

http://content.screencast.com/users/sputnikkk13/folders/Jing/media/cf963450-6265-4331-8055-51849cff4366/2010-04-13_2343.png

 

Once the tinyMCE editor was disabled and out of the way - I just shoce the textarea attributes like any other element, and then set uBot to change it like a form field.

 

Voila! tinyMCE's ASS ... officially kicked [ for the time being ]

 

Hope this helps ya'll

 

Bot On with Yo Bad Selves,

 

Sputnik

  • Like 8
Link to post
Share on other sites
  • 1 month later...

Gracias for the rep webauto - just noticed ...

 

Any idea how to get passed the blogspot.com comment text areas such as this one

 

http://technicalinfodotnet.blogspot.com/2010/03/sophos-stop-spamming-me-and-end-your.html

 

they are using iframes but just cant figure out what javascript coding i will need

 

thanks

Link to post
Share on other sites

Try using firefox and look in the code for the ID, and then use that ID in UBot.

 

Hi ive tried doing that but no joy - I also tried to paste some java script but not sure if im doing it right - heres what i tried with the java

 

document.body.removeChild(document.getElementById("commentBodyField"));

 

but still no luck - so i checked it with another id called comment-editor but still no luck

 

not really sure how i can get this done - Im having similar issues on the article base site

Link to post
Share on other sites

Thank Youuuuuuuuuuuuuuuuuuuuu!!!!!!!!!!!!!!!!!!!!!

 

 

 

 

How I Kicked tinyMCE's ASS today!!! and you can too ...

 

1. tinymce uses javascript as the web page loads to takeover a standard textarea tagset to add its wysiwyg editor tools.

 

2. Its a javascript code - so we need to use javascript to disable the editor - which removes the IFRAME and pop-up tinyMCE uses to make our lives miserable.

 

3. I have no idea if this will work at every site, and I have a feeling certain sites will lose the ability to put html code in the text area boxes if tinyMCE is removed - just a hunch - my site doesnt - so Im cool with this solution. If you use this, and you can no longer at rich text or html to the textarea, and you need to - like for backlinks - you'll need to find another workaround.

 

4. Here's the JavaScript code I found on the tinyMCE developers forum and API documentations, wiki-examples. Where mydiv is the ID of the tinyMCE host html tags. These will be either DIV or TEXTAREA tagset as I understand it.

 

tinyMCE.execCommand('mceRemoveControl',false,'mydiv');

 

So I went and read how this POS editor worked cuz it was making me bonkers! Found out there was code to turn it off. Only issue with that is - you need to have the DIV or other html tag that tinyMCE is parasiting into / in / on whatever in order to use the code. So I used the nifty little uBot "Choose By Attribute" to see the details of the [textarea ] [/textarea] tags to see what the ID=??? or name was ... See images

 

 

http://content.screencast.com/users/sputnikkk13/folders/Jing/media/cf963450-6265-4331-8055-51849cff4366/2010-04-13_2343.png

 

Once the tinyMCE editor was disabled and out of the way - I just shoce the textarea attributes like any other element, and then set uBot to change it like a form field.

 

Voila! tinyMCE's ASS ... officially kicked [ for the time being ]

 

Hope this helps ya'll

 

Bot On with Yo Bad Selves,

 

Sputnik

Link to post
Share on other sites
  • 4 weeks later...

Thank you for the original post. Others may have also found it but you can "toggle" the editor on and off in a similar way using the following javascript:

 

tinyMCE.execCommand('mceToggleEditor',false,'mceContentBody');

 

Why do this? Because I found some websites that behave badly if you use the removecontrol. So I just toggle the editor off, paste what I need, toggle the editor back on using the same command and then all is good.

Link to post
Share on other sites
  • 1 month later...

How I Kicked tinyMCE's ASS today!!! and you can too ...

 

1. tinymce uses javascript as the web page loads to takeover a standard textarea tagset to add its wysiwyg editor tools.

 

2. Its a javascript code - so we need to use javascript to disable the editor - which removes the IFRAME and pop-up tinyMCE uses to make our lives miserable.

 

3. I have no idea if this will work at every site, and I have a feeling certain sites will lose the ability to put html code in the text area boxes if tinyMCE is removed - just a hunch - my site doesnt - so Im cool with this solution. If you use this, and you can no longer at rich text or html to the textarea, and you need to - like for backlinks - you'll need to find another workaround.

 

4. Here's the JavaScript code I found on the tinyMCE developers forum and API documentations, wiki-examples. Where mydiv is the ID of the tinyMCE host html tags. These will be either DIV or TEXTAREA tagset as I understand it.

 

tinyMCE.execCommand('mceRemoveControl',false,'mydiv');

 

So I went and read how this POS editor worked cuz it was making me bonkers! Found out there was code to turn it off. Only issue with that is - you need to have the DIV or other html tag that tinyMCE is parasiting into / in / on whatever in order to use the code. So I used the nifty little uBot "Choose By Attribute" to see the details of the [textarea ] [/textarea] tags to see what the ID=??? or name was ... See images

 

 

http://content.screencast.com/users/sputnikkk13/folders/Jing/media/cf963450-6265-4331-8055-51849cff4366/2010-04-13_2343.png

 

Once the tinyMCE editor was disabled and out of the way - I just shoce the textarea attributes like any other element, and then set uBot to change it like a form field.

 

Voila! tinyMCE's ASS ... officially kicked [ for the time being ]

 

Hope this helps ya'll

 

Bot On with Yo Bad Selves,

 

Sputnik

You sir, Are a scholar and a Gentleman!

Repped!

 

I had read the part about disabling through javascript, but I thought, Javascript wont be able to access form elements...am an ultra noob who is curious.

Thanks again!

Link to post
Share on other sites
  • 2 months later...

There is also another way. This method worked for me on one platform but didn't on another one.

 

But I found another way around. The other platform had this:

 

href="javascript:Drupal.ckeditorToggle('edit-field-about-me-0-value','Switch to plain text editor','Switch to rich text editor',1);"

 

Just choose this attribute and click chosen. This clicks that source button for you and you will be able to use the plain editor.

 

This only works if such a tag is available.

Link to post
Share on other sites
  • 8 months later...

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...