This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
How can I set "bounds" to be the current element #145
Comments
it is not possible for now. to set this initially, because the element is created on the fly. you can simply try to wrap the quill-editor in another div (without special stylings) and set the bounds to that element. |
is this working for you? |
Sorry I haven't tried yet. I'll let you know. |
I've tried but it doesn't work |
This is the code of the directive var app = angular.module("myModule")
.directive("richEdit", RichEditDirective);
function RichEditDirective() {
return {
restrict: "E",
templateUrl: "views/RichEdit.html",
compile: compile,
scope: true,
};
function compile($element) {
// pass all attributes to the inner ng-quill-editor we're encapsulating
// get the actual dom element from the jqLite object $element
var domElement = $element[0];
var editor = $element.find("ng-quill-editor");
// copy all the attributes to ng-quill-editor
angular.forEach(domElement.attributes, function(attribute) {
editor.attr(attribute.name, attribute.value);
});
editor.attr("bounds", "$element");
// remove all the attributes on current element
while(domElement.attributes.length > 0) {
domElement.removeAttribute(domElement.attributes[0].name);
}
return function($scope, $element) {
$scope.$element = editor[0];
};
}
} |
try the latest release 3.6.0 and pass |
Thank you very much. I've tried and it works! |
jarp, you are right :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In order to fix this issue I need to set "bounds" to the current element.
The text was updated successfully, but these errors were encountered: