dazinator / DnnPackager

Automate the packaging logic for your DotNetNuke projects, deploy to your IIS from within Visual Studio.
20 stars 3 forks source link

Register DNN Web Controls like the TextEditor ? #62

Open bradbamford opened 7 years ago

bradbamford commented 7 years ago

How would one reference a DNN user control like TextEditor that normally is registered by referencing DNN controls folder like so:

<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>    
dazinator commented 7 years ago

In terms of referencing, nothing should change on that front.

However if you want design time support (i.e in the VS designer) then the designer needs to be able to resolve the Dnn controls at design time.

WARNING: It's been a while since I have tried this, but you should be able to copy the control (i.e TextEditor.ascx) from the Dnn website controls folder, into a local folder with the same relative path inside your project.

Then the tag registration that you showed i.e:

<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>    

Should resolve to the local ascx file within your project.

I seem to remember perhaps having to do some more work around this to get this to work - it's been such a long time since I developed Dnn WebForms style that I forget!

dazinator commented 7 years ago

Any joy with this?

bradbamford commented 7 years ago

Thanks, no I wasn't able to get it work and didn't have a lot of time to spend on it. I ended up just initializing the ckeditor via javascript which was enough to do what I needed to do. I may revisit it later when the need arises where I need the specific DNN plugins of the editor.

bradbamford commented 7 years ago

Of note, I did find and example that looked like you could register the controls via namespace instead of pointing to an actual control like shown above. That would work great using DNNPackager. However, I wasn't able to get that to work either, but that may have had something to do with the specific instance of DNN and again I didn't have a lot of time to track down what the issues were. But it looked promising.

see docs link: