Make the selected text superscript or subscript.

In caret status, the text to be entered becomes superscript or subscript.


Parameters:

NameTypeDescription
actionNameString'setTextVertAlign' superscript and subscript API
valueStringSuperscript and subscript properties: 'superscript', 'subscript' 


Example:

editor.execCommand('setTextVertAlign', 'superscript');
editor.execCommand('setTextVertAlign', 'subscript');