Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 


 
Microsoft Gold Certified Partner - DNN Benefactor

DotNetNuke Powered! 


Monday, December 01, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
General
The ever-powerful ListX module forum. Post your questions, new configuration ideas and reviews.
Subject: FCK editor

You are not authorized to post a reply.   
Author Messages
adski74
Welterweight
Posts:27

08/31/2008 9:38 PM Alert 
Has anyone got the FCK editor working with listx?

Although the mce editor is quite good we require the ability for our editors to be able to upload & select images through the editor as well.

Thanks in advance.
pauldes
Immortal
Posts:1392

09/01/2008 8:37 PM Alert 
{TEXTEDITOR,frmComments,Comments,,95%(width),400(heightpx)}

ListX....makes you look brilliant, even though you're not.
adski74
Welterweight
Posts:27

09/01/2008 9:11 PM Alert 
Thanks pauldes - it works perfect in dnn 4.8 but does not work in 4.7 (time to upgrade!).
pauldes
Immortal
Posts:1392

09/02/2008 8:30 AM Alert 
Oh, one thing... It doesn't seem to work with lxFetch or AJAX, so your actions have to actually post back for it to work. That might be your problem. I would think either that or it's your ListX version on the 4.7 or the 4.7 uses another providor other than FCK?? Just guessing. I've been told the AJAX and {TEXTEDITOR} problem is a result of the way FCK works and that someone, smarter than me, could write a JS for FCK that would allow it to work with lxFetch.

ListX....makes you look brilliant, even though you're not.
adski74
Welterweight
Posts:27

09/02/2008 8:58 AM Alert 
I upgraded to dnn 4.8.4 & could get it the FCK editor to work (THANKS PAULDES) but could not get the default validation to work yet..

1...Anyone happen to know how to get validation to work?

{TEXTEDITOR,frmSummary,frmSummary,,600,400}

<span id="vfrmSummary" controltovalidate="frmSummary" errormessage="<br />*REQUIRED FIELD" display="Dynamic" evaluationfunction="RequiredFieldValidatorEvaluateIsValid" initialvalue="" style="color:Red;display:none;font-weight:bold;"><br />
*REQUIRED FIELD</span>

<a class="CommandButton"if (typeof(Page_SmartValidate) == 'function') return Page_SmartValidate();" language="javascript" {ACTION,"Save","MY_Specials",,Message}>Save</a>

2...Does anyone know if FCK editor has been integrated in to ows to work with 100%.
svedire
Cruiserweight
Posts:107

09/02/2008 3:49 PM Alert 
Hi,

I don't think validation for TextEditor can be done in the usual method. I had a similar situation before and this is what I did.

{TextEditor,fldAddProductDescription,fldAddProductDescription,Form,500,300}
<span id="ReqAddProdDesc"
group = "AddValidate"
class="mystarHidden">Description is a required field
</span>

I used the same group name as the one used for the other fields for validation. I wrote a JS function to validate and this function is placed in the onclick event as a condition.

<input type="button" name="frmAddSave" id="frmAddSave" language="javascript" onclick="if (typeof(Page_SmartValidate) == 'function') if (Page_SmartValidate('AddValidate')) if (LenAddProdDesc()) \{document.getElementById('fldAddProductDescription').value=FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML(); {ACTION,AddProduct,AddProduct,,M,False}\}return false;" value="Save" />

JS function looks like this:

function LenAddProdDesc()
{
var f = FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML();
if (f == '<p> </p>' || f == '')
{ document.getElementById('ReqAddProdDesc').style.display = 'block';
return false;}
else
{return true; }
}

By placing this - document.getElementById('fldAddProductDescription').value=FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML(); - in the onclick event, we get the text entered in the FCKEditor.

Hope this helps.

Thanks,
Sindura
R2integrated
adski74
Welterweight
Posts:27

09/11/2008 7:23 AM Alert 
<div class='NTForums_Quote'>Posted By svedire on 09/02/2008 3:49 PM

Hi,<br><br>I don't think validation for TextEditor can be done in the usual method. I had a similar situation before and this is what I did.<br><br>{TextEditor,fldAddProductDescription,fldAddProductDescription,Form,500,300}<br><span id="ReqAddProdDesc" <br> group = "AddValidate"<br> class="mystarHidden">Description is a required field<br></span><br><br>I used the same group name as the one used for the other fields for validation. I wrote a JS function to validate and this function is placed in the onclick event as a condition.<br><br><input type="button" name="frmAddSave" id="frmAddSave" language="javascript" onclick="if (typeof(Page_SmartValidate) == 'function') if (Page_SmartValidate('AddValidate')) if (LenAddProdDesc()) \{document.getElementById('fldAddProductDescription').value=FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML(); {ACTION,AddProduct,AddProduct,,M,False}\}return false;" value="Save" /><br><br>JS function looks like this:<br><br>function LenAddProdDesc()<br>{<br> var f = FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML();<br> if (f == '<p> </p>' || f == '') <br> { document.getElementById('ReqAddProdDesc').style.display = 'block';<br> return false;}<br> else<br> {return true; }<br>} <br><br>By placing this - document.getElementById('fldAddProductDescription').value=FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML(); - in the onclick event, we get the text entered in the FCKEditor.<br><br>Hope this helps.<br><br>Thanks,<br>Sindura<br>R2integrated </div>
Works great! Thanks Sindura..

For anyone else wishing to validate a FCK Editor field make sure you tick the "include javascript validation" in the general setting of listx.

HERE'S THE CODE:

<script type="text/javascript">
function LenAddProdDesc()
{
var f = FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML();
if (f == '<p> </p>' || f == '' || f == '<p> </p>' || f == '<p></p>')
{ document.getElementById('ReqAddProdDesc').style.display = 'block';
return false;}
else
{return true; }
}
</script>

{TextEditor,fldAddProductDescription,fldAddProductDescription,Form,500,300}
<span id="ReqAddProdDesc"
group = "AddValidate"
style="display:none;color:red;" >*Description is a required field.</span>

<input type="button" name="frmAddSave" id="frmAddSave" language="javascript" onclick="if (typeof(Page_SmartValidate) == 'function') if (Page_SmartValidate('AddValidate')) if (LenAddProdDesc()) \{document.getElementById('fldAddProductDescription').value=FCKeditorAPI.GetInstance('fldAddProductDescription').GetXHTML(); {ACTION,AddProduct,AddProduct,,M,False}\}return false;" value="Save" />

AND I HAVE ATTACHED THE XML FILE:


Attachment: FCK EDITOR WITH VALIDATION.xml

vdelisi
Posts:50

09/23/2008 3:03 AM Alert 
Hi,
using the XML, I receive the error atteched.

I'm using DNN v4.9.0.0 with ListX 1.9.9.9

Thanks
Vincenzo





adski74
Welterweight
Posts:27

10/07/2008 3:55 AM Alert 
Wow..nice error!

I'm using DNN v4.9.0.0 with ListX 1.9.9.9 as well with no problems up my end.

Not sure exactly what you error means, but it looks like there may be something wrong with the fck editors xml file that holds the your styles.

Is this a fresh install of DNN & Listx?

Did you get any errors on install??

Does the fck editor work if you click on the "edit text" link in a text/html module???
csaxena
Lightweight
Posts:16

10/27/2008 6:19 PM Alert 
Do you know how I can get it to display a particular Toolbar in FCK Editor rather than the Basic Toolbar?
Thanks
csaxena
Lightweight
Posts:16

11/07/2008 4:33 PM Alert 
I am seeing a weird behavior with ListX 1.09.9 and DNN 4.9. I have a very simple test form that uses ListX to display a FCKEditor. Attached is the XML file for that ListX (fcktest.xml). I also have a client side Javascript function in the header that is used to validate the text to ensure that some text is entered. The Javascript is attached in fcktest.js. Here is the issue. When I type anything in the editor and click Save the alert("f") in the Javascript returns a blank value and I get the message "Description is a required field". It never hits the "else" condition in the Javascript.
I am also experiencing another error which might be related to the first one.I have integrated NetSpell as the Spell Check for FCKEditor using the Plug-in. When I type the text in FCKeditor and hit the Spell Check button, it goes through and says "Spell Check Complete" and wipes out all the data in the editor, even though there might be data with misspelt words in it. The FCKEditor works fine with Text/HTML Editor. Can anyone please help?

Thanks,
Chhavi

Attachment: fcktest.xml

csaxena
Lightweight
Posts:16

11/07/2008 4:36 PM Alert 
It is not allowing me to upload the JS file, so I am renaming it to fcktest)js.xml.

Thanks,
Chhavi

Attachment: fcktest_js.xml

You are not authorized to post a reply.



ActiveForums 3.6
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation