问题
In my angularjs
application, I'm using angular-ckeditor
directive for CKEditor to get user inputs(Description and comments).
This is my html code to take description;
<div ckeditor="options" ng-model="txtDesc" ng-change="descChange()"></div>
and for comments;
<div ckeditor="options" ng-model="txtComment"></div>
And according to this github article;
Note : obviously this plugin expects the presence of AngularJS and CKEditor.
This is how I'm referring my JS files;
<!-- CK editor -->
<script src="{% static "scripts/angular.js" %}"></script>
<script src="{% static "scripts/ckeditor/ckeditor.js" %}"></script>
<script src="{% static "scripts/angular-ckeditor.js" %}"></script>
It is working fine in normal flow. But when I try to concat all scripts file in one file using gulp-concat
, It throws following errors for both editors;
The editor instance "editor1" is already attached to the provided element.
The editor instance "editor2" is already attached to the provided element.
This is my JS reference after gulp-concat;
<script src="{% static "scripts/scripts.js" %}"></script>
<script src="{% static "scripts/ckeditor/ckeditor.js" %}"></script>
<script src="{% static "scripts/angular-ckeditor.js" %}"></script>
script.js
has angular.js file data with all other js files (Concat all js files in one file). But ckeditor does not get the reference correctly. I tried to concat angular-ckeditor.js
also wihtin scripts.js
file, but it results in same. What can I do to get over this error?
来源:https://stackoverflow.com/questions/49046217/ckeditor-issue-in-gulp-concat