CKEditor
CKEditor es un editor de texto HTML/ WYSIWYG de código abierto que proporciona funciones de procesador de texto / edición de contenidos dentro de la plataforma.
Playground
Tipo de Editor
- Ruby
- Html
- Javascript
<%= f.text_area :content, class: "form-control", data: { autosize: true, editor: 'ckeditor_simple' } %>
Para implementar ckeditor4 revisar documentación:
https://ckeditor.com/docs/ckeditor4/latest/guide/dev_installation.html
Librerías necesarias para hacer funcionar CKEditor 4:
"ckeditor-youtube-plugin": "^2.1.19",
"ckeditor4": "^4.18.0"
Las únicas variaciones dependen de los plugins y/o configuraciones que tenga cada opción:
Base:
config = {
shiftMode: CKEDITOR.ENTER_BR,
base64image: { allow_remote: false },
disallowedContent: 'img{width,height,float}',
extraAllowedContent: 'img[width,height,align]',
extraPlugins: 'tableresize,base64image,justify',
toolbar: [
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike'] },
{
name: 'align',
items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']
},
{ name: 'paragraph', items: ['NumberedList', 'BulletedList'] },
{ name: 'insert', items: ['Table', 'base64image'] }
],
removePlugins: ['elementspath']
}
Lista de parámetros
Parámetro | Tipo | Detalle |
ck_only_txt | String | Excluyente Opciones orientadas a texto |
ck_only_notify | String | Excluyente Opciones limitadas orientadas a texto |
ck_text_and_links | String | Excluyente Opciones limitadas orientadas a texto y links |
ck_video_links | String | Se integra plugin de Youtube |