Using umbraco data types in frontend website (specifically in usercontrols)
Hi,
I have the need to use the RichTextEditor (TinyMCE) from the umbraco backend in my frontend website. So my question is if it is possible to use the umbraco data types in my own usercontrol?
Using umbraco data types in frontend website (specifically in usercontrols)
Hi,
I have the need to use the RichTextEditor (TinyMCE) from the umbraco backend in my frontend website.
So my question is if it is possible to use the umbraco data types in my own usercontrol?
Best regards
Rasmus
Hi Rasmus,
Yes, it's definitely possible. There are 2 options...
1. The quick way - use Doc2Form, (previously known as AutoForm / AutoFormPlus), create a new doc-type and use that in the Doc2Form macro.
2. Custom code. Requires C# (VB.NET) knowledge... Try taking a look at the Doc2Form source on CodePlex:
http://umbracoext.codeplex.com/sourcecontrol/changeset/view/45140?projectName=umbracoext#97254
Option 1 is definitely quicker to put in place ... and you have the choice of saving the form data as a node and/or emailing it out.
Good luck, Lee.
Thank you
I managed to look through the source code from Doc2Form, and I got the tinyMCE editor in my usercontrol (but without the extra umbraco functions)
DocumentType dtt = DocumentType.GetByAlias("MyDocumentType");
PropertyType pt = dtt.getPropertyType("MyProperty");
IDataType dt = pt.DataTypeDefinition.DataType;
dt.DataEditor.Editor.ID = pt.Alias;
IData df = pt.DataTypeDefinition.DataType.Data;
placeholder.Controls.Add(dt.DataEditor.Editor);
But I've come to another conclusion, and I'm not gonna use it this way anyways.
But thank you very much for your help.
Rasmus
is working on a reply...