Copied to clipboard

Flag this post as spam?

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


  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 11, 2010 @ 13:57
    Jeroen Breuer
    0

    TinyMCE on a custom datatype

    Hello,

    I´ve got a custom datatype. The datatype is a usercontrol and has the ´umbraco usercontrol wrapper´ as a rendercontrol. Now I´d like add the TinyMCE editor to this usercontrol. Is this possible and if so does somebody have a good example for me? Thanks in advance!

    Jeroen

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Feb 11, 2010 @ 20:29
    Morten Christensen
    0

    I would recommend taking a look at the source code for umbraco. You will find the TinyMCE datatype in the umbraco.editorControls project.
    This is the class for the Data Type used in umbraco:
    tinyMCE3dataType.cs

    But maybe you can use this "TinyMCEWebControl" directly in your control. Try referencing umbraco.editorControls and adding this control:
    umbraco.editorControls.tinyMCE3.webcontrol.TinyMCEWebControl or umbraco.editorControls.tinyMCE3.TinyMCE

    Just a guess :)

    - Morten

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 12, 2010 @ 14:18
    Jeroen Breuer
    0

    I already looked at the Umbraco source code and also found the TinyMCEWebControl. I succeeded in placing this webcontrol on my page, but all the edit buttons are in textbox and not in the Umbraco menu (like in the datatype). Somehow I need to place the TinyMCE datatype on my custom datatype, but I haven't succeeded in this yet...

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Feb 19, 2010 @ 15:32
    Jeroen Breuer
    0

    I've finally found a way to use the TinyMCE with a custom datatype. I wasn't able to place the TinyMCE datatype on my custom datatype, so I builded my custom datatype into the TinyMCE datatype. I created a class which inhertis from "umbraco.editorControls.tinyMCE3.TinyMCE" and in this class I add my own controls next to the TinyMCE control which is already there. It's not the cleanest solution, but it works!

  • Marc-Anthony Taylor 55 posts 68 karma points
    Dec 19, 2012 @ 10:33
    Marc-Anthony Taylor
    0

    Hi, I am trying to make my own dataType (in fact you have already helped me Jeroen =) that limits the the amount of text/characters that can be entered into the rte. I am fairly new to this so I am struggling a bit. 

    Adapting my char limit control (learned from the video) I have changed the 'DataEditor' so that it inherits from 'umbraco.editorControls.tinyMCE3.TinyMCE' and what I am thinking is that all I really need to do is attach some js to the render function of TinyMCE. Am I heading in the right direction? And can you give me any hints on how I chould save the new dataType to the db? Thanks in advance!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Dec 19, 2012 @ 10:39
    Jeroen Breuer
    0

    Like I already said here it's best to download the source of my email form package. It actually inherits from the TinyMCE datatype and just adds some features to it. Sounds like that is just what you need.

    Jeroen

  • Marc-Anthony Taylor 55 posts 68 karma points
    Dec 19, 2012 @ 10:41
    Marc-Anthony Taylor
    0

    I have done so already, and it is definitely a big help. But I am not trying to make a user control, basically just an overlay.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Dec 19, 2012 @ 10:42
    Jeroen Breuer
    0

    You can add the overlay in the user control. Just remove all the code which you don't need from the user control and add what you need in there :-).

    Jeroen

  • Marc-Anthony Taylor 55 posts 68 karma points
    Dec 19, 2012 @ 10:43
    Marc-Anthony Taylor
    0

    Can I just say that you kind of rock, sir =D

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Dec 19, 2012 @ 10:47
    Jeroen Breuer
    0

    You can thank me by releasing this as a package when it's done ;-).

    Jeroen

  • Marc-Anthony Taylor 55 posts 68 karma points
    Dec 19, 2012 @ 10:49
    Marc-Anthony Taylor
    0

    I definitely will! I'll drop a note here to let you know when I have done so and find out how to add you as a contributor. Cheers =D

  • Michael 63 posts 211 karma points
    Jan 17, 2013 @ 14:54
    Michael
    0

    Hi guys. I am currently working on a custom section. I would like to be able to insert the Richtext editor on my custom .aspx page so the insert macro, image and link all work like in the content section.

    I have been searching the forum without any luck. Do you know of a package that does this so i can see how to implement it?

    I have tried these threads without success:

    http://our.umbraco.org/forum/developers/extending-umbraco/17750-Using-tinyMCE-in-custom-section

    http://our.umbraco.org/forum/developers/extending-umbraco/6922-Use-Umbraco-TinyMCE-Editor-in-Custom-Page

    http://our.umbraco.org/forum/developers/extending-umbraco/6936-Add-the-RichTextEditor-to-TabView

     

    The most is got was the textfield with two links in the bottom :(

    Mabye I am missing something, dunno :)

     

    /Michael

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jan 17, 2013 @ 14:57
    Jeroen Breuer
    0

    This issue might help: http://issues.umbraco.org/issue/U4-1052

    Jeroen

  • Michael 63 posts 211 karma points
    Jan 24, 2013 @ 07:17
    Michael
    0

    Thx Jeroen

    Will give it a try :)

    /Michael

Please Sign in or register to post replies

Write your reply to:

Draft