Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fredrik Esseen 610 posts 906 karma points
    Jan 11, 2010 @ 14:48
    Fredrik Esseen
    0

    Using Tinymce public

    Just a thought: Is it possible to use the Tinymce datatype in a usercontrol for external use?

    I was thinking of using the blog package for an intranet where the users dont have to login one more time for creating a blog post.

  • dandrayne 1138 posts 2262 karma points
    Jan 11, 2010 @ 15:41
  • Fredrik Esseen 610 posts 906 karma points
    Jan 13, 2010 @ 16:15
    Fredrik Esseen
    0

    That worked fine :)

    The only problem now that I cant find a solution to is how to connect to the tinymce that I use in the backend. How is that possible? I want to change what icons and what language that should be used..

  • Fredrik Esseen 610 posts 906 karma points
    Jan 15, 2010 @ 11:44
    Fredrik Esseen
    0

    Is it possible to use the tinyMCE3.webcontrol.config to get the config-file from the config folder?

  • daniel_sbbs 33 posts 52 karma points
    Aug 11, 2010 @ 14:53
    daniel_sbbs
    0

    Hi, have you found a solution to this topic, I'm also in need of putting an editor on a page in an non-public page and make it work with umbraco (ie get images from media tree)??

  • Fredrik Esseen 610 posts 906 karma points
    Aug 11, 2010 @ 15:30
    Fredrik Esseen
    0

    Hi!

    Nope, didnt solve it to get the full functionality frpm the backend. But I used some code from this forum app to use the tinymce. But no connection to the media section.

    If you want I can paste the code.

  • daniel_sbbs 33 posts 52 karma points
    Aug 11, 2010 @ 15:38
    daniel_sbbs
    0

    Sure that would be great, if I'll come upp with a solution to the other part I will let you know

  • Fredrik Esseen 610 posts 906 karma points
    Aug 11, 2010 @ 16:15
    Fredrik Esseen
    0

    This is a snippet of the class i use

     

    include following:
    umbraco.cms.businesslogic.web
    umbraco.cms.businesslogic.propertytype

     

    public

     

    partial class CreatePost : System.Web.UI.UserControl

    {

    private ArrayList _dataFields = new ArrayList();

     

    private int _parentId = -1;

     

    private umbraco.editorControls.tinyMCE3.TinyMCE _tinymce = null;

     

     

    protected void Page_Load(object sender, EventArgs e)

    {

     

    if (_tinymce != null)

    {

    umbraco.uicontrols.TabView tabview = GetDashboardPanel();

     

    if (_tinymce.config["umbraco_toolbar_id"] != null)

    _tinymce.config.Remove(

    "umbraco_toolbar_id");

    _tinymce.config.Add(

    "umbraco_toolbar_id", tabview.ClientID + "_tab01layer_menu_sl");

    }

    }

    protected

     

    override void OnInit(EventArgs e)

    {

     

    base.OnInit(e);

     

    // get the blog doctype

    DocumentType blogType = GetBlogPostDocumentType();

     

    // find any blogs within range of the current user

    SetBlogRoot();

     

    if (_parentId <= 0)

    {

    blogpostCreatorNoBlog.Visible =

    true;

    blogpostCreator.Visible =

    false;

    }

     

    else

    {

     

    // hack to make the tagger datatype work as it relys either on id in request collection

     

    // or current page in nodefactory

    SetRequestId(_parentId.ToString());

     

    // load all properties from the first tab

    umbraco.cms.businesslogic.ContentType.TabI contentTab = blogType.getVirtualTabs[0];

     

    foreach (PropertyType pt in contentTab.PropertyTypes)

    {

    umbraco.interfaces.IDataType dt = pt.DataTypeDefinition.DataType;

     

    // test for tinymce - we need to tell it to add icons to the dashboard menu

     

    if (dt.Id == new Guid("{5E9B75AE-FACE-41c8-B47E-5F4B0FD82F83}"))

    {

    _tinymce = (umbraco.editorControls.tinyMCE3.TinyMCE)dt.DataEditor;

    }

    dt.DataEditor.Editor.ID = pt.Alias;

    _dataFields.Add(dt);

    umbraco.interfaces.IData df = pt.DataTypeDefinition.DataType.Data;

    blogpostControls.Controls.Add(

    new LiteralControl(

    "

    new LiteralControl(

    "

    "));

    }

    }

    }

    "\">" + pt.Name + " +

    blogpostControls.Controls.Add(dt.DataEditor.Editor);

    blogpostControls.Controls.Add(

    }

    }
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies