var dialog = this,
data = {},
heading = editor.document.createElement( 'div' ),
heading_link = editor.document.createElement( 'a' );
this.commitContent( data );
heading_link.setAttribute( 'href', '#' );
heading_link.setAttribute( 'onclick', "_gaq.push(['_trackEvent', 'expand', '', 'frompage:' + location.pathname]);");
heading_link.setHtml(data.header);
heading.setAttribute('class', 'silverheader');
heading.setAttribute('id', 'silverheader');
heading.setHtml(heading_link);
editor.insertElement(heading);
What I'm trying to do is have the link embedded within the div,
<div class="silverheader" id="silverheader"><a href="#" onclick="_gaq.push(['_trackEvent', 'expand', '', 'frompage:' + location.pathname]);">test</a></div>
but right now its just showing an object.
<div class="silverheader" id="silverheader">[object Object]</div>.
Is there a conventional way to embed elements within each other?
Also I noticed that when I insert the link by itself, it is automatically wrapped by <p></p>. Is there anyway to turn that off?
