j-ContentEditable
- Supporta grandi caratteristiche
- Funziona con il sistema Bootstrap Grid
- Facile per la personalizzazione
- Supporta i brevetti di base
CMD+BIl balletto,CMD+Udi sottolineare,CMD+IItaliano eCMD+LCrea un link
Attributi:
data-required="true"opzionale, standardfalsedata-clipboard="text/plain"opzionale, predefinitotext/plain(per il supporto dihtmlutilizzotext/html)
Metodi:
component.getNode()ritorna unnodeselezionato nel testo{Object}component.getSelection()ritorna una selezione corrente di{String}component.insert(value, [encode])inserisce un testo HTML o PLAIN personalizzato nella posizione corrente del cursore,encode(opzionale) è per defaultfalsecomponent.exec('Bold', false, null)ha la stessa funzionalità didocument.execCommand()
operatori:
component.event(type, value) gestisce tutti gli eventi dall'editore.
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)Dichiarazione default:
self.event = function(type, value) {
if (type === 'paste')
self.insert(value, true);
};Utilizzare con <ui-component name="contenteditable">Quando il componente non è ancora caricato, jComponent Scarica il codice in prima utilizzazione dall'indirizzo DEF.fallback (Il Componentator La storia di Peter Širka.Fonte: il Componentator Ristorante dei componenti, licenza MIT.
<div class="container">
<div class="row">
<div class="col-md-6">
<ui-component name="contenteditable" path="myhtml"></ui-component>
</div>
</div>
</div>