Unable to embed iframe in Joomla - iframe

I'm trying to embed Google form in Joomla page. For some reason, it's stripping tag, as soon as I save the page.
Tried with below,
With JCEditor - Enabled iframe in media content
With TinyMCE - Removed iframe from restricted content
Enabled "No Filtering" for Super User in Joomla Global Configuration
Still, no luck.
Joomla version - 3.6.2
Any help here would be appreciate

Rather than embedding the form in an article directly you can use a module called a "Wrapper" and then associate that wrapper module with the Article / Menu item you are trying to display it with.
To create a module go to (Extensions > Modules) in Joomla Admin then do "New" to have the module placed around the article choose the appropriate "position" then make sure to set the "Menu Assignment" to "Only on the pages selected"
If you need it in the middle of an article you can learn more about how to do that here - How do you put a module inside an article?...
https://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F

Try setting editor to: "NONE"
Use Chrome when performing the save, I have seen this to be a browser issue.

Related

How to integrate TinyMCE with WPForms

I am trying to integrate TinyMCE with WPForms inside the WPForms Blog Post Submission plugin.
I inserted an HTML field with the code
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
<script>
tinymce.init({
selector: '#wpforms-421-field_7'
});
This kind of works as TinyMCE is integrated but in a horrible layout. Also the Images that are uploaded using this are not actually reflected in the actual page.
How do I integrate TinyMCE with WPForms correctly so that Images can be inserted in the text area and saved in the submitted posts?
You are asking a couple of different questions wrapped up in your request ... let me try to address each one:
1 - TinyMCE looks odd in the rendered page
The menus, toolbars, and statusbar of TinyMCE are part of the main web page that loads TinyMCE. As such if you are loading CSS onto the page that impacts these elements you can get to odd visual results like this.
I would use your browser's dev tools to sleuth out what CSS is impacting things.
2 - How do I upload images using TinyMCE?
You have not given us any details at all as to how you have tried to allow users to upload images via TinyMCE. There is an insert image option that you can expose via the image plugin but it requires some back end coding to receive the image and process it.
https://www.tiny.cloud/docs/plugins/image/#image_uploadtab
https://www.tiny.cloud/docs/plugins/image/#file_picker_callback
One additional question on this - Wordpress already has a media library and a UI to interact with that while using TinyMCE to create content - why are you trying to do something outside of WP's own media library?
It seems the author want TinyMCE in place of the textarea when creating Form for submission of Blog Post using WPForm.
Image: Source: https://wpforms.com/how-to-allow-users-to-submit-blog-posts-on-your-wordpress-site/
The problem is WPForm does not come along with the TinyMCE especially for the post content. You will probably get SCRIPT error or UI problem. You can use different plugins other than WPForm. Else write some custom code particularly for the Post Submission Addon found with WPForm.
You must to set Wpforms as "No styling" and check "Load Assets Globally"

Wordpress TinyMCE not converting simple 'www.sitename.com' to hyperlink, as in demos

Despite the behavior of examples shown on TinyMCE's demo pages (http://www.tinymce.com/tryit/classic.php), I am unable to get TinyMCE on my Wordpress 4.0 site to act in such a way that if you simply type "www.sitename.com" into the editor and press space, it's automatically converted into a hyperlink for http://www.sitename.com/.
To be clear, it doesn't convert into any link at all...This isn't a case of absolute vs. relative links. That's what most of the talk seems to be about when it comes to TinyMCE and link creation. ...Would that I could get to that stage!
I can find no toggle or option or plugin name to enable automatic link creation, and yet it's there in their demos on the TinyMCE's site.
Can anyone tell me how I might get this feature up and running, ideally by not adding another Wordpress plugin?
Err...That being said, I'm open to a suggestion if you have a really good one! :)
Cheers!
Even though you found a plugin, some background might help because I personally think this is a good question:
Wordpress uses TinyMCE, however the Wordpress WYSIWYG Editor is actually heavily extended and no longer fully resembles the original TinyMCE editor you see on the TinyMCE website.
In order for links to automatically render in TinyMCE, the 'autolink' plugin needs to be enabled. The following native TinyMCE plugins are used by Wordpress:
charmap
colorpicker
hr
lists
media
paste
tabfocus
textcolor
fullscreen
image
In addition to these, Wordpress also employs the following custom plugins to fill out the remainder of the functionality you normally see:
wordpress
wpautoresize
wpeditimage
wpgallery
wplink
wpdialogs
wpview
It is my belief that Wordpress left out this behavior by design. As you know, the Autolink plugin specifically converts all valid URLs to comparable anchor tags once the space or return keys are pressed. However, Wordpress does allow you to explicitly convert URLs or words to anchor tags using its own plugin 'wplink'.
It should be noted that the wplink plugin closely resembles the native anchor plugin, but is NOT the same.
With the ability to both explicitly define your links in both the visual editor (via the wplink plugin) and the Text (aka: HTML) editor, I believe the development team decided to forgo on automatically linking content in favor of allowing authors to explicitly provide links where needed.
With all of that said:
Wordpress does provide a convenient way of adding new TinyMCE plugins via its 'mce_external_plugins' filter. If you would like to add the autolink functionality without the use of an external plugin, you may download the latest TinyMCE package, upload the autolink plugin (tinymce/js/tinymce/plugins/autolink) to your theme folder, and then add the following to your theme's functions.php:
add_filter('mce_external_plugins', 'mm_add_tinymce_plugins');
function mm_add_tinymce_plugins($plugins){
$plugins['autolink'] = get_stylesheet_directory_uri().'/path/to/tinymce/plugins/autolink/plugin.js';
return $plugins;
}

ckeditor doesn´t read media embed code

I use the media embed plugin for ckeditor. It works fine, the code is correctly saved in the database and youtube, soundcloud etd. players display ok on the page. But when the user goes to his administration, where he can edit the info, the text inside and with the tags is not showing, so when the user clicks on the save button, all previously saved iframes will be "erased" and only the rest of the formatted text will be saved. Is there any way to display the iframe code in the ckeditor?
I assume that you use CKEditor 4.1.x which comes with Advanced Content Filter (ACF). Most likely, the point is that you use different editors for frontend/backend editing.
Each plugin extends allowedContent property with own rules for tags, attributes and classes. Using those rules, editor automatically strips out undesired contents, so for example, if your fronted editor allows <iframe> because it has mediaembed plugin loaded, then your backend editor without this plugin will remove your <iframe> from the content.
Furthermore, ACF also observes your toolbar configuration so even if you include the plugin but you don't want the button in the toolbar, any content the button provides (i.e. <iframe>) will also be disallowed in editor's output.
You can easily check whether your editor accept <iframes>. Basically call the following and see the output:
CKEDITOR.instances.yourInstance.filter.check( 'iframe' );
>>> true // it's allowed
If it's false, then there are several solutions for your problem:
Enable mediaembed plugin in your backend editor (with button in the toolbar).
Extend config.extraAllowedContent to have it back again.
While the first solution is straightforward, the second one might be tricky for you. allowedContent rule for mediaembed plugin is as follows (see plugin's code):
allowedContent: 'iframe[*]' // stands for: iframe element with any attribute
If you add the following to your backend editor's config, you will have iframes back in your content without loading mediaembed plugin:
config.extraAllowedContent = 'iframe[*]'
If this solution doesn't work for you, please provide editor configs and CKEditor version so that people could help you.
CKEDITOR.config.allowedContent = true;
work for me.
To allow CKEditor to store custom HTML without it disappearing, you need to set the allowed content flag to true.
var allowedContent = true; // to allow custom html like iframe or div's
CKEDITOR.replace('yourEditorWindowsId', {
allowedContent
},

Drupal 7 Views - Node Content Not Appearing

I have an issue in Drupal with getting node content to display itself. I suspect it could have to with the CSS styling, although I'm not 100% sure what's causing the issue.
Background:
So basically I'm trying to setup a blog but I'm running into serious issues trying to simply get the blog posts to display themselves.
I created a custom Drupal 7 theme using the export function of Artisteer (http://www.artisteer.com/?p=overview). A stylesheet called style.css was generated. I put some of my own CSS into this stylesheet along with the parts that were auto-generated. I should mention I did some amount of custom CSS to force the homepage to look the way I wanted.
I followed the instructions from the PDF at (http://learnbythedrop.com/buildingyourblog) to create a blog (great easy-to-follow guide). The most relevant pages for Views are pages 34 - 36, where he takes you through how to create a "Blog Post" view, in order to display your blog content correctly. However, when I got to the point where he created sample blog content and it displayed it's title and main content, this simply didn't work for me. See this link for example (Sample content that I created for testing purposes):
(http://www.productworld.com/blog-posts/2012/06/08/hello)
I can see a list of titles for sample content that I created (under the Recent Posts block), but I can't view any content from the individual blog posts themselves. The page is just blank.
Also, I can't see a list of the titles and teaser links - it should show up under (http://www.productworld.com/blog-posts) but that URL gives me a "page not found" error. This was something that worked in a previous iteration but now does not work.
Here are 2 screenshots of my View settings, in case it's relevant:
http://i.imgur.com/uadew.png
http://i.imgur.com/9yOUk.png
Questions:
What is the likely cause of the blog content not displaying? (If I do a preview of the blog post within the Views section I can see the blog content just fine, it just won't display on the actual page.) Is it styling? Some setting in Views? Some Block setting? I've searched my style.css file and tried commenting out everything to do with "content:hidden" and "display:none" to no avail. I've tried every combination of settings in the blog posts View to no avail. I've tried placing "Main Page Content" and "View: Blog Posts" blocks in various regions, and changing around the settings that restrict where the block can be displayed. The blog post title/body content doesn't show up in the page source at all, which could be a clue. How would I go about debugging such a problem?
Why is www.productworld.com/blog-posts saying "page not found", even though I've specifically set up a view to create a page at this URL? And why does www.productworld.com/blog-posts/2012/06/14/hello-world-3 show up as a valid page, when it contains "blog-posts" in it's URL?
Any help would be greatly appreciated. If I should display stuff to do with my stylesheet please let me know.
To me it looks as if you have panels overriding the Node template. Which is why your node is not being displayed properly.
Go to Structure > Panels and see if the Node Template option under Manage pages is enabled. If it is, that's probably your issue. You can tell if it's enabled by looking to the right of the text to see whether it says enable or edit.
You can then edit that setting and then edit the content and choose Node > Body to get the body of the blog post to show correctly.
Take a look at this intro video to panels if you aren't familiar with it. http://yadadrop.com/drupal-video/panels-3-overview
Take the leading '/' character out of your page path for the view - internal Drupal paths should generally never have that, but the system will prepend the configured base path to paths on your behalf (and it is probably already a '/').

Exposed views filter block refuses to show up on a page

I'm trying to make a facebook app version of an existing page and am having a major issue: my exposed filter block isn't showing up.
I'm using themekey to switch to a facebook version of my theme for the url the facebook version of the page is on. When my page is displayed in my normal theme it works fine, the filter is there, all is good. In my special theme there is nothing. Thing is...the special theme is a straight copy of the normal theme (with the .info modified and all the template functions removed). The block is in the preface middle region, and
<?php
print $preface_middle;
?>
is still in the page template for that page.
On my dev site I tried to simplify matters by making the facebook theme the site wide theme (thinking that themekey was throwing things off somehow) and I had the same issue. Eventually I fixed it (somehow) on my dev site, but when I tried to use those same fixes on the live site they didn't work.
What can prevent a block with exposed filters from displaying when it should be? Like I said, when I turn off themekey the filters are there, Drupal clearly knows that the filters should be displayed at that url. I'm going nuts...what can I do?
When you go to blocks section of your site: you need to add the block to the preface_middle section in the theme you want.
so:
Make sure the "facebook" theme is active
Go to blocks section and click on the "fascebook theme"
Move the block to the section you want for this theme.

Resources