Closed nishthaatharva closed 3 months ago
[(ngModel)]="editorContent" this is working means when you type and edit data in the editor box does you get the value I got empty string
@sheikh-hassan I am able to bind data in editor but lost the alignment of the text
@nishthaatharva I am unable to bind data using ngModel and onContentChanged can you guide me for this issue you can also see I has also posted a issue
Sorry, but since the issue is produced by a custom module/format and toolbar button i think I can not really help you.
Quilljs only allows known formats with css and inline styling.
Your approach to just paste random HTML will not work, because quilljs is not a plain HTML editor.
It is a wysiwyg editor and only supports basic set of formats out of the box. It will strip everything unknown.
And please never store HTML representation to the database. Therefore quill is using Deltas.
In ngx-quill it would be the object/json representation
@nishthaatharva I am unable to bind data using ngModel and onContentChanged can you guide me for this issue you can also see I has also posted a issue
Just checkout the Demo repo. There you have working examples for many use cases.
While uploading word document if the words are center aligned in word document then after upload it lost the center position.
Below is the code snippets for it and also attached doc image.
<quill-editor [(ngModel)]="editorContent" [theme]="'snow'" [modules]="editorConfig" [placeholder]="placeholder" (onEditorCreated)="onEditorCreated($event)"
};
async uploadFile() { const input = document.createElement('input'); input.setAttribute('type', 'file'); input.setAttribute('accept', '.doc,.docx'); input.click();
}
async handleDOCX(file: File) { try { const htmlContent = await this.docxToHtmlService.convertDocxToHtml(file);
}