Artifact
1ce18cac95c45356e783b696361bf0d4086a08aa:
Wiki page
[textarea-log] by
frostbane
2017-10-17 08:38:25.
D 2017-10-17T08:38:25.507
L textarea-log
N text/x-markdown
U frostbane
W 1483
# 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 https://chiselapp.com/user/frostbane/repository/textarea-log 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 `doc/textarea-log/index.html`
```bash
$ ./node_modules/.bin/grunt 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();
```
Z 2d3e173cb58b58c993ef96351286c4e3