# Interface Writer

interface Writer {
addMarker (
name: string,
opts: { range: Range; usingOperation: boolean },
): any;
createElement (
type: string,
opts: Record <string, undefined | null | string>,
): any;
createPositionAt (el: CKNode , opt?: number | "end"): any;
createRange (start: number, end: number): Range;
insertText (
text: string,
opts: undefined | Record <string, unknown> | TextPosition ,
position?: TextPosition ,
): any;
removeMarker (name: string): any;
setAttribute (name: string, value: string, el: CKNode ): any;
setSelection (pos: number, pos?: number): any;
}

- Defined in src/public/app/types.d.ts:260

##### Index

### Methods

addMarker
createElement
createPositionAt
createRange
insertText
removeMarker
setAttribute
setSelection

## Methods

### addMarker

- addMarker(name: string, opts: { range: Range; usingOperation: boolean }): any

  #### Parameters

  - name: string
  - opts: { range: Range; usingOperation: boolean }

  #### Returns any

  - Defined in src/public/app/types.d.ts:265

### createElement

- createElement(
  type: string,
  opts: Record <string, undefined | null | string>,
  ): any

  #### Parameters

  - type: string
  - opts: Record <string, undefined | null | string>

  #### Returns any

  - Defined in src/public/app/types.d.ts:271

### createPositionAt

- createPositionAt(el: CKNode , opt?: number | "end"): any

  #### Parameters

  - el: CKNode
  - `Optional` opt: number | "end"

  #### Returns any

  - Defined in src/public/app/types.d.ts:262

### createRange

- createRange(start: number, end: number): Range

  #### Parameters

  - start: number
  - end: number

  #### Returns Range

  - Defined in src/public/app/types.d.ts:270

### insertText

- insertText(
  text: string,
  opts: undefined | Record <string, unknown> | TextPosition ,
  position?: TextPosition ,
  ): any

  #### Parameters

  - text: string
  - opts: undefined | Record <string, unknown> | TextPosition
  - `Optional` position: TextPosition

  #### Returns any

  - Defined in src/public/app/types.d.ts:264

### removeMarker

- removeMarker(name: string): any

  #### Parameters

  - name: string

  #### Returns any

  - Defined in src/public/app/types.d.ts:269

### setAttribute

- setAttribute(name: string, value: string, el: CKNode ): any

  #### Parameters

  - name: string
  - value: string
  - el: CKNode

  #### Returns any

  - Defined in src/public/app/types.d.ts:261

### setSelection

- setSelection(pos: number, pos?: number): any

  #### Parameters

  - pos: number
  - `Optional` pos: number

  #### Returns any

  - Defined in src/public/app/types.d.ts:263