using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using umbraco.cms.businesslogic.datatype;
using umbraco.editorControls.tinyMCE3;
using umbraco.uicontrols;
using Umbraco.Web.UI.Pages;
namespace CustomModule.BackEnd
{
public partial class productList : UmbracoEnsuredPage
{
TinyMCE mceDescription;
protected override void OnInit(EventArgs e)
{
// Save button
ImageButton save = tabControl.Menu.NewImageButton();
save.Click += save_Click;
save.AlternateText = "Save";
save.ImageUrl = umbraco.GlobalSettings.Path + "/images/editor/save.gif";
// Init TyniMCE for Description
InitTinyMCE(ref mceDescription, phDescription);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// PutTinyMce(ref mceDescription, "tt", phDescription, upnl);
// Load your data from db, disk...
// in this example it is loaded from the session
//txtName.Text = (string)UmbracoContext.Current.HttpContext.Session["txtName"];
//mceDescription.Text = (string)UmbracoContext.Current.HttpContext.Session["mceDescription"];
}
}
void save_Click(object sender, ImageClickEventArgs e)
{
// Save your data to db, disk...
// in this example it is saved in the session
//Umbraco.Web.UmbracoContext.Current.HttpContext.Session["txtName"] = txtName.Text;
//Umbraco.Web.UmbracoContext.Current.HttpContext.Session["mceDescription"] = mceDescription.Text;
}
// TODO: move to a generic tools class
public static void InitTinyMCE(ref TinyMCE control, PlaceHolder ph)
{
DataTypeDefinition d = DataTypeDefinition.GetDataTypeDefinition(-87); // -78 = TinyMCE DataType
control = (umbraco.editorControls.tinyMCE3.TinyMCE)d.DataType.DataEditor;
ph.Controls.Add(control);
// Add TinyMCE controls to menu bar
UmbracoPanel panel = FindParent<UmbracoPanel>(control);
control.ClientIDMode = ClientIDMode.Static;
control.config.Add("umbraco_toolbar_id", panel.Menu.ClientID + "_slh");
panel.Menu.NewElement("div", "umbTinymceMenu_" + control.ClientID, "tinymceMenuBar", 0);
}
// TODO: move to a generic tools class
public static T FindParent<T>(Control control)
where T : class
{
while (control != null)
{
control = control.Parent;
if (control is T)
{
return control as T;
}
}
return null;
}
}
}
it not show it and only found error on console
File could not be found "D:\Source Code\NewUmbracoTest\NewUmbracoTest\umbracoclient\tinymce3\plugins\codemirror\editorplugin_src.js", unable to add it for Gzip compression.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: File could not be found "D:\Source Code\NewUmbracoTest\NewUmbracoTest\umbracoclient\tinymce3\plugins\codemirror\editorplugin_src.js", unable to add it for Gzip compression.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: File could not be found "D:\Source Code\NewUmbracoTest\NewUmbracoTest\umbracoclient\tinymce3\plugins\codemirror\editorpluginsrc.js", unable to add it for Gzip compression.]
umbraco.presentation.plugins.tinymce3.GzipCompressor.AddFile(String path) +138
umbraco.presentation.plugins.tinymce3.GzipModule.ProcessRequest(HttpContext context) +2385
umbraco.presentation.plugins.tinymce3.tinymce3tinymceCompress.PageLoad(Object sender, EventArgs e) +38
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
System.Web.UI.Control.OnLoad(EventArgs e) +95
System.Web.UI.Control.LoadRecursive() +59
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2952
RichTextEditor/tinymce
How to use Datatypes like Richtexteditor in usercontrol or Aspx in Umbraco 7.4 webforms .
iam trying :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productList.aspx.cs" Inherits="CustomModule.BackEnd.productList" MasterPageFile="../masterpages/umbracoPage.Master" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using umbraco.cms.businesslogic.datatype; using umbraco.editorControls.tinyMCE3; using umbraco.uicontrols; using Umbraco.Web.UI.Pages;
namespace CustomModule.BackEnd {
}
it not show it and only found error on console File could not be found "D:\Source Code\NewUmbracoTest\NewUmbracoTest\umbracoclient\tinymce3\plugins\codemirror\editorplugin_src.js", unable to add it for Gzip compression.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: File could not be found "D:\Source Code\NewUmbracoTest\NewUmbracoTest\umbracoclient\tinymce3\plugins\codemirror\editorplugin_src.js", unable to add it for Gzip compression.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: File could not be found "D:\Source Code\NewUmbracoTest\NewUmbracoTest\umbracoclient\tinymce3\plugins\codemirror\editorpluginsrc.js", unable to add it for Gzip compression.] umbraco.presentation.plugins.tinymce3.GzipCompressor.AddFile(String path) +138 umbraco.presentation.plugins.tinymce3.GzipModule.ProcessRequest(HttpContext context) +2385 umbraco.presentation.plugins.tinymce3.tinymce3tinymceCompress.PageLoad(Object sender, EventArgs e) +38 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +95 System.Web.UI.Control.LoadRecursive() +59 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2952
is working on a reply...