# @multiprova/editor

> Editor HTML do Multiprova.

Latest version **1.4.9** (published 2026-08-11) · 0 weekly downloads

## Install

```sh
npm install @multiprova/editor
pnpm add @multiprova/editor
yarn add @multiprova/editor
bun add @multiprova/editor
```

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.4.9 |
| Published | 2026-08-11 |
| First published | 2023-04-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 22 |
| Unpacked size | 574.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (Unknown) |
| Maintainers | system.multiprova, rexmedeiros, gustavoleitao, fabianapduarte |

## Links

- npm: https://www.npmjs.com/package/@multiprova/editor
- Repository: https://gitlab.com/tapioca-ufrn/multiprova/editor
- Homepage: https://gitlab.com/tapioca-ufrn/multiprova/editor#readme
- Issues: https://gitlab.com/tapioca-ufrn/multiprova/editor/issues
- npm.io page: https://npm.io/package/@multiprova/editor

## Dependencies (22)

- [react](https://npm.io/package/react.md) ^16.8.6
- [redux](https://npm.io/package/redux.md) 4.0.1
- [slate](https://npm.io/package/slate.md) ^0.93.0
- [is-url](https://npm.io/package/is-url.md) ^1.2.4
- [react-dom](https://npm.io/package/react-dom.md) ^16.8.6
- [classnames](https://npm.io/package/classnames.md) 2.2.6
- [react-katex](https://npm.io/package/react-katex.md) 2.0.2
- [react-redux](https://npm.io/package/react-redux.md) 6.0.0
- [slate-react](https://npm.io/package/slate-react.md) ^0.98.4
- [re-resizable](https://npm.io/package/re-resizable.md) 4.11.0
- [slate-history](https://npm.io/package/slate-history.md) ^0.93.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) 7.2.0
- [@material-ui/lab](https://npm.io/package/@material-ui/lab.md) 4.0.0-alpha.61
- [redux-mock-store](https://npm.io/package/redux-mock-store.md) 1.5.3
- [redux-responsive](https://npm.io/package/redux-responsive.md) 4.3.8
- [@material-ui/core](https://npm.io/package/@material-ui/core.md) ^4.11.0
- [slate-hyperscript](https://npm.io/package/slate-hyperscript.md) ^0.77.0
- [@material-ui/icons](https://npm.io/package/@material-ui/icons.md) ^4.11.3
- [@material-ui/styles](https://npm.io/package/@material-ui/styles.md) ^4.10.0
- [react-resize-listener](https://npm.io/package/react-resize-listener.md) ^0.3.6
- [react-swipeable-views](https://npm.io/package/react-swipeable-views.md) 0.13.0
- [@multiprova/multiprova-mathquill](https://npm.io/package/@multiprova/multiprova-mathquill.md) ^1.0.3

## Recent versions

- 1.4.9 (latest) — 2026-08-11
- 1.4.8 — 2026-07-12
- 1.4.7 — 2026-07-12
- 1.4.3 — 2025-11-04
- 1.4.2 — 2025-08-14
- 1.4.1 — 2025-06-22
- 1.4.0 — 2024-11-25
- 1.3.1 — 2024-11-05
- 1.3.0 — 2024-11-05
- 1.2.6 — 2023-11-30
- 1.2.5 — 2023-10-04
- 1.2.4 — 2023-09-15
- 1.2.3 — 2023-09-12
- 1.2.2 — 2023-08-20
- 1.2.1 — 2023-08-07
- … 11 more at https://npm.io/package/@multiprova/editor/versions

## README

# Multiprova - Editor

Editor HTML do Multiprova.

## Como instalar?

Para instalar o `@multiprova/editor` em seu projeto, instale a biblioteca como dependência via npm:

```shell
$ npm install @multiprova/editor
```

## Como usar?

A utilização do `@multiprova/editor` é simplificada, basta importar em um componente e começar a usar:

```js
import React, { Component } from 'react'
import { Editor } from '@multiprova/editor'

export default class Example extends Component {
  render() {
    return <Editor />
  }
}
```

O componente se apresentará da seguinte maneira:

<p align="center">
  <img alt="Componente Editor" src=".gitlab/multiprova-editor-example.jpg" />
</p>

### Propriedades (Props)

O `<Editor />` recebe algumas _props_ que modificam diretamente seu comportamento:

| Nome da propriedade | Descrição                                                          |            Tipo             |             Valor padrão             |
| :-----------------: | ------------------------------------------------------------------ | :-------------------------: | :----------------------------------: |
|       `html`        | Elemento html usado para encapsular o texto                        |          `string`           |              `<p></p>`               |
|       `rows`        | Número de linhas                                                   |          `number`           |                 `1`                  |
|  `floatingToolbar`  | Barra de ferramentas flutuante                                     |          `boolean`          |               `false`                |
|  `justifyDefault`   | Alinhamento textual justificado                                    |          `boolean`          |                `true`                |
|    `spellCheck`     | Verificação ortográfica                                            |          `boolean`          |                `true`                |
|     `readOnly`      | Somente leitura                                                    |          `boolean`          |               `false`                |
|     `adornment`     | Adorno do campo <br> Recebe um objeto [Adornment](#####-adornment) |          `object`           | `{ align: 'right', onEvent: false }` |
|    `placeholder`    | Texto de descrição do campo                                        |          `string`           |                 `''`                 |
|     `autoFocus`     | Foco automático                                                    |          `boolean`          |               `false`                |
|     `onChange`      | Função disparada ao alterar o valor do texto                       |         `function`          |              `() => {}`              |
|      `onFocus`      | Função disparada quando o campo está em foco                       |         `function`          |              `() => {}`              |
|      `onBlur`       | Função disparada quando o campo perde o foco                       |         `function`          |              `() => {}`              |
|  `enabledModules`   | Objeto com módulos ativo e inativas para a barra de ferramentas    |          `object`           |                 `{}`                 |
|      `upload`       | Função de upload de mídia                                          | `function (file, nodeType)` |               `false`                |
|  `defaultFontSize`  | Tamanho padrão do texto                                            |          `string`           |               `"12pt"`               |
|   `dynamicValues`   | Conjunto de valores possíveis de uma questão                       |         `object[]`          |                 `[]`                 |

#### Objetos

##### Adornment

```js
{
  align: 'left' | 'right',
  onEvent: false | 'hover' | 'focus' | 'blur',
  element: Elemento React
}
```

## Como executar localmente

Para fazer modificações na biblioteca `@multiprova/editor` localmente siga os seguintes passos:

1. Instale a ferramenta Yalc globalmente:

```shell
$ npm install -g yalc
```

2. Edite o arquivo `package.json` do editor e adicione o seguinte atributo ao objeto:

```json
"files": [
  "src"
]
```

3. Acesse o repositório do editor no terminal e execute:

```shell
$ cd editor
$ yalc push
```

4. Acesse no terminal o repositório que utiliza o editor como dependência e execute:

```shell
$ cd nome-repositorio
$ yalc link @multiprova/editor
```

5. Faça a importação do editor

```js
import { Editor } from '@multiprova/editor/src'
```

6. Para compilar qualquer alteração feita no editor, execute `yalc push` no terminal do `@multiprova/editor` e o repositório que o utiliza como dependência irá compilar automaticamente. **Não** é preciso executar `npm start` no editor.

## Como remover o repositório local

Para remover o repositório local das dependências, acesse o repositório que utiliza o editor como dependência e execute:

```shell
$ cd nome-repositorio
$ yalc remove @multiprova/editor
$ npm ci
```

**ATENÇÃO**: Desfaça as alterações feitas no arquivo `package.json` do editor e remova o '/src' do caminho da importação do editor. É importante que essas alterações não estejam em um commit para o repositório.

---
_Source: https://npm.io/package/@multiprova/editor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
