Question

Here is the code i am using

<textarea name="tinyeditor" id="tinyeditor" style="width: 800px; height: 500px"></textarea>
<script>
   var editor = new TINY.editor.edit('editor', {
    id: 'tinyeditor',
    width: 750,
    height: 350,
    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',
         'image', 'hr', 'link', 'unlink', '|', 'print'],
    footer: true,
    fonts: ['Verdana','Arial','Georgia','Trebuchet MS'],
    xhtml: true,        
    bodyid: 'editor',
    footerclass: 'tinyeditor-footer',
    toggle: {text: 'source', activetext: 'wysiwyg', cssclass: 'toggle'},
    resize: {cssclass: 'resize'}
   });
</script>

My post output is coming like this

Array ( [tinyeditor] => [templatename] => test [content] => [textedito] => [Submit_x] => 48 [Submit_y] => 14 ) 

if i remove id="tinyeditor" from the text area then post value is coming

Was it helpful?

Solution

You need to post the data from editor with JS:

$(document).ready(function(){ $(".submit").click(function(){ editor.post(); }); });

Where .submit is class of submit button

OTHER TIPS

easy way :

Paste your script :

var editor = new TINY.editor.edit('editor', { id: 'tinyeditor', etc.....

on the button form

input type="submit" value="Envoyer" onClick="editor.post();"

et voilà

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top