Files @ 1759a07630a8
Branch filter:

Location: symposion_app/pinaxcon/widgets.py

Nick Seidenman (N6)
A few mods to be able to use the runserver site for debugging. We'll back these out once the real
(via apache) site is up and running.
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