# HG changeset patch # User duong tam kien # Date 1488298089 -3600 # Node ID 0ed5207089ee55a375c50697bf25ea6ada50a3ce # Parent 376158f6d7606b278ca87f21bd667dcc6be8c5d8 adds formatting (markdown) to annotation description diff -r 376158f6d760 -r 0ed5207089ee src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue --- a/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue Tue Feb 28 17:00:47 2017 +0100 +++ b/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue Tue Feb 28 17:08:09 2017 +0100 @@ -24,7 +24,7 @@
-

{{ description || 'Pas de description' }}

+

{{ descriptionComputed || 'Pas de description' }}

@@ -44,6 +44,9 @@ import TagList from '../tagform/TagList.vue' import _ from 'lodash' + import showdown from 'showdown' + + const converter = new showdown.Converter() var defaults = { title: '', @@ -90,6 +93,9 @@ } }, computed: { + descriptionComputed: function(){ + return converter.makeHtml(this.description); + }, formAction: function() { if (this.annotation) { return this.action.replace(':annotation_guid', this.annotation.annotation_guid);