저는 AngularJS 용 Quil 버전 인 ngQuill을 사용하고 있습니다. 이미 작성된 HTML을 편집기에 넣거나로드하는 방법이 있는지 알아야합니다.ngQuill (Quill Editor)에 html 파일을 어떻게로드합니까?
설명서에서 문제가 발견되지 않습니다. 언제나처럼
, 불쌍한 내 영어에 대한 유감 : 제가 각도에 도움이되지 수
$scope.message = 'Welcome to the Editor!';
$scope.showToolbar = true;
$scope.translations = angular.extend({}, ngQuillConfig.translations, {
10: 'smallest'
});
$scope.toggle = function() {
$scope.showToolbar = !$scope.showToolbar;
};
// Own callback after Editor-Creation
$scope.editorCallback = function (editor, name) {
console.log('createCallback', editor, name);
};
$scope.readOnly = false;
$scope.isReadonly = function() {
return $scope.readOnly;
};
$scope.clear = function() {
return $scope.message = '';
};
// Event after an editor is created --> gets the editor instance on optional the editor name if set
$scope.$on('editorCreated', function (event, editor, name) {
console.log('createEvent', editor, name);
});
$timeout(function() {
$scope.message = 'Async Test Content';
console.log($scope.message);
}, 3000);
<ng-quill-editor
\t id="editor1"
\t name="editor1"
\t callback="editorCallback(editor, name)"
\t ng-model="message"
\t translations="translations"
\t toolbar="true"
\t show-toolbar="showToolbar"
\t link-tooltip="true"
\t image-tooltip="true"
\t toolbar-entries="font size bold list bullet italic underline strike align color background link image"
\t editor-required="true"
\t required=""
\t read-only="isReadonly()"
\t error-class="input-error"
\t fontsize-options="fontsizeOptions"
\t fontfamily-options="fontfamilyOptions">
</ng-quill-editor>