Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorProblem with Multiple instances of FCKEditorProblem with Multiple instances of FCKEditor
Previous
 
Next
New Post
10/10/2007 11:34 AM
 

I have a situation where I have multiple instances of the DNN Text Editor (in this case FCKEditor 1.0.9) on a single module edit page.

To complicate matters I have a tab system (that works via postback not java). Thus for example I have one editor control on one tab and another on a second tab. The second tab is not visible (therefore not in the client HTML).

If I assign some text to each control via the .Text property this works - however when the second tab is made visible by selecting the appropriate button there is no text in the text editor control on the page. In reviewing this I noticed that retrieving the .Text property for the control on the second tab causes an 'Object not set ...' exception.

This leads me to believe that the FCKEditor requires the control to be visible when setting the .Text property?

Has anybody else come across this problem? Is there a problem simply with multiple instances of the control on one page or is it the visibility? I am next going to try assigning the text prior to visibility attributes changing ...

Thanks in advance for any feedback on this ...

 
New Post
10/10/2007 9:54 PM
 

Be sure to follow the ASP .net page life cycle. You must create the controls in the events corresponding to that. Initialize them on the init function, etc.

I have some modules using multiple editors and they are working fine.

Try to explain how your are instantiating the editor. Are you using the .ascx control?.. or creating the editor directly from the provider?

Post more info.


Locopon
Free modules: E-commerce, Complete localization (Portal, page, module settings, skins, etc.), Secure Login, and more
http://dnn.tiendaboliviana.com
 
New Post
10/11/2007 8:03 AM
 

I am using the ascx control - not instantiating. To summarise the ascx, it has the following header to register the control...(nb: dropped the angled brackets so it displays ok)

 


 

"Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"

Table 1 with a texteditor as follows

"dnn:texteditor id="teRaiseNote" runat="server" width="100%" height="350px" cssclass="NPCommonEditFull"/"

Table 2 with a texteditor as follows

"dnn:texteditor id="tePublicNotes" runat="server" width="100%" height="350px" cssclass="NPCommonEditFull"/" 


 

In the code PageLoad routine the code basically goes like

If Not Page.IsPostBack Then

TableA.Visible = True
TableB.Visible = False
teRaiseNote.ChooseRender = False
teRaiseNote.ChooseMode = False
tePublicNotes.ChooseRender = False
tePublicNotes.ChooseMode = False
PutDataInFields()

End If

In the code PutDataInFields() routine the code basically goes like

teRaiseNote.Text = infChangeNote.ScnRaisedNote
tePublicNotes.Text = infChangeNote.ScnRaisedNote

So far so good ... but if I try to collect the tePublicNotes.Text at this point then it causes the exception - seemingly only on the tePublicNotes that would be on the TableB which is hidden but I accept you may not be able to collect this before the text editor cycles.

When running TableA is shown and the text (teRaiseNote) is fine. A button selects to show TableB via a postback which basically simply does

TableB.Visible = True
TableA.Visible = False

But then there is no text in the editor in TableB (tePublicNotes).

So if you can put more than one on a page ok it is either 1) visibility setting? 2) the postback?

Note: You can correctly edit and save the text from all the text editors on the page - it is only when you return and try to load what you saved into the editor that this problem occurs ... and you can still edit correctly the blank editor - you've just lost the previous entry.

I am going to have more of a play with different things - but I am at the end of my project life cycle and this has just cropped up and and trying to establish whether it's a problem I can resolve myself ... under some pressure.

Thanks

Scott

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsFCKeditorFCKeditorProblem with Multiple instances of FCKEditorProblem with Multiple instances of FCKEditor


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out