jquery - How to wrap anchor around HTML on tinyMCE -


well have problem, made few custom buttons tinymce wordpress editor insert html user wouldn't confused shortcodes. works relativly ok... there button wraps anchor div.

<a name="buton" class="prod-button" href="some-href">   <div>        ...   </div> </a> 

the problem when content inserted editor, ancho erased.

it not problem of button, how tinymce configurated believe, because happens when write html directly in editor

i've done , didn't work

tinymce.init({     allow_html_in_named_anchor: true,     valid_children: '+a[div],+a[span],+a[img]',      extended_valid_elements : "a[*]", });      

any ideas?

in opinion best solution insert form creating short code. so, can load form sidebar , use short code display form content.

this documentation https://codex.wordpress.org/shortcode_api

regards. ed


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -