Availability: >= 3.0
Type: Object Property
Description: Sets the charset of the HTML being edited.
$editor->htmlCharset = string $charset
If you are editing a complete HTML document that specifies it's charset using a meta tag then you do not need to set this property. This property is intended for when editing a snippet of HTML code where the charset is unknown. Setting the charset is useful if the characters in your document require a specific charset in order to display correctly.
$editor->htmlCharset = 'UTF-8';
Note: Since the HTML code generated by the editor is submitted through a form on the page the editor is displayed on, and stored in textarea on that page, the encoding of the page the editor is displayed on can affect the encoding of HTML content generated by the editor. It is recommended that you always display the editor on a page that supports all the characters you are likley to use, or has the same charset as the content you are editing in the editor. We recommend UTF-8.