This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Allows Ajax content load #4
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The way this is currently working, it's expecting that the contents for
the editor will be provided so that the editor can be loaded with them
when the component is ready in the DOM. In my use case, however, I
needed to load the contents asynchronously. These changes allow for that
by an explicit Vue watcher on the content property. It only communicates
property changes to the editor if they are not equal to what the editor
currently has; a not so elegant way to see where the changes are coming
from: the editor itself or changes to the component's content property
from outside the component.
The set-html event is a possible way to accomplish this. I just didn't want to have to create a function on my parent component for each of the Quill editors that I wanted on my page.