Projet

Général

Profil

0002-fields-fix-RichTextField-display-in-formdef-detail-p.patch

Lauréline Guérin, 20 septembre 2022 14:24

Télécharger (1,18 ko)

Voir les différences:

Subject: [PATCH 2/2] fields: fix RichTextField display in formdef detail page
 (#36498)

load Godo after CKEditor, so CKEditor doesn't initialize on Godo fields
that have been added the content-editable attribute
 wcs/qommon/templates/qommon/forms/widgets/mini-rich-text.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
wcs/qommon/templates/qommon/forms/widgets/mini-rich-text.html
5 5
    >{{widget.value|default:""}}</textarea>
6 6
<script type="module">
7 7
import Godo from "/static/xstatic/js/godo.js?{{version_hash}}";
8
new Godo(document.getElementById('form_{{widget.get_name_for_id}}'), {schema: 'basic'});
8
$(() => {
9
    new Godo(document.getElementById('form_{{widget.get_name_for_id}}'), {schema: 'basic'});
10
});
9 11
</script>
10 12
{% endblock %}
11
-