Copied to clipboard

Flag this post as spam?

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


  • vijay 129 posts 152 karma points
    Dec 21, 2009 @ 14:30
    vijay
    0

    Can i use Umbraco Datatype as Macro

    I want to use data type such as richtext editor as usercontrol so  that end user can apply styles to his text means i want to give admin to add / apply styles to his text by my usercontrol.Can anyone guide me how to implement it.

    Thanks in advance,

    vijay.

     

     

  • Dennis Milandt 190 posts 517 karma points
    Dec 21, 2009 @ 21:57
    Dennis Milandt
    3

    You can't use a DataType as a macro, but you can use the TinyMCE editor shipped with umbraco.

    Download the Moxiecode.TinyMCE.dll from the .NET package in the Other Components section at http://tinymce.moxiecode.com/download.php and add it to umbraco. You can then add the TinyMCE editor to your template like this:

                <TinyMCE:TextArea id="rteTextEditor"
                    theme="advanced"
                    plugins="advimage,media,fullscreen,visualchars,fullscreen,advlink"
                    theme_advanced_buttons1="bold,italic,underline,|,link,unlink,anchor,image,|,bullist,numlist,|,charmap,|,cleanup,removeformat,|,fullscreen"
                    theme_advanced_buttons2=""
                    theme_advanced_buttons3=""
                    theme_advanced_toolbar_location="top"
                    theme_advanced_toolbar_align="left"
                    theme_advanced_path_location="bottom"
                    theme_advanced_resizing="true"
                    InstallPath="/umbraco_client/tinymce3"
                    Width="386"
                    Height="500"
                    runat="server"
                />

    In your codebehind, use the Value property to get the text from the texteditor.

    I hope this helps.

    Kind regards
    Dennis Milandt

  • vijay 129 posts 152 karma points
    Dec 22, 2009 @ 06:09
    vijay
    0

    Hello sir exactly i dont get what you explain i download that .dll file but where to copy in umbraco........Please guide me........thanks in advance.....vijay.

  • Kenneth Solberg 227 posts 418 karma points
    Dec 22, 2009 @ 08:49
    Kenneth Solberg
    0

    Nice Dennis, how does it cope with Media?

  • Dennis Milandt 190 posts 517 karma points
    Dec 22, 2009 @ 11:17
    Dennis Milandt
    0

    @vijay: The dll should be added in tne bin folder in your umbraco installation, and the code example is what you need in your template to add a rich text editor that the visitor can use from your website. In the template codebehind you can use the Value property to get the text in the rich text editor. All this however requires that you have a code behind file for your template, and that you can compile that code to a dll which also needs to be added to the umbraco bin folder.

    @Kenneth: Good question. I never looked into that, but out of the box it's not suported. However, since a media picker for TynyMCE is implemented in umbraco, perhaps that extension can be loaded using the .NET control as well. Worth looking into.

    Kind regards
    Dennis Milandt

Please Sign in or register to post replies

Write your reply to:

Draft