• Resolved aryanrajseo

    (@aryanrajseo)


    Hi, I would like to add ` tag after pre class like

    <pre class="EnlighterJSRAW"><code>
    Here is the PHP/CS/HTML content 

    Why is it not added by default?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andi Dittrich

    (@andi-dittrich)

    Hi aryanrajseo,
    why would you do this ? the pre container is only a wrapper which holds the content to highlight. the highlighting itself is done via EnlighterJS which hides the pre container.

    best regards, Andi

    Thread Starter aryanrajseo

    (@aryanrajseo)

    I am using Clipboard.js to add a copy option which adds a svg copy icon to give an option to copy the code. <pre><code>This is code. Copy this.</code></pre>

    clipboard works only when code is under <code></code> but when i add this after EnlighterJS pre tag it adds the svg icon as CODE and not the icon. Do you have any plan to add a clipboard in it?

    Plugin Author Andi Dittrich

    (@andi-dittrich)

    this is the intended behaviour – everything within the <pre> block is marked to be highlighted. you can re-configure clipboard.js to work with other html elements but its difficult to integrate because you may have to change EnligterJS codebase.

    copy-to-clipboard is a requested feature (projected for EnlighterJS 3.1/3.2) using the new Clipboard API

    Thread Starter aryanrajseo

    (@aryanrajseo)

    Thanks a lot for adding this feature in the upcoming version.

    Thanks for your hard work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding extra tag like’ is closed to new replies.