[ 4 posts ]

arun george

  • Username: arunisaac_1983
  • Joined: Mon Sep 26, 2011 7:28 am
  • Posts: 1
  • GitHub: arun2002
  • Gists: arun2002
  • IRC: arun
  • Offline
  • Profile
Tags:

form not updated with text area integrated with yui 2.x

Post Posted: Mon Sep 26, 2011 7:37 am
+0-
Hi ,
I am new to yui
I was trying to integrate yui in our text area tag.
But after integrating with yui text area data is not getting updated in form.
Please help me.................

I am using yui 2.7

<script language="javascript" type="text/javascript">
//<![CDATA[
//-----------------------------------------------------------------------------------------
// this function adds the yui editor to the text area, and creates a button for spell check
//-----------------------------------------------------------------------------------------
function getSpellCheckArray()
{
var fieldsToCheck=new Array();
fieldsToCheck[fieldsToCheck.length]=[document,"announcementMessage_editor"];
return fieldsToCheck;
}

function addYUIEditor(el, w, h){
var tmpEditor;
var Dom = YAHOO.util.Dom;
Event = YAHOO.util.Event;


var myYUIConfig = {
height: h, width: w, handleSubmit: true,
toolbar: {
buttons: [
{ group: 'textstyle',
buttons: [
{ type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
{ type: 'push', label: 'Bold', value: 'bold' },
{ type: 'push', label: 'Italic', value: 'italic' },
{ type: 'push', label: 'Underline', value: 'underline' },
{ type: 'push', label: 'Check Spelling', value: 'spellcheck' }
]
}
]
}
};
tmpEditor = new YAHOO.widget.SimpleEditor(el, myYUIConfig);

tmpEditor.on('toolbarLoaded', function() {

//------ add impspellcheck---------
this.toolbar.on('spellcheckClick', function() {

setTimeout(jspellSync,500);
runImpspellerYui(this);

return false;
}, this, true);
//------ end add impspellcheck ------

}, tmpEditor, true);



tmpEditor.render();


return tmpEditor;
}

function runImpspellerYui(yeditor, id){


jspellDialog();
return false;
}

<TL:FWTextAreaTag id="announcementMessage" cols="100" rows="16" bean="<%=AnnouncementMessage%>" value="<%=AnnounceMsg%>" tabindex="2" other="onkeypress='return LimitThis()' onkeyup='return CountThis()' onmouseover='return CountThis()' wrap=physical maxLength=2000 " />
<input type="hidden" id="TEXT_AREA_MAX_LENGTH" name="TEXT_AREA_MAX_LENGTH" value="2000"/>

<script type="text/javascript">
setTimeout(jspellInit,500);
myYUIEditor1 = addYUIEditor('announcementMessage', '450px', '250px');

</script>



<TL:FWButtonTag button="SUBMIT_BUTTON" id="button2" name="submit" tabindex="<%=String.valueOf(fw_index) %>" />

Dav Glass

  • Username: davglass
  • Joined: Thu Aug 28, 2008 9:28 am
  • Posts: 2088
  • Location: Marion, IL, US
  • Twitter: davglass
  • GitHub: davglass
  • Gists: davglass
  • IRC: davglass
  • Offline
  • Profile

Re: form not updated with text area integrated with yui 2.x

Post Posted: Fri Nov 04, 2011 6:59 am
+0-
If you are trying to get data from the textarea you need to tell Editor to put that data back first with:

Code:
tmpEditor.saveHTML();


That will put the cleaned content of the Editor's iframe back into the TEXTAREA, after you modify the content of the TEXTAREA you will need to put that data back into the iframe so the user can see it.

meetsbs

  • Joined: Tue May 29, 2012 1:00 am
  • Posts: 1
  • Offline
  • Profile
Tags:

Re: form not updated with text area integrated with yui 2.x

Post Posted: Tue May 29, 2012 1:02 am
+0-
Can i set tabindex for YAHOO.widget.SimpleEditor

Bunty Jethwani

  • Username: buntyjethwani
  • Joined: Tue Jun 19, 2012 5:06 am
  • Posts: 3
  • Offline
  • Profile
Tags:

Re: form not updated with text area integrated with yui 2.x

Post Posted: Tue Jun 19, 2012 5:13 am
+0-
were you able to set tabIndex for simpleeditor rich text area ?

Can you please help me, I am unablle to find any help on how to define tabindex for rich text editor built using simpleeditor.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum