# textarea-log #
----------------

Create a textarea where debug log can be written.

This was created due to the difficulty I had when copying lengthy debug logs created by `console.log`.

## clone ##

```bash
$ fossil clone textarea-log.fossil
$ fossil open textarea-log.fossil
```

## usage ##

```html
<script type="text/javascript"
        src="textarea.js"></script>
```

```javascript
show textarea
textarea.show();

output some log to text area
textarea.log("date and time now is :", new Date());
```

## documentation ##

install dependencies

```bash
$ npm install
```

generate documentation and see

```bash
$ document
```

## API ##

### show ###
> show the textarea

```javascript
void textarea.show();
```

### hide ###
> hide the textarea

```javascript
void textarea.hide();
```

### getBuffer ###
> get the text area buffer content

```javascript
String textarea.getBuffer();
```

### clear ###
>clear the textarea
>
> everytime the buffer is cleared the cleared contents is added to the buffer history

```javascript
void textarea.clear();
```

### getHistory ###
> get a copy of the buffer history

```javascript
String[] textarea.getHistory();
```

### clearHistory ###

> clear the buffer history

```javascript
void textarea.clearHistory();
```