# Input (text/number)

An input editor is the most common editor, it could be any of these (text, integer, float, password)

## Regular Text or Number Editor

For editing regular text, you can use `Editors.text` and for numbers then you can use `Editors.integer` or `Editors.float`

```ts
this.columns = [
  {
    id: 'firstName', name: 'First Name', field: 'firstName',
    editor: { model: Editors.text },
  },
  {
    id: 'lastName', name: 'Last Name', field: 'lastName',
    editor: { model: Editors.text },
  },
  {
    id: 'age', name: 'Age', field: 'age',
    editor: { model: Editors.integer },
  },
];
```

## Demo with Float Editor and Dollar Currency Formatter

This is probably a common use case to have an editor for editing currency, below is an exampe of dollar currency format and editiing with 2 decimal places (using any other currency would work too).

```ts
this.columns = [
  {
    id: 'cost', name: 'Cost', field: 'cost',
    type: 'float',
    formatter: Formatters.dollar, // the Dollar Formatter will default to 2 decimals unless you provide a minDecimal/maxDecimal
    // params: { minDecimal: 2, maxDecimal: 4, }, // optionally provide different decimal places

    // the float editor has its own settings, `decimal` that will be used only in the editor
    // note: that it has nothing to do with the Dollar Formatter
    editor: { model: Editors.float, decimal: 2 },
  },
];
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ghiscoding.gitbook.io/slickgrid-universal/column-functionalities/editors/input-editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
