Class ToggleSurroundWithElementOperation

  • All Implemented Interfaces:
    AuthorOperation, Extension

    @API(type=INTERNAL,
         src=PUBLIC)
    public class ToggleSurroundWithElementOperation
    extends java.lang.Object
    implements AuthorOperation
    Toggle "surround with element" operation. Case 1: If there is no selection in the document: - if the caret is inside a word then the word is wrapped in the given element (or unwrapped if it is already included in the element) - else the element is inserted at caret position. Case 2: If there is a selection, it is wrapped in the given element (or unwrapped if it is already included in the element)