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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Howto use the not default providerHowto use the not default provider
Previous
 
Next
New Post
2/17/2006 5:20 AM
 

Hi,

Is there a way to use two different HTMLEditorProviders on one site? I have edited the web.config and added the new provider. However, how can I use the second provider without making it default?

Refering to EditAnnouncements.ascx the <dnn:texteditor> tag is used to place the editor on a page. So I thought I could add a parameter like provider=”…” to it and searched for something like this in “~/controls/TextEditor.ascx”. The code behind this control (DotNetNuke.UI.UserControls.TextEditor) reveals how the provider is actually created:

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
            'CODEGEN: This method call is required by the Web Form Designer
            'Do not modify it using the code editor.

            RichTextEditor = HTMLEditorProvider.HtmlEditorProvider.Instance
            RichTextEditor.ControlID = Me.ID
            RichTextEditor.Initialize()

End Sub

So following the static Instance function I came to:

' dynamically create provider
        Private Shared Sub CreateProvider()
            objProvider = CType(Framework.Reflection.CreateObject("htmlEditor"), HtmlEditorProvider)
        End Sub

        ' return the provider
        Public Shared Shadows Function Instance() As HtmlEditorProvider
            CreateProvider()
            Return objProvider
        End Function

At this point, we are doomed to only get the default provider instance, because CreateObject has not enough parameters to create anything else (Refer to DotNetNuke.Framework.Reflection.CreateObject. Am I missing something or do I really have to modify core files in order to use two providers at the time?

best regards
patrick


PS: I found http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp02182004.asp very useful, it says:
“Features that derive from the various provider base classes should follow the common pattern of supporting a Provider property and Providers collection property that allow the developer to access the default configured provider as well as the other providers specified in configuration.”
How can I access this collection in DNN?

 
New Post
2/20/2006 11:24 AM
 

Anybody?

Or should I move this thread to "Extend it"?

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Howto use the not default providerHowto use the not default provider


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