I'm trying to use the great "medium editor clone" https://github.com/yabwe/medium-editor and I'm stuck with the problem:
How to wrap a selected piece of text (that is actually code) with 2 tags: <pre> and <code>
(I want it to use highlight.js code formatter).
So, the result after applying should be:
<pre><code>some my code</code></pre>
I have no idea how to implement it.
For those who may be interested in this problem, I found the solution.
I had to use extend button with the following code:
That is I just extract the text and wrap it with tags.
Let me know if you found more elegant and natural way to gain it.