Diferencia entre revisiones de «Usuario:King of Herdaz/Toolbar customization»

m
 
== General Guidelines ==
While there are other types of actions that you can do with buttons, here we will focus on the <code>encapsulate</code> action as it is the easiest to understand and use. This action pastes one snippet of text before the highlighted text (or you cursor) and a second snippet after the highlighted text. The second snippet (<code>post:</code>) can be deleted if you only want to insert one snippet of text.
 
The code for this action is as follows, and this format is the same for both dropdowns and buttons. <!--If I include other options then change this-->
type: 'encapsulate',
options: {
pre: 'FFFFXXXX',
post: 'GGGGYYYY'
</pre>
 
<code>XXXX</code> is replaced by the snippet that goes before the highlighted text/cursor, and <code>YYYY</code> is replaced by the snippet that goes after the highlighted text/cursor.
8718

ediciones