Edición de «CKEditor wysiwyg para KumbiaPHP»

De KumbiaPHP Framework Wiki

Advertencia: no has iniciado sesión. Tu dirección IP se hará pública si haces cualquier edición. Si inicias sesión o creas una cuenta, tus ediciones se atribuirán a tu nombre de usuario, además de otros beneficios.

Puedes deshacer la edición. Antes de deshacer la edición, comprueba la siguiente comparación para verificar que realmente es lo que quieres hacer, y entonces guarda los cambios para así efectuar la reversión.

Revisión actual Tu texto
Línea 1: Línea 1:
 
=== <font color="red">CODIGO ESCRITO EN BETA 2, PARA LA BETA 1 CAMBIAR Tag::js POR javascript_include_tag</font> ===
 
=== <font color="red">CODIGO ESCRITO EN BETA 2, PARA LA BETA 1 CAMBIAR Tag::js POR javascript_include_tag</font> ===
 
0) Descarga el ckeditor y el ckfinder en /public/javascript/ckeditor y /public/javascript/ckfinder
 
0) Descarga el ckeditor y el ckfinder en /public/javascript/ckeditor y /public/javascript/ckfinder
 
DESCARGA: http://ckeditor.com/download y http://ckfinder.com/download
 
  
 
1) Guarda el codigo de abajo en /app/views/_shared/partials/ckeditor.phtml
 
1) Guarda el codigo de abajo en /app/views/_shared/partials/ckeditor.phtml
Línea 8: Línea 6:
 
2) Ejecuta el partial al final de tu view: View::partial( 'ckeditor' );
 
2) Ejecuta el partial al final de tu view: View::partial( 'ckeditor' );
  
3) No te olvides de poner la clase ckeditor a los textarea. ej: <textarea class="ckeditor" ...
+
<source lang=html4strict>
 +
<!-- ESTO NORMALMENTE DEBERIA ESTAR EN TU ARCHIVO CSS. ES SOLO PARA EL EJEMPLO DE ABAJO -->
 +
<style>
 +
blue-especial { color:#266FDC; }
 +
orange-especial { color:#F2AC24; }
 +
</style>
 +
</source>
  
 
<source lang=php>
 
<source lang=php>
Línea 22: Línea 26:
 
<script>
 
<script>
 
// RUTA DEL CKFINDER. FEATURES: http://docs.cksource.com/ckfinder_2.x_api/
 
// RUTA DEL CKFINDER. FEATURES: http://docs.cksource.com/ckfinder_2.x_api/
CKFinder.setupCKEditor( CKEDITOR, '/javascript/ckfinder/' );
+
CKFinder.setupCKEditor( CKEDITOR, '/javascript/ckfinder/' ) ;
 
+
// PARA AÑADIR ESTILOS PERSONALIZADOS
// CLASES PARA VERLAS REFLEJADAS EN EL CKEDITOR
+
CKEDITOR.stylesSet.add( 'default',
CKEDITOR.config.contentsCss = [ '/css/my.css', '/css/style.css' ];
 
 
 
// CLASES PARA ELEGIR EN EL CKEDITOR QUE ESTEN EN LOS ARCIVOS QUE PUSISTE EN CKEDITOR.config.contentsCss
 
CKEDITOR.config.stylesSet =
 
 
[
 
[
 
// CADA LINEA DE ESTAS ES UNA CLASE TUYA PERSONALIZADA DE TU STYLE O ARCHIVO CSS
 
// CADA LINEA DE ESTAS ES UNA CLASE TUYA PERSONALIZADA DE TU STYLE O ARCHIVO CSS
{ name : 'blue', element : 'span', attributes : { 'class' : 'blue' } },
+
{ name : 'blue-especial', element : 'span', attributes : { 'class' : 'blue' } },
 
// RECUERDA. LA ULTIMA LINEA SIN COMA XD
 
// RECUERDA. LA ULTIMA LINEA SIN COMA XD
{ name : 'red', element : 'span', attributes : { 'class' : 'red' } }
+
{ name : 'orange-especial', element : 'span', attributes : { 'class' : 'orange' } }
];
+
]);
 
 
 
// PARA CONFIGURAR LA ALTURA DEL TEXTAREA. MAS FEATURES: http://docs.cksource.com/ckeditor_api/
 
// PARA CONFIGURAR LA ALTURA DEL TEXTAREA. MAS FEATURES: http://docs.cksource.com/ckeditor_api/
 
CKEDITOR.config.height = 400;
 
CKEDITOR.config.height = 400;
 
</script>
 
</script>
 
 
</source>
 
</source>
  
Línea 46: Línea 44:
 
RECUERDA CAMBIAR LOS SIGUIENTES 4 PUNTOS EN /javascript/ckfinder/config.php
 
RECUERDA CAMBIAR LOS SIGUIENTES 4 PUNTOS EN /javascript/ckfinder/config.php
  
0) AÑADE ARRIBA DEL TODO DEL ARCHIVO EL INICIO DE SESION
+
1) POR DEFECTO ESTA EN FALSE Y NO VERAS LOS ARCHIVOS DEL SERVIDOR
<?php
 
session_start();
 
 
 
1) AQUI ES DONDE PERMITES A LOS USUARIOS LOGEADOS (CON LA CLASE AUTH DEL FW) PARA SUBIR FICHEROS
 
 
function CheckAuthentication()
 
function CheckAuthentication()
 
{
 
{
$is_valid = isset($_SESSION['KUMBIA_AUTH_VALID']['default']) ? $_SESSION['KUMBIA_AUTH_VALID']['default'] : FALSE;
+
return true;
return $is_valid;
 
 
}
 
}
  
Línea 69: Línea 62:
 
-->
 
-->
 
</source>
 
</source>
 
[[Categoría:Partials]]
 
[[Categoría:Tutoriales KumbiaPHP]]
 

Ten en cuenta que todas las contribuciones a KumbiaPHP Framework Wiki pueden ser editadas, modificadas o eliminadas por otros colaboradores. Si no deseas que las modifiquen sin limitaciones, no las publiques aquí.
Al mismo tiempo, asumimos que eres el autor de lo que escribiste, o lo copiaste de una fuente en el dominio público o con licencia libre (véase Proyecto:Derechos de autor para más detalles). ¡No uses textos con copyright sin permiso!

Para editar esta página, responde la pregunta que aparece abajo (más información):

Cancelar Ayuda de edición (se abre en una ventana nueva)