-
Notifications
You must be signed in to change notification settings - Fork 9
HTML5 Rich Text
Percussion has a "do no harm" approach to HTML5 tag support in the Rich Text Editor. What this means is that in the rich text editor, the user can switch to source view in order to add HTML5 tags and attributes. Upon switching back to WYSIWYG mode, these attributes will be retained, though there is no way to edit them through the WYSIWYG view. Unfortunately, there are select tags and attributes that are problematic in the current release and will be addressed in a future release of CM1.
Any time you are using an attribute on a tag, you must give that attribute a value or else the editor will strip out the attributes. For example, if the following tag were entered into the source view, this would be retained when switching to WYSIWYG mode.
However, for any attribute where a value is not entered, it will strip those attributes out. For example:
would be converted to
This is true for any HTML5 tag.
-
New allowed attributes for and elements:
- download
- hreflang
- media
- ping
- rel
- type
-
element allows the following attributes:
- autocomplete
- autofocus
- dirname
- height
- form
- formaction
- formenctype
- formmethod
- formnovalidate
- formtarget
- inputmode
- list
- max
- min
- multiple
- pattern
- placeholder
- required
Note, the "required" attribute must have a value. - step
- width
- <textarea> element allows the following attributes: - autofocus - dirname - form - inputmode - maxlength - placeholder - required\ Note, the "required" attribute must have a value. - wrap
-
element allows the following attributes:
- form
-
element allows the following attributes:
- form
- element allows the following attributes: - name - form
- element allows the following attributes: - novalidate
-
element allows the following attributes:
- autofocus
- form
- formaction
- formenctype
- formmethod
- formnovalidate
- formtarget
-
allows the following new attributes:
- autofocus
- form
- required
Note: the "required" attribute must have a value.
-
- element allows the following attributes:
- reversed
-
element allows the following attributes:
- crossorigin
- srcset
The following HTML 5 tags are not supported
-
tags are stripped from the source -
<script>\
User can enter <script> tag into Rich Text Editor. However, the system will add additional \
around the content of the <script>. For example, enter:
<script>
document.write("Hello World!")
</script>
After saved above, switch to source mode, it becomes:
<div class="rxbodyfield"> <script>// <![CDATA[ /*<![CDATA[*/ // <![CDATA[ /*<![CDATA[*/ // <![CDATA[ document.write("Hello World!") // /**/ // /**/ // ]]> </script> </div>
The following "global attributes" will not be supported
- aria-*
- data-*
- "disabled" attribute for tag\ tag is supported, except the "disabled" attribute will be stripped out when switch between WYSIWYG and source mode