My codes keep disappearing
-
I am in the process of creating a new post and I am embedding videos and other links into the post. For some reason, all of a sudden, every time I add the codes they disappear right after I add them. If I add them and then save the post, the codes are gone. Can someone please help me. I am trying to get my post out soon.
-
Alexis403 – As long as you have validation errors like this, https://validator.w3.org/check?verbose=1&uri=http%3a%2f%2fwww.findinghopewithin.com%2f your site will never function perfectly with all browsers.
coachdebra – You might want to validate your site also. I did not have a url to do so.
I have no idea what that means – or how it pertains to this issue. This is not a browser issue at all. It’s a glitch within wordpress itself.
My url is https://artists-edge.com
It’s a glitch within wordpress itself.
It’s not a glitch. It is an intentional configuration decision regarding TinyMCE. WordPress configures TinyMCE (i.e. the Visual Editor) to strip IFRAME tags.
coachdebra – you are quite correct. I can’t tell you why I posted that late last night – things look different in the morning!
You know of course that TinyMCE, which is causing the html/visual editor problem does not come from WP. Here is their site, https://tinymce.moxiecode.com/index.php
They might discuss this on their forum. Did you try the solution from Chip Bennett? The problem is, if the editor accepts all html code there is no way to validate it (or execute all code) so it may or may not display correctly in the visual editor (which is not truly a wysiwyg editor).
Did the plugin work for you? If so, perhaps this should be marked resolved. BTW, on a rainy Sunday afternoon, if you have nothing to do, there are a few validation errors on your site you might want to fix.:^)
Right – TinyMCE – they mentioned that at the WP Genius bar.
I’ve fixed the issue for myself – see my post above with my solution – and thanks again to the SXSW WordPress Genius bar! They rocked this non-techie’s world!
Debra
coachdebra – you are quite correct. I can’t tell you why I posted that late last night – things look different in the morning!
LOL – they say that sleep deprivation is as bad as being drunk….
No worries ??
Hi Coach Debra, is there a way that I can talk to you off of the forums? I just installed the “Easy iFrame Loader”, but I’m not sure what to do with the rest of the information you gave. I’m not too familiar with codes either. Where exactly was I supposed to put the codes in the directions you gave? Do they go in each post or page? Or is there some specific place they are supposed to go? I looked in the settings of the Easy iframe Loader and didn’t see any place for codes. And you are saying that the extra code instructions you gave are needed for the plugin to work correctly so that my site doesn’t delete iframe codes? Is that correct? Could you direct me please? Thanks.
You’re always welcome to contact me via my website https://artists-edge.com
The codes I’m talking about are in your posts/pages. Just as a way to make the iframe code work with the plugin, but replacing html with css (I think – but I’m not a coder)
When you paste in an iframe code it starts with <iframe…. And ends with ></iframe>
As I stated above:
I was advised to replace 2 pieces of their code as follows:
1) at the beginning of the string:
<iframe
Is replaced with
[iframe_loader2) At the end of the string:
></iframe>
is replaced with
]Thanks so much! I did it, and it worked! This is the solution I’ve been looking for. Again, thanks so much!
Hi there,
I’ve also had this problem, and have followed your instructions and its working, however it seems to throw out the text wrapping. Does anyone see how that could be the case? The first example below works and makes the text wrap around the amazon link….the second one has the changes to accommodate the easy iframe loader and the text won’t wrap, it starts again at the bottom of the amazon link.
<iframe src=”https://rcm.amazon.com/e/cm?t=gregirfigfat-20&o=1&p=8&l=as1&asins=0873223934&ref=tf_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr” style=”width:120px;height:240px;” scrolling=”no” marginwidth=”0″ marginheight=”0″ frameborder=”0″ align=”left”></iframe>[iframe_loader src=”https://rcm.amazon.com/e/cm?t=gregirfigfat-20&o=1&p=8&l=as1&asins=0873223934&ref=tf_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr” style=”width:120px;height:240px;” scrolling=”no” marginwidth=”0″ marginheight=”0″ frameborder=”0″ align=”left”]
Thanks
MelDid you download and activate the plugin first? Beyond that, ya got me..
TinyMCE (at least the newest version) has a setting not to strip iFrame tags in its settings configuration page. Seems to work fine.
But for non TinyMCE users, I want to try Chip Bennet’s code for the default WP editor. Anyone know what WP calls its own editor? So I can replace “tinymce” with that name in Chip’s code?function mytheme_WP default editor??????_config( $init ) { // Add IFRAME to list of valid HTML elements (so they don't get stripped) // IFRAME $valid_iframe = 'iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]'; // Add to extended_valid_elements if it alreay exists if ( isset( $init['extended_valid_elements'] ) ) { $init['extended_valid_elements'] .= ',' . $valid_iframe; } else { $init['extended_valid_elements'] = $valid_iframe; } // Pass $init back to WordPress return $init; } add_filter('WP default editor?_before_init', 'mytheme_tinymce_config');
Thanks, Kevin
Does WordPress have hooks for any editors other than TinyMCE? I’m not aware of any.
It must have a “hook”. Their is a default editor, somewhere ??
It must have a “hook”. Their is a default editor, somewhere ??
If you’re referring only to the default editor, then I don’t really understand your question.
The default editor is TinyMCE. The config hook for TinyMCE is, as noted in my earlier comment,
tiny_mce_before_init
.This seems to work for the WP default editor (without having TinyMCE installed & active). Code inserted into the theme’s functions.php file.
function fb_change_mce_options($initArray) { // Comma separated string od extendes tags // Command separated string of extended elements $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'; if ( isset( $initArray['extended_valid_elements'] ) ) { $initArray['extended_valid_elements'] .= ',' . $ext; } else { $initArray['extended_valid_elements'] = $ext; } // maybe; set tiny paramter verify_html //$initArray['verify_html'] = false; return $initArray; } add_filter('tiny_mce_before_init', 'fb_change_mce_options');
- The topic ‘My codes keep disappearing’ is closed to new replies.