Skip to content
Guides

Add, Move, or Delete Text

ComPDFKit provides methods to do various operations like creating text when you are in content editor mode. You can use the mouse and keyboard to manipulate text areas on WebViewer as in Microsoft Word, you can add, copy, paste, cut, or delete text by keyboard.

javascript
// Insert Text.
docViewer.contentEditAnnotationsManager.addTextEditor({
  pageNumber: 1,
  rect: {
    left: 240,
    top: 32,
    right: 300,
    bottom: 48
  },
  fontData: {
    fontName: 'Helvetica',
    fontSize: 14,
    r: 0,
    g: 0,
    b: 0,
    opacity: 1,
    isBold: 0,
    italic: 0,
  },
  alignType: 2
})