Some HTML tags (e.g. IFRAME) and Javascript in Joo

2019-08-17 13:45发布

问题:

When using a WYSIWYG editor in Joomla 1.5 to create website content I am not able to freely insert HTML tags, such as IFRAME as the HTML tags will be automatically removed on saving the article. I can either configure Joomla not to use a WYSIWYG editor which makes editing articles a bit of a pain, or I can force the HTML code into the article using MySQL Query Browser and altering the article content directly in the site's database. Doing this is not only cumbersome but also ineffective, because every time someone edits the article from the Joomla back end WYSIWYG editor, the inserted tags will be removed by the editor again.

Is there a way of inserting an IFRAME (or perhaps JavaScript) into a Joomla 1.5 article, without turning off the WYSIWYG editor or hacking away at the database?

回答1:

Short answer: no. Joomla knows best :P

But seriously, you can turn off the WYSIWYG for just your user. Go to the 'User Manager', select your account, and set the 'User Editor' preference to be 'Editor - No Editor'. That way you can type in whatever tags and code you want, without WYSIWYG borkage. But every other account on the site will still have access to their WYSIWYG's.

Doesn't take too long to toggle the WYWIWYG that way when you need to do a bit of precise HTML/Javascript/etc coding.



回答2:

I had the same problem that you are facing. I used Jumi to solve that. It works very well.



回答3:

Actually, it depends on what you want to put in your IFRAME. If it is a URL, then you can create a "Wrapper" module containing the URL you want. Type a unique name into the "Position" field in the module. Then, you can display the results in an article by inserting the following where you want the results to appear {loadposition XXXX} where XXXX is the unique name you typed into the module's position field.



回答4:

I think by using JCE Editor in joomla you are able to fix all these problem.



回答5:

If you use the JCE Editor for joomla It will allow you to customize what tags are allowed. THe default Joomla editor will strip the tags out. I have also ran into issues if you toggle the editor at all it will remove them on submit. I have found the only way to do this is either with a wrapper, or a custom code module.