Giter Site home page Giter Site logo

Comments (19)

iveoles avatar iveoles commented on June 14, 2024

I just tried again with your demo after installing angular and redactor via bower and I received the same error

from angular-redactor.

TylerGarlick avatar TylerGarlick commented on June 14, 2024

What version of redactor are you using?

from angular-redactor.

TylerGarlick avatar TylerGarlick commented on June 14, 2024

I'm going to close this, unless there is a known bug.

from angular-redactor.

mattymess avatar mattymess commented on June 14, 2024

Why did you close this @TylerGarlick? I'm getting the same error.

If I change line 43 from...

editor = $_element.redactor(options);

to

editor = $('textarea').redactor(options);

...I don't receive the error. Obviously this makes the directive pointless, but I'm just trying to show that there seems to be a bug.

from angular-redactor.

TylerGarlick avatar TylerGarlick commented on June 14, 2024

I'll take a look into it, sorry I thought you all resolved it.

from angular-redactor.

mattymess avatar mattymess commented on June 14, 2024

No worries. I actually just jumped on this issue because I was getting the same error.

Thanks for looking into it.

from angular-redactor.

TylerGarlick avatar TylerGarlick commented on June 14, 2024

What version of redactor are you all using?

from angular-redactor.

mattymess avatar mattymess commented on June 14, 2024

I'm using 8.2.2. I wanted to try it out before buying it and that's the version available in bower.

If I use the version from Redactor's example pages (http://imperavi.com/js/redactor/redactor.js), I get the same error

from angular-redactor.

mattymess avatar mattymess commented on June 14, 2024

It looks like someone else was having the same issue in #7.

If I change $_element to $($_element), it works fine. Perhaps something in angular.element changed, which is what broke it again. I'm using Angular v1.3.0-build.3001+sha.d2f8f25

from angular-redactor.

TylerGarlick avatar TylerGarlick commented on June 14, 2024

There definitely is an issue with 8.2.2 on bower, but I can't duplicate the undefined issue. It seems there is a digest issue going on in that version.

I did verify that these versions work below

AngularJS Versions

  • 1.3.0-beta.18
  • 1.3.0-build.3001+sha.d2f8f25
  • 1.2.2

Redactor

  • 9.2.5
  • 9.2.6

Can someone who's getting this issue give me a complete code sample so I can replicate. I may not spend a lot of time on this sense radactor is paid and they are on version 9.2.6, but I'll do what I can .

from angular-redactor.

raoulus avatar raoulus commented on June 14, 2024

I had the same problem and I solved it by loading jQuery before angular and redactor.

from angular-redactor.

iveoles avatar iveoles commented on June 14, 2024

Sorry I've been MIA from this. I managed to get this working on mine, but it was so long ago I'm not sure what I changed. I'm at work at the moment so I don't have much time. Here is my updated directive, likely hacked and smashed together.

  angular.module('angular-redactor', [])
    .directive("redactor", ['$timeout', function ($timeout) {

return {
      require: "ngModel",
      link: function($scope, elem, attrs, controller) {
          controller.$render = function() {
              elem = $(elem);

              var updateModel = function updateModel(value) {
                scope.$apply(function () {
                  ngModel.$setViewValue(value);
                });
              };

              var options = {
                changeCallback: function() {
                      $scope.$apply( controller.$setViewValue(elem.val()) );
                  }
              };

              var additionalOptions = $scope.redactorOptions;

              var editor;

              angular.extend(options, additionalOptions);

              // put in timeout to avoid $digest collision.  call render() to
              // set the initial value.
              $timeout(function () {
                editor = elem.redactor(options);
              });

          };
      }
  };

}]);

from angular-redactor.

Rosseyn avatar Rosseyn commented on June 14, 2024

It seems to work fine with the latest version of redactor and a current
version of this directive, as long as you include everything. ;)
On Sep 2, 2014 8:27 AM, "Adam Greer" [email protected] wrote:

Sorry I've been MIA from this. I managed to get this working on mine, but
it was so long ago I'm not sure what I changed. I'm at work at the moment
so I don't have much time. Here is my updated directive, likely hacked and
smashed together.

angular.module('angular-redactor', [])
.directive("redactor", ['$timeout', function ($timeout) {

return {
require: "ngModel",
link: function($scope, elem, attrs, controller) {
controller.$render = function() {
elem = $(elem);

          var updateModel = function updateModel(value) {
            scope.$apply(function () {
              ngModel.$setViewValue(value);
            });
          };

          var options = {
            changeCallback: function() {
                  $scope.$apply( controller.$setViewValue(elem.val()) );
              }
          };

          var additionalOptions = $scope.redactorOptions;

          var editor;

          angular.extend(options, additionalOptions);

          // put in timeout to avoid $digest collision.  call render() to
          // set the initial value.
          $timeout(function () {
            editor = elem.redactor(options);
          });

      };
  }

};

}]);


Reply to this email directly or view it on GitHub
#11 (comment)
.

from angular-redactor.

ShashankaNataraj avatar ShashankaNataraj commented on June 14, 2024

Well Im facing this same issue at the moment and Im using bower to download the lib as well! Its actually intermittent! Sometimes, the editor loads fine, other times it gives me this error. Help?

Oh and my jQuery is being loaded before any other lib, so I dont think that should cause a problem.

from angular-redactor.

Rosseyn avatar Rosseyn commented on June 14, 2024

I don't believe the bower version is current, you'll probably need to try
again with the purchased version and its most recent update.

On Tue, Oct 28, 2014 at 6:52 AM, Shashanka Nataraj <[email protected]

wrote:

Well Im facing this same issue at the moment and Im using bower to
download the lib as well! Its actually intermittent! Sometimes, the editor
loads fine, other times it gives me this error. Help?


Reply to this email directly or view it on GitHub
#11 (comment)
.

from angular-redactor.

mattymess avatar mattymess commented on June 14, 2024

@Rosseyn Is right. I bought the cheapest version and it works fine with this library.

from angular-redactor.

jivinivan avatar jivinivan commented on June 14, 2024

I am seeing this as well. As a temporary fix I used $($_element) in place of $_element.

from angular-redactor.

jivinivan avatar jivinivan commented on June 14, 2024

I figured my issue out. Unrelated to this issue. It seems to be working properly now for me.

from angular-redactor.

kotmatpockuh avatar kotmatpockuh commented on June 14, 2024

getting same:

TypeError: undefined is not a function at angular-redactor.js:55 at angular.js:16223 at completeOutstandingRequest (angular.js:4905) at angular.js:5285angular.js:11607 (anonymous function)angular.js:8557 $getangular.js:16226 (anonymous function)angular.js:4905 completeOutstandingRequestangular.js:5285 (anonymous function)

from angular-redactor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.