Italic
Making the text italic help you to indicate some emotion or tone in your text.
toggleItalic #
To make the selection of your content italic you can use toggleItalic
function.
It'll toggle between italic and not italic automatically.
isItalic #
This function help you to find out if the current character is italic or not. The returend boolean will update on cursor moves.
Example #
An example of toggleItalic
and isItalic
usage:
Customization #
By default, the ITALIC
key represent the italic inline style. For any reason if
you need to change this key to something else, you can pass your custom key to the
previous functions as the third parameter.
Also if you changed the default key for the italic inline style, you have to pass the updated version of style map to the editor. Here is an example: