is it possible to expose the controls from the umbraco backend to users in the frontend?
Eg. I have a property called "description" which is a richtextfield. Can I somehow expose the richtexteditor and the property on my public site ? Or would I have to create my own controls ?
In theory, yes. All of the editor controls, like the richtext editor are all just a bunch of user/server controls. You should be able to include them in front end pages as you would with a normal control. However, you'd have to use the API to pull out the description out and save it back to the page again. The only bit that might break is the links popup, as I think that needs a logged in Umbraco User so it can work out what content/media you have access to. Your best bet would be to write a user control that includes the richtext control and make it into a macro, drop it onto the page and see if it works!
I've had a quick look, and it looks like you can't use the richtext editor (or at least it would be extremely difficult to get it to work). A lot of the other controls you can, the richtext editor, not though. The link/image popups are tied into the logged in Umbraco User, and the buttons for the richtext editor live in the ribbon at the top of the editPage, so it won't work on your front end.
It shouldn't be too hard to use another RichText editor (I've always used CKEdit for this kind of stuff, the richtext editor is a customised version of TinyMCE so you could use that too if you liked). Do you need them to be able to chose images and links like in the back office? If so, you might have to do some custom work to make popups that pull in from Umbraco rather than the file system.
I have also used CKEdit before, but thought it would maybe be better to use tinymce in umbraco.
Just out of curiosity; How would I use one of the other controls (eg. the SimpleEditor). I have another field, which uses the simpleEditor. I have looked through the api, and I can see there is both a SimpleEditorDataType and a SimpleEditorControl, but I cannot figure out how to use them (and if that is the place to look to use the umbraco editorcontrols?). Or would I have to use the CKEditor for this as well?
that is much appreciated :-) I guess using the same controls or building from the same controls as the umbraco backend would ensure a more consistent and maintanable solution, also I would not have to reinvent stuff that has already been made.
Enable editing of properties in frontend
Hi
is it possible to expose the controls from the umbraco backend to users in the frontend?
Eg. I have a property called "description" which is a richtextfield. Can I somehow expose the richtexteditor and the property on my public site ? Or would I have to create my own controls ?
thanks
Thomas
In theory, yes. All of the editor controls, like the richtext editor are all just a bunch of user/server controls. You should be able to include them in front end pages as you would with a normal control. However, you'd have to use the API to pull out the description out and save it back to the page again. The only bit that might break is the links popup, as I think that needs a logged in Umbraco User so it can work out what content/media you have access to. Your best bet would be to write a user control that includes the richtext control and make it into a macro, drop it onto the page and see if it works!
Hi TIm
thanks for the answer. Fetching and saving the data is not a problem, but how can I use the richtext control in my own control?
thanks
Thomas
Hi Thomas,
I've had a quick look, and it looks like you can't use the richtext editor (or at least it would be extremely difficult to get it to work). A lot of the other controls you can, the richtext editor, not though. The link/image popups are tied into the logged in Umbraco User, and the buttons for the richtext editor live in the ribbon at the top of the editPage, so it won't work on your front end.
It shouldn't be too hard to use another RichText editor (I've always used CKEdit for this kind of stuff, the richtext editor is a customised version of TinyMCE so you could use that too if you liked). Do you need them to be able to chose images and links like in the back office? If so, you might have to do some custom work to make popups that pull in from Umbraco rather than the file system.
Hi Tim
I have also used CKEdit before, but thought it would maybe be better to use tinymce in umbraco.
Just out of curiosity; How would I use one of the other controls (eg. the SimpleEditor). I have another field, which uses the simpleEditor. I have looked through the api, and I can see there is both a SimpleEditorDataType and a SimpleEditorControl, but I cannot figure out how to use them (and if that is the place to look to use the umbraco editorcontrols?). Or would I have to use the CKEditor for this as well?
thanks
Thomas
I'll see if I can knock together some examples of using the built in controls over the weekend.
:)
Hi Tim
that is much appreciated :-) I guess using the same controls or building from the same controls as the umbraco backend would ensure a more consistent and maintanable solution, also I would not have to reinvent stuff that has already been made.
thanks again!
best regards
Thomas
is working on a reply...