Tema: tinymce
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/08/2013, 11:50
Avatar de teslas
teslas
 
Fecha de Ingreso: febrero-2013
Ubicación: Barcelona
Mensajes: 106
Antigüedad: 11 años, 2 meses
Puntos: 1
Respuesta: tinymce

Hola


Tambien tengo ademas el manejo de imagenes para incluir en el editor:

<head>
<!--editor-->
<script type="text/javascript" src="tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init(
{

selector: "textarea",

// ===========================================
// INCLUDE THE PLUGIN
// ===========================================
plugins: [
"advlist autolink lists link image charmap print preview anchor",
"searchreplace visualblocks code fullscreen",
"insertdatetime media table contextmenu paste jbimages"
],
// ===========================================
// PUT PLUGIN'S BUTTON on the toolbar
// ===========================================
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image jbimages",
// ===========================================
// SET RELATIVE_URLS to FALSE (This is required for images to display properly)
// ===========================================
relative_urls: false
}
);
</script>


<!--fin editor-->
</head>


<!--Y tambien en el body:..>

<form method='POST'>
<?php if ($error != "") { print("<p class='error3'>".$error."</p>"); } ?>
<input id="posttitle" class="posttitle" name='title'>

<textarea id="post" name="post" style="width:100%"></textarea>

<input type="submit" class="button" value="Post">
</form>


<!--Despues utilizo una funcion para insertar en BD-->

$DB->RowInsert('posts', array('posted' => $time, 'user' => $_SESSION['user_id'], 'title' => $title, 'content' => $post, 'lastupdated' => $time));


NOTA: La insercion de datos la realiza bien, solo que no contempla el HTML

Un saludo