Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Editor): improve quill 2 support by using getSemanticHTML and adjust list css for version 2, fixes #7061 #7060

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/showcase/doc/editor/QuillDoc.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<DocSectionText v-bind="$attrs">
<p>Editor uses <a href="https://quilljs.com/">Quill</a> editor underneath so it needs to be installed as a dependency.</p>
<p>Editor uses <a href="https://quilljs.com/">Quill</a> editor underneath so it needs to be installed as a dependency. Currently PrimeVue requires version 2 or newer.</p>
</DocSectionText>
<DocSectionCode :code="code" hideToggleCode importCode hideStackBlitz />
</template>
Expand Down
4 changes: 2 additions & 2 deletions packages/primevue/src/editor/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export default {

this.quill.on('text-change', (delta, oldContents, source) => {
if (source === 'user') {
let html = this.$refs.editorElement.children[0].innerHTML;
let html = this.quill.getSemanticHTML();
let text = this.quill.getText().trim();

if (html === '<p><br></p>') {
Expand All @@ -152,7 +152,7 @@ export default {
});

this.quill.on('selection-change', (range, oldRange, source) => {
let html = this.$refs.editorElement.children[0].innerHTML;
let html = this.quill.getSemanticHTML();
let text = this.quill.getText().trim();

this.$emit('selection-change', {
Expand Down
Loading
Loading