Files @ 1ba1a97c4555
Branch filter:

Location: symposion_app/pinaxcon/widgets.py

Sachi King
move templates out of vendor specific locations

Lets not kid ourselves. The whole apps templates are client specific.
Lets just remove that and not think it isn't.
from django import forms


class AceMarkdownEditor(forms.Textarea):

    def render(self, name, value, attrs):
        original = super(AceMarkdownEditor, self).render(name, value, attrs)
        ret = '''
                %s
                <script>
                    window.addEventListener("load", () => {
                        editor = loadEditor("%s");
                    }, 0);
                </script>
        ''' % (original, attrs["id"])

        return ret