Well, I have this code:
<?php
if(isset($_POST['texto'])) {
$texto = $_POST['texto'];
echo "$texto";
?>
<form action="/env_not.php" method="POST">
<textarea id="tinyeditor" name="texto" style="width: 700px; height: 800px"></textarea>
<script>
var editor = new TINY.editor.edit('editor', {
id: 'tinyeditor',
width: 700,
height: 800,
cssclass: 'tinyeditor',
controlclass: 'tinyeditor-control',
rowclass: 'tinyeditor-header',
dividerclass: 'tinyeditor-divider',
controls: ['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|',
'orderedlist', 'unorderedlist', '|', 'outdent', 'indent', '|', 'leftalign',
'centeralign', 'rightalign', 'blockjustify', '|', 'unformat', '|', 'undo', 'redo', 'n',
'font', 'size', 'style', '|', 'image', 'hr', 'link', 'unlink', '|', 'print'],
footer: true,
fonts: ['Verdana','Arial','Georgia','Trebuchet MS'],
xhtml: true,
cssfile: 'custom.css',
bodyid: 'editor',
footerclass: 'tinyeditor-footer',
toggle: {text: 'source', activetext: 'wysiwyg', cssclass: 'toggle'},
resize: {cssclass: 'resize'}
});
</script> <input type='submit' style='text-align: right' name='enviar' value='Enviar'>
</form>
When I submit this form, my $_POST['texto'] return is blank, how I can pass the value into TinyEditor, to my textarea.texto? Because I need get this value with PHP.
Thanks!
Well, it's been a while but I'll answer with what I found. Maybe it will help someone in the future.
I had the same problem and then I found that you have to click "source" (to view the html) and then submit. If not, it won't save what you wrote. No idea why this happens, I'm looking for help with this issue myself.