We are using Umbraco 7.2 with Contour and we want to create our own TinyMCE FieldType so we can post HTML but we are getting into some difficulties. When following the code similar to the link found here : http://our.umbraco.org/forum/umbraco-pro/contour/38385-Custom-Field-Type-in-V3 but we are getting no suitable method found to override. We are inheriting the FieldType as described in the post.
Are there any uptodate examples on how to create a TinyMCE FieldType for Contour?
Thanks for your reply and apologies for the Double Entry - its a bit confusing to where to place these questions.
Regarding the post above, I have seen these types of posts before but cannot find one for the Tiny MCE. Do you know if there is anything available and why I am getting a no suitable method found to override?
I've had a little look at this and I believe the reason why it's working for you is that your using an older version of Contour - I presume you're on the latest version (4 I think).
Anyway I've managed to successfully create a Rich Text Editor for Contour.
Firstly drop the overrides. They don't exist
I've kept it basic for now:
namespace CustomContour
{
public class RichTextEditor : Umbraco.Forms.Core.FieldType
{
[Umbraco.Forms.Core.Attributes.Setting("Rich Text Editor", description = "Rich Text Editor to allow users to submit formatted HTML")]
public string richTextArea { get; set; }
private TextBox txt = new TextBox();
public List
I tried the same things at my end and I am able to save data inside one table e.g employee but when i retrieve data then it's not able to get and set inside tinymce so can any one tell me what could not the problem
here is my form.cshtml
@using Umbraco.Forms.Core
@using Umbraco.Forms.Mvc.Models
@using Umbraco.Forms.Mvc.BusinessLogic
@using Umbraco.Forms.MVC.Extensions
@using Umbraco.Web
@using ClientDependency.Core.Mvc;
Contour custom TinyMCE FieldType
Hi,
We are using Umbraco 7.2 with Contour and we want to create our own TinyMCE FieldType so we can post HTML but we are getting into some difficulties. When following the code similar to the link found here : http://our.umbraco.org/forum/umbraco-pro/contour/38385-Custom-Field-Type-in-V3 but we are getting no suitable method found to override. We are inheriting the FieldType as described in the post.
Are there any uptodate examples on how to create a TinyMCE FieldType for Contour?
Many thanks
Jon
Hi,
Can I ask if this is at all possible?
Jon
Hi Jonanthan,
Please don't double post - It creates too much noice and can lead to unwanted confusion :) http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/60783-Create-TinyMCE-Editor-for-Contour-
That being said, I assume that you are using Umbraco Forms, since you are using Umbraco 7.2. Try to see the documentation about how to extending the Umbraco Forms http://our.umbraco.org/documentation/Products/UmbracoForms/Developer/Extending/ and specific about field types: http://our.umbraco.org/documentation/Products/UmbracoForms/Developer/Extending/Adding-a-Fieldtype
Hope this helps,
/Dennis
Hi,
Thanks for your reply and apologies for the Double Entry - its a bit confusing to where to place these questions.
Regarding the post above, I have seen these types of posts before but cannot find one for the Tiny MCE. Do you know if there is anything available and why I am getting a no suitable method found to override?
Thanks
Jon
Hi Jon,
Can see Anthony are getting the same no suitable method found to override message like you in this thread http://our.umbraco.org/forum/umbraco-pro/contour/27135-country-picker-in-Contour. To it looks like the example is for Umbraco Forms. But I am not a backend developer :-)
Perhaps you can solve it by reading through the thread above.
Hope this helps,
/Dennis
Hi,
Thanks for your reply.
I will wait for a back end developer to answer my question then as I have already read this article.
Thanks
Jon
This is the code that I am using
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Forms.Core;
using Umbraco.Forms.UI;
using Umbraco.Forms.Core.Controls;
using System.Web.UI.WebControls;
using System.Web.UI; using umb = umbraco; using umbraco.editorControls;
namespace CustomContour
{
public class RichTextEditor_ContourFieldType : Umbraco.Forms.Core.FieldType
[Umbraco.Forms.Core.Attributes.Setting("RichTextArea", description = "RichTextArea")] public string richTextArea { get; set; }
}
Hi Jon,
I've had a little look at this and I believe the reason why it's working for you is that your using an older version of Contour - I presume you're on the latest version (4 I think).
Anyway I've managed to successfully create a Rich Text Editor for Contour.
Firstly drop the overrides. They don't exist
I've kept it basic for now:
{ public class RichTextEditor : Umbraco.Forms.Core.FieldType { [Umbraco.Forms.Core.Attributes.Setting("Rich Text Editor", description = "Rich Text Editor to allow users to submit formatted HTML")] public string richTextArea { get; set; } private TextBox txt = new TextBox(); public List
Amazing - many thanks for all your hard work - you are a life saver Thanks again, Jon
Thanks for the nice post ,
I tried the same things at my end and I am able to save data inside one table e.g employee but when i retrieve data then it's not able to get and set inside tinymce so can any one tell me what could not the problem
here is my form.cshtml @using Umbraco.Forms.Core @using Umbraco.Forms.Mvc.Models @using Umbraco.Forms.Mvc.BusinessLogic @using Umbraco.Forms.MVC.Extensions @using Umbraco.Web @using ClientDependency.Core.Mvc;
@model Umbraco.Forms.Mvc.Models.FormViewModel @{ Html.EnableClientValidation(true); Html.EnableUnobtrusiveJavaScript(true); }
@if (Model.SubmitHandled) { if (Model.RenderMode == "full" || Model.RenderMode == "form") {
@Html.Raw(Model.MessageOnSubmit)
} } else { if (Model.RenderMode == "full" || Model.RenderMode == "form") {}
And Inside Views\Partials\Forms\Fieldtypes\FieldType.RichTextEditor.cshtml file below is a code
@model Umbraco.Forms.Mvc.Models.FieldViewModel
is working on a reply...