API Docs for: 1.0.0
Show:

TextEditBox Class

Uses
Defined in: texteditbox.js:5
Module: Intro2JavaScript

Text-edit box is a widget that marks up text with HTML and special span tags for code markup, e.g. function, string, keyword, etc.

Constructor

TextEditBox

(
  • id
)
Void

Defined in texteditbox.js:5

Parameters:

  • id String

    element id of text-edit textarea

Returns:

Void:

Item Index

Properties

Methods

_makeMarkup

(
  • tagName
  • empty
  • text
  • attrs
)
String private

Defined in texteditbox.js:161

Helper function for IE branch of addMarkup().

Parameters:

Returns:

addMarkup

(
  • tagName
  • empty
  • [attrs]
)
Void

Defined in texteditbox.js:82

Adds markup to selected text.

Parameters:

  • tagName String
  • empty Boolean

    whether element is empty (e.g. img element)

  • [attrs] Object optional

    optional object containing add'l element attributes

Returns:

Void:

Properties

editBox

HTMLElement

Defined in texteditbox.js:16

Text-edit textarea element

Default: "editbox"

spanButtons

Array

Defined in texteditbox.js:24

Data for the code markup buttons.