Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Sep 2008
    Thanked 3 Times in 3 Posts

    YUI simple text editor - not saving changes

    Hi all,
    I'm using the YUI Simple Editor in my page. It's a page for updating data in website and the problem is that the changes I make to the text with the editor, are not saved. Actually the sql query that is submitted to the database contains the old text and not the changed updated text. It seems that changes on text are only visual.

    Has anybody faced the same problem with this script? Can you imagine what's the cause for this? Help me pls

    the html/php is:
    <textarea id="text" name="text" rows="20" cols="75">
    	<?php echo $row_show_new['text']; ?>
    and the javascript code that creates editor is:
    	(function() {
    	     var Dom = YAHOO.util.Dom,
    	     Event = YAHOO.util.Event;
    	     var myConfig = {
    	     height: '100px',
    	     width: '500px',
    	     dompath: true,
    	     focusAtStart: false
    	YAHOO.log('Create the Editor..', 'info', 'example');
    	var myEditor = new YAHOO.widget.SimpleEditor('text', myConfig);
    Last edited by ktsixit; 11-27-2008 at 10:17 AM.

  2. #2
    New to the CF scene
    Join Date
    Jun 2009
    Thanked 0 Times in 0 Posts


    This is a quote from the YUI documentation:
    Getting the data from the Editor

    There are a couple of ways to get the data from the editor. The first way is to let the Editor do it for you by setting the handleSubmit configuration option.

    Setting the handleSubmit configuration option, the Editor will attempt to attach itself to its parent form's submit event. Then it will call its saveHTML method, then proceed with the form submission.

    simply set
    handleSubmit: true
    in your configuration options.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts