Closed cherifGsoul closed 5 years ago
Fixes "Copy" button which copies empty string.
The issue is that a copy button for each demo gets registered in the bit-docs-prettify step when the demos code is empty
bit-docs-prettify
demo_tpl.js
<pre>
process
demo_frame.js
<code>
innerHTML
Like this Copy button will be registered at the right time instead of during bit-docs-prettify step.
Copy
Fixes https://github.com/canjs/canjs/issues/5126
Fixes "Copy" button which copies empty string.
The issue is that a copy button for each demo gets registered in the
bit-docs-prettify
step when the demos code is emptyThe logic behind the changes
demo_tpl.js
to have empty<pre>
elementprocess
function in thedemo_frame.js
by creating a<code>
element, setting itsinnerHTML
and append it to<pre>
Like this
Copy
button will be registered at the right time instead of duringbit-docs-prettify
step.Fixes https://github.com/canjs/canjs/issues/5126