# j-ContentEditable

> j-ContentEditable: fácil de usar; suporta excelentes características

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: pt
Content-SHA256: 680a9eb1880ba0535366d74e4019bdf49aa4025904da7d870941393fe27fcc68
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- Apoia grandes características
- Trabalhe com o sistema Bootstrap Grid
- Facilidade para customização
- Suporte para cortes básicos `CMD+B` O BODO, `CMD+U` A sublime, `CMD+I` O italiano e `CMD+L` Crie um link

__Atributos__:
- `data-required="true"` opcional, padrão `false`
- `data-clipboard="text/plain"` opcional, padrão `text/plain` (para o suporte de `html` uso `text/html`)

__Métodos__:
- `component.getNode()` retorna um `node` selecionado em texto `{Object}`
- `component.getSelection()` retorna uma seleção atual `{String}`
- `component.insert(value, [encode])` insere um texto HTML ou PLAIN personalizado na posição do cursor atual, `encode` (opcional) é por padrão `false`
- `component.exec('Bold', false, null)` tem a mesma funcionalidade que o `document.execCommand()`

__Operadores__:
`component.event(type, value)` gerencia todos os eventos do editor.

```html
type = bold          - when a text is bolded (value is boolean)
type = italic        - when a text is italic (value is boolean)
type = underline     - when a text is underlined (value is boolean)
type = link          - when a link is created (value is a temporary URL)
type = current       - when a current element is changed in the text (value is NODE)
type = paste         - when the clipboard is used (value is a clipboard value)
type = select        - when a text is selected (value is selected text)
type = focus         - editor is focused (value is undefined)
type = blur          - editor is not focused (value is undefined)
type = click         - click on the specific element in the text (value is NODE)
```

__Declaração defeituosa__:

```javascript
self.event = function(type, value) {
    if (type === 'paste')
        self.insert(value, true);
};
```

Use-o com `<ui-component name="contenteditable">`Quando o componente ainda não está carregado, jComponent Descarrega-o no primeiro uso do endereço `DEF.fallback` (a partir do Componentator CDN por padrão). autor: Peter Širka. fonte: o Componentator Reserva de componentes, licença MIT.

```html example.html
<div class="container">
	<div class="row">
		<div class="col-md-6">
			<ui-component name="contenteditable" path="myhtml"></ui-component>
		</div>
	</div>
</div>
```
