Entering raw HTML in editors: Difference between revisions

From Joomla! Documentation

Added steps for default WYSIWYG editor TinyMCE
Cmb (talk | contribs)
Some corrections to bring the text up to date.
Line 1: Line 1:
<noinclude>{{page|needs updating|'Needs an update using version 3.x'}}</noinclude>
If you want to enter raw [[wikipedia:HTML|HTML]] in a Joomla! editor field, you may encounter problems such as tags and attributes disappearing after you save the item you are editing. This is usually caused by a filtering mechanism; either your editor's or Joomla!'s.
If you want to enter raw [[wikipedia:HTML|HTML]] in a Joomla! editor field, you may encounter problems such as tags and attributes disappearing after you save the item you are editing. This is usually caused by a filtering mechanism; either your editor's or Joomla!'s.


== Global Text Editor Coniguration ==
On the [[Administrator (Application)|Administrator panel]], take the following steps to disable filtering:
On the [[Administrator (Application)|Administrator panel]], take the following steps to disable filtering:


* '''Disable your editor'''. Since each editor has its own filtering mechanism and it is not always possible to turn it off, disabling your editor is the easiest way of eliminating it as a possible source of the problem. Open ''My Profile'' from the ''Site'' menu, set ''Editor'' under ''Basic Settings'' to ''Editor - None'' and click ''Save & Close''.
=== Disable Your Editor ===
* '''Disable Joomla's filtering'''. Open the ''Global Configuration'' from the ''Site'' menu and go to the ''Text Filters'' tab. Set the ''Filter Type'' to ''No Filtering'' for the user group that you are in - ''Administrator'', ''Super Users'', or both (this is site-dependent). '''Caution''': Do not use the ''No Filtering'' setting for user groups that are not fully trusted &ndash; that would introduce a sizeable security risk.'''
Since each editor has its own filtering mechanism and it is not always possible to turn it off, disabling your editor is the easiest way of eliminating it as a possible source of the problem. Open your user configuration from the ''Administrator'' ''Users'' menu. Select the ''Basic Settings'' tab. Change the ''Editor'' to ''Editor - None''. Select ''Save & Close''.
 
=== Disable Joomla's Filtering ===
Open the ''Global Configuration'' from the ''Site'' menu and go to the ''Text Filters'' tab. Set the ''Filter Type'' to ''No Filtering'' for the user group that you are in - ''Administrator'', ''Super Users'', or both (this is site-dependent). '''Caution''': Do not use the ''No Filtering'' setting for user groups that are not fully trusted &ndash; that would introduce a sizeable security risk.'''


You should be able to enter raw HTML in any editor field now. You may try to re-enable your editor to see whether it influences the process. If the editor does mangle the HTML you are trying to enter, consult its documentation to see if there is a way to disable its filtering.
You should be able to enter raw HTML in any editor field now. You may try to re-enable your editor to see whether it influences the process. If the editor does mangle the HTML you are trying to enter, consult its documentation to see if there is a way to disable its filtering.


'''In Joomla where the default text editor is TinyMCE:''' If that's what you're using, you may be able to make some adjustments to it AND keep your WYSIWYG editor.
== When the Text Editor in Use is TinyMCE ==
You may be able to make some adjustments to it '''and''' keep your WYSIWYG editor.


'''Go to Extensions<br />'''
* Go to Administrator → Extensions Plugins.
> Plugins<br />
* Search for TinyMCE and open it for editing.
> Search TinyMCE & click it<br />
* Choose the Set 0 tab or whichever set has ''Super-Users'' or your desired user group.
> Choose set 3 (or whichever set has "Super-Users" or your desired user group.<br />
* Scroll down to Prohibited Elements.
> Scroll down to Prohibited Elements<br />
* Remove '',iframe'' or whatever text you need to stop being prohibited.
* Remove ",iframe" or whatever text you need to stop being prohibited.<br />
* Select Save & Close.
* Save *<br />


Always be wary of doing this. Users may intentionally or unintentionally (hacked accounts) post something malicious which could affect your guests.
Always be wary of doing this. Users may intentionally or unintentionally (hacked accounts) post something malicious which could affect your guests.

Revision as of 22:20, 20 July 2020

If you want to enter raw HTML in a Joomla! editor field, you may encounter problems such as tags and attributes disappearing after you save the item you are editing. This is usually caused by a filtering mechanism; either your editor's or Joomla!'s.

Global Text Editor Coniguration

On the Administrator panel, take the following steps to disable filtering:

Disable Your Editor

Since each editor has its own filtering mechanism and it is not always possible to turn it off, disabling your editor is the easiest way of eliminating it as a possible source of the problem. Open your user configuration from the AdministratorUsers menu. Select the Basic Settings tab. Change the Editor to Editor - None. Select Save & Close.

Disable Joomla's Filtering

Open the Global Configuration from the Site menu and go to the Text Filters tab. Set the Filter Type to No Filtering for the user group that you are in - Administrator, Super Users, or both (this is site-dependent). Caution: Do not use the No Filtering setting for user groups that are not fully trusted – that would introduce a sizeable security risk.

You should be able to enter raw HTML in any editor field now. You may try to re-enable your editor to see whether it influences the process. If the editor does mangle the HTML you are trying to enter, consult its documentation to see if there is a way to disable its filtering.

When the Text Editor in Use is TinyMCE

You may be able to make some adjustments to it and keep your WYSIWYG editor.

  • Go to Administrator → Extensions → Plugins.
  • Search for TinyMCE and open it for editing.
  • Choose the Set 0 tab or whichever set has Super-Users or your desired user group.
  • Scroll down to Prohibited Elements.
  • Remove ,iframe or whatever text you need to stop being prohibited.
  • Select Save & Close.

Always be wary of doing this. Users may intentionally or unintentionally (hacked accounts) post something malicious which could affect your guests.