WordPress.org

Ready to get started?Download WordPress

Forums

Alter Visual Editor to add extra extended_valid_elements settings? (1 post)

  1. harknell
    Member
    Posted 6 years ago #

    Hi, I'm trying to determine if it's possible to add in entirely new elements to the Visual Editor so that it does not strip them out when doing code cleanup. I want to add this in from a plugin, so I'm not going to go and actually edit people's config files. I want to add the extended_valid_elements setting to tinyMCE with my own list of things not to delete, but I'm not sure how to set that. I believe you need to do it in some fashion with the tiny_mce_before_init hook, but the only examples given are for things that are true/false or have numerical elements, not something that has a full string of text.

    the examples in the codex would lead me to believe that $init_array['extended_valid_elements'] = "example[example]"; within the called function from the hook should do it, but it doesn't seem to work and still filters out whatever I place there. Anyone get this to work?

Topic Closed

This topic has been closed to new replies.

About this Topic