Comments (3)
I am getting something similar. Just evaluating different HTML Editors and followed the set up instructions. The editor appears but I get this error:
angular.js:13920 TypeError: Cannot read property 'trim' of undefined
at Quill.setHTML (http://localhost:62674/node_modules/quill/dist/quill.js:10527:14)
at g (http://localhost:62674/node_modules/ng-quill/src/ng-quill.min.js:1:2254)
at http://localhost:62674/node_modules/ng-quill/src/ng-quill.min.js:1:4094
at Scope.$emit (http://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js:17932:33)
at . (http://localhost:62674/node_modules/ng-quill/src/ng-quill.min.js:1:4579)
from ng-quill.
@mcblum It looks as the directive does not provide a default for the editors ngModel, the value is undefined and you get the type error (same here).
To solve this, I added an empty string as the initial value and the type error was gone.
If your your ngModel is ng-model="message"
, set:
$scope.message = '';
If you get an async value from a service, you can use $timeout to replace the empty string:
$timeout(function () {
$scope.message = 'Async Test content';
console.log($scope.message);
}, 3000);
from ng-quill.
I fixed this issue in the development branch. Hope @KillerCodeMonkey has time to merge this into master.
from ng-quill.
Related Issues (20)
- Toolbar at the bottom HOT 2
- Hardcoded quill.js link in snow theme HOT 1
- max-length and min-length attributes does not work properly for non-empty model HOT 1
- read-only flag does not work properly HOT 3
- Quill editor content is not equal to ngModel value after pasting unsupported content into quill HOT 6
- Html Tag Attributs Removed HOT 9
- Version Issue HOT 2
- Font-sizes not working HOT 1
- Locks all the events after one successful redirect. HOT 1
- can not display successfully HOT 2
- rel="noopener noreferrer" on links when text is processed with ng-quill HOT 2
- Set Optional Data via Formly HOT 1
- onEditorCreated not updating HOT 1
- Add BSV as donation address. HOT 1
- Came here to deliver kudos HOT 2
- Global event handler HOT 1
- On-Content-Changed event firing on load HOT 3
- Is there a way to initialize the ng-quill content before it is there in the DOM HOT 1
- Any way to focus quill editor onLoad? HOT 2
- 'ng-quill-toolbar' is not a known element HOT 1
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 ng-quill.