Copied to clipboard

Flag this post as spam?

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


  • skiltz 501 posts 701 karma points
    Oct 14, 2009 @ 09:23
    skiltz
    0

    TinyMCE + Front End

    Anyone have any ideas how to get the TinyMCE Datatype to render on the front end of the website?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 14, 2009 @ 18:29
    Jan Skovgaard
    0

    Hi Skiltz

    I don't think that it is possible in the way you may be thinking.

    The way I see it you have two option. Either use canvas to edit your pages on the frontend or you can use tinymce. If you choose to use tinymce you need to grab the javascript code from here http://tinymce.moxiecode.com/download/full.php (maybe you can even just make a reference for the files used in umbraco?) and then see the examples page on how you set it up http://tinymce.moxiecode.com/examples/full.php

    You simply just need a textarea on your page and then, as far as I recall from the top of my head, tinymce automatically makes an overlay, which enables you to format your text etc.

    If you are using AutoForm or Doc2Form you must be sure that you have set ValidateRequest = false; - For more information please read about it on Rasmus' blog http://lynggaard.nu/2009/02/validaterequest-in-umbraco-v4/ - It has something to do with security when you allow HTML to be submitted.

    Hope this helps.

    /Jan

  • Masood Afzal 176 posts 522 karma points
    Oct 14, 2009 @ 18:32
    Masood Afzal
    1

    umbraco.editorControls.tinyMCE3.webcontrol.TinyMCEWebControl control = new umbraco.editorControls.tinyMCE3.webcontrol.TinyMCEWebControl();
    control.Text = "every thing is possible";
  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Oct 14, 2009 @ 19:37
    Jan Skovgaard
    0

    Ok, so maybe it is possible after all. Thanks for showing Masood :)

  • Masood Afzal 176 posts 522 karma points
    Oct 14, 2009 @ 20:11
    Masood Afzal
    0

    Jan, i have never tested though. I think it will work if appropriate files have been included (as noted by yourself)

    thanks

    Masood

     

  • skiltz 501 posts 701 karma points
    Oct 16, 2009 @ 11:43
    skiltz
    0

    This works but doesn't popupate the umraco tiny mce "theme"

  • Masood Afzal 176 posts 522 karma points
    Oct 16, 2009 @ 12:04
  • Abtin Ghods 19 posts 61 karma points
    Jan 29, 2012 @ 13:39
    Abtin Ghods
    0

    You can also try this

     

     DataTypeDefinition dtf = new DataTypeDefinition({the idea of the datatype, in case of default RichText Editor, -87});

     IDataType dt =  dtf.DataType;

     xPanel.Controls.Add((System.Web.UI.WebControls.WebControl)dt.DataEditor.Editor);

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Jan 29, 2012 @ 22:32
    Jeroen Breuer
    0

    Here's a full example: http://our.umbraco.org/forum/developers/extending-umbraco/6863-Datatype-on-normal-page-or-UserControl?p=1#comment49125

    Don't think it works on the frontend. Still need some Umbraco controls, but it works in a custom section.

    Jeroen

  • 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