Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use inline scripts to render the widget #26

Closed
wants to merge 3 commits into from

Conversation

stefanor
Copy link

@stefanor stefanor commented Jan 31, 2018

Rather than using inline scripts to configure markitup editors, just apply some attributes to the widget, so we can locate it later in the DOM.

This means jQuery doesn't have to be loaded before the MarkItUpWidget is rendered on a page, all scripts can be loaded in the document foot.

Fixes: #25

So that we will function in django admin, when JQUERY_URL is set to None
(because the rest of the site provides a jQuery).
Rather than using inline scripts, just apply some attributes to the
widget, so we can locate it later in the DOM.

This means jQuery doesn't have to be loaded before the MarkItUpWidget or
markitup_editor tag is rendered on a page, all scripts can be loaded in
the document foot.

Fixes: zsiciarz#25
Use multiple TestCases for the widget + template tag variations rather
than auto_preview permutations.
stefanor added a commit to CTPUG/wafer that referenced this pull request Feb 1, 2018
Now that django-markitup doesn't use inline JS any more.

This was my testing commit for zsiciarz/django-markitup#26
@stefanor stefanor closed this Mar 26, 2020
@stefanor stefanor deleted the no-inline-scripts branch March 26, 2020 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inline js makes it impossible to load form media js in page foot
1 participant