FortAwesome / wordpress-fontawesome

Font Awesome Official WordPress Plugin
Other
57 stars 19 forks source link

Feature Request: WYSIWYG preview in TinyMCE visual pane #124

Open mlwilkerson opened 3 years ago

mlwilkerson commented 3 years ago

Cases to consider:

  1. when there is an [icon] shortcode
  2. when there is an <i> tag
  3. when the CSS defines pseudo-elements

The TinyMCE visual pane is rendered within its own <iframe>, which does not include Font Awesome.

To make this feature work would require:

  1. installing the currently configured Font Awesome that's active in the outer DOM into that TinyMCE visual preview <iframe>
  2. converting any [icon] shortcodes into the corresponding <i> tags (just for preview, not in the stored post content)

CAVEAT on pseudo-elements: pseudo-elements support is disabled by default for SVG/JS. That would need be additionally enabled within the Tiny MCE <iframe> when it's enabled in the outer DOM.

mlwilkerson commented 3 years ago

This would also need to determine whether or how to handle v4 compatibility inside the Tiny MCE <iframe>.

For example, should it include v4 shims? If so, should it also include the inline style for the "font face shim"