1
I am with a question, as I will send by the POST method, what is typed inside an html editor?
I need to send the typing information to the database, but I don’t know how to get the information from the HTML editor. Follow the code:
<div class="alinha">
<h3>Sistema de notícias</h3>
<form action="valida_noticia.php" method="post">
<div class="form-group">
<label>Título da notícia</label>
<input type="text" name="titulonoticia" class="form-control" placeholder="Forneça o título da notícia">
</div>
<div class="form-group">
<script src="https://cdn.ckeditor.com/4.7.3/standard/ckeditor.js"></script>
<textarea name="editor"></textarea>
<script>
CKEDITOR.replace( 'editor' );
</script>
<!-- <div class="adjoined-bottom">
<div class="grid-container">
<textarea id='editor' name='editor'></textarea>
</div>
</div> -->
</div>
<button type="submit" class="btn btn-default">Enviar</button>
</div>
</form>
Which editor is using and which Javascript code creates it on the page?
– Woss
This is like Ckeditor, but I think we’re missing one
<textarea>
there.– Sam
It’s a Ckeditor in a DIV ? but even if you put in a textarea the Ckeditor needs to be instantiated and take the value of the instance, only the post method does not take the value
– AnthraxisBR
is the CKEDITOR, I’ll confess to you that I am very lay in this matter of HTML editors, I took the editor of an example of them and put on the page that was going to insert news
– Pedro Ribeiro
@Pedroribeiro you will send the form via ajax or submit by the same <form> tag ?
– AnthraxisBR
Sending via POST, I saw several videos on youtube, where people put a code in PHP to instantiate the CKEDITOR, but I reviewed the CKEDITOR documentation I downloaded ( Version 4.6.2 ) and found nothing how to instantiate the same in PHP. The video I’m using to guide me is this: https://www.youtube.com/watch?v=_Khjn-lxRqc
– Pedro Ribeiro