Copied to clipboard

Flag this post as spam?

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


  • Vinod 22 posts 83 karma points
    Jul 20, 2015 @ 05:21
    Vinod
    0

    Copy data between Rich Text Editor

    Hi,

    I have two rich text editor (Umbraco's default control) and custom check-box in "Membership Tab" (the section "Copy Description" - its a Custom Data Type created via Angular JS) . I was unable to copy the content from RTE-1 to RTE-2.

    While debugging value is getting updated but its not loading in RTE-2. For this after deep analysis I found to include $route.reload(); in the success function but now my issue is after reloading the page is not retaining in First Tab and but my controls are in separate tab called "Membership".

    enter image description here Can someone help me on

    1. How to retain "Membership" tab after copying tab.
    2. I know the above mentioned issue occurred because I used $route.reload();. Is there any way to copy to RTE-2 without refresh Below is the code I am using

       angular.module("umbraco").controller('CopyDescription', function      
       ($route, $scope, $injector, editorState) {
      
      
      $scope.CopyToRTE2 = function () {
          var contentResource = $injector.get('contentResource');
          contentResource.getById(editorState.current.id).then(function (result) {
              result.tabs[3].properties[4].value = "Value New";
              contentResource.save(result, false, [''])
                  .then(function (content) {
                      $route.reload();
                  });
          });
      };});
      
      
        <div ng-controller="CopyDescription">
             <input type="checkbox" ng-click="Disable()" ng-model="Only" />Disable Rich Text Area 2
      <div style="margin-left: 400px; margin-top: -24px;">
          <input type="checkbox" ng-click="CopyToRTE2()" ng-model="All" /> Copy to RTE2
      </div>
      

Please Sign in or register to post replies

Write your reply to:

Draft