Merge pull request #6412 from G-Chubinidze/gc_SCI_9429

Code sample in RTF on archived results is not highlighted with colors [SCI-9429]
This commit is contained in:
Martin Artnik 2023-10-16 10:25:12 +02:00 committed by GitHub
commit e5a7e2d4ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,6 +106,10 @@
if (this.isNew) {
this.enableEditMode();
}
this.$nextTick(() => {
this.highlightText();
})
},
computed: {
actionMenu() {
@ -167,6 +171,12 @@
this.element.attributes.orderable.name = data.attributes.name
this.element.attributes.orderable.updated_at = data.attributes.updated_at
this.$emit('update', this.element, true)
},
highlightText() {
var textElement = $('.results-list')[0]
if (textElement) {
Prism.highlightAllUnder(textElement)
}
}
}
}