Copied to clipboard

Flag this post as spam?

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


  • Harshit 64 posts 226 karma points
    Nov 08, 2015 @ 14:54
    Harshit
    0

    Extending backoffice-html formating in text area

    Hi,

    I have an backoffice application where i am collecting data and saving it to the DB. I am using textarea for it . I am trying to make it html tag supported. can we do it?or is there any other way of doing it?

    <div class="controls">
                    <textarea class="span10" id="MessageBody" ng-model="Template.MessageBody" rows="10" required >
    
    
                    </textarea>
                </div>
    

    Please help. Regards, Harshit

  • Marc Goodson 2157 posts 14434 karma points MVP 9x c-trib
    Nov 08, 2015 @ 20:12
    Marc Goodson
    100

    Hi Harshit

    I did something similar for the EditorNotes package (http://tooorangey.co.uk/posts/editor-notes-for-umbraco-7/) - You should be able to reutilise the same rich text editor control as the backoffice one.

    <div ng-controller="YourAngularController" class="umb-editor umb-rte">
    <umb-editor model="propertyName"></umb-editor>
    </div>
    

    and then in your angular controller set some configuration

    $scope.propertyName = {
                label: 'Message Body',
                description: 'Enter Template Message Body',
                view: 'rte',
                value: $scope.model.value,
                config: {
                    editor: {
                        toolbar: ["code", "undo", "redo", "cut", "styleselect", "bold", "italic", "alignleft", "aligncenter", "alignright", "bullist", "numlist", "link", "umbmediapicker", "umbmacro", "umbembeddialog"],
                        stylesheets: [],
                        dimensions: {  }
                    }
                }
            };
    

    There is a good blog post by Markus Johansson on it:

    http://www.enkelmedia.se/blogg/2013/12/4/umbraco-7-use-the-rich-text-editor-tinymce-in-a-custom-section.aspx

    regards

    Marc

  • Harshit 64 posts 226 karma points
    Nov 09, 2015 @ 04:10
    Harshit
    0

    Thanks a lot marc. sure i will check it.

  • 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