WP Edit Pro Configuration
The WP Edit Pro Configuration screen is basically a liaison. Think of it as your middle-man between the TinyMCE Editor and WordPress.
The Configuration screen will allow various adjustments of all the processes used in the editor. There are way too many to go into detail here; so we strongly encourage you to visit the following resources to learn more:
- TinyMCE Configuration – Lists all the various options which can be configured.
- Extended Valid Elements – Used to prevent WordPress from stripping certain tags from the editor.
- Valid Elements – Used to limit the tags allowed in the editor.
Show Default TinyMCE Settings
Clicking the button to show default TinyMCE settings will expand a section showing each of the default configuration names and values.
Each setting also has a button to the far right named “Change”. Clicking this button will load that particular setting into the editable area; where it can be modified.
The setting can be adjusted, and saved as a modified setting.
Extended Valid Elements Example
Let’s assume we want to prevent the onclick attribute of the a tag from being removed. Our option name would be extended_valid_elements and our option value would be a[onclick].
Alternatively, we could simply allow ALL of the attributes available in the a tag. To do this, the option name would still be extended_valid_elements, and the option value would be a[*]. The asterisk symbolizes “all”.
Additionally, multiple tags and attributes can be allowed simultaneously. To do so, simply separate each tag with a comma. Let’s enable all attributes for a tags and img tags. The option name remains extended_valid_elements, and the option value will be a[*],img[*].
All types of custom combinations can be allowed for element tags and attributes. Use this TinyMCE page as reference.
Valid Elements Example
For those who prefer the other side of the fence, the valid_elements option can be used to only allow certain tags and attributes in the editor area. The valid_elements option defines which elements will remain in the edited text when the editor saves.
For example, to remove all elements that are not an a, img, or strong; the option name becomes valid_elements, and the option value is a,img,div.
Taking things one step further, each element can specify the allowed attributes. Using the example above; let’s also allow the href and title attributes in the a and img elements. In this case, the option name remains valid_elements, and the option value becomes a[href,title],img[href,title],div.
Remember to use this TinyMCE page as reference.
Each time a new setting is created or modified, it will be saved. The settings which have been modified are highlighted.
To remove a setting, click the “Remove” button located to the right of each created/modified setting.