Comments (19)
I just tried again with your demo after installing angular and redactor via bower and I received the same error
from angular-redactor.
What version of redactor are you using?
from angular-redactor.
I'm going to close this, unless there is a known bug.
from angular-redactor.
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.
I'll take a look into it, sorry I thought you all resolved it.
from angular-redactor.
No worries. I actually just jumped on this issue because I was getting the same error.
Thanks for looking into it.
from angular-redactor.
What version of redactor are you all using?
from angular-redactor.
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.
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.
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.
I had the same problem and I solved it by loading jQuery before angular and redactor.
from angular-redactor.
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.
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.
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.
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.
@Rosseyn Is right. I bought the cheapest version and it works fine with this library.
from angular-redactor.
I am seeing this as well. As a temporary fix I used $($_element)
in place of $_element
.
from angular-redactor.
I figured my issue out. Unrelated to this issue. It seems to be working properly now for me.
from angular-redactor.
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)
- Imagemanager loaded but not showing the icon in the editor, no errors in console either HOT 1
- Error: No such method "code.set" for Redactor HOT 3
- Content isn't loaded in the editor HOT 1
- How to hook into callbacks like init, upload, start etc? HOT 2
- this.block.setAttribute is not a function
- Do you guys have changing to Redactor 2 ? Can't make it work in latest version. Ng-model isn't updated HOT 5
- Appended elements not removed from the DOM when changing application states HOT 2
- Plugins HOT 1
- Problem with Just Attribute HOT 1
- using angular-redactor with clickToEdit in div
- API method Toolbar set to false don't show the content of the ng-model
- Plugins not showing anymore HOT 1
- toggle toolbar
- Using ng-click or ng-change on a clip
- Minor bug - console errors
- ngModel's value is not updating in html mode in Redactor II HOT 2
- Font operations issue in Chrome browser
- Redactor3 - angular-redactor-3.js
- XSS Vulnerability Discovered
- XSS Vulnerability of Redactor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-redactor.