-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add frontend editing mixin #302
base: develop
Are you sure you want to change the base?
Conversation
…oject-template into feature-FrontendEditing
@@ -0,0 +1,95 @@ | |||
import tinymce from 'tinymce/tinymce' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is probably a better answer than having a second copy of TinyMCE running on the frontend - we should be able to change TinyMCE settings in a single place (settings/base.py
) rather than two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(The other option is that we have an extremely pared-down version of MCE for small edits - in which case, you can remove most of the plugins that have been loaded.)
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/assets/js/main.js
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/urls.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/models.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/views.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/views.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/views.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/views.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/models.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/views.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/assets/js/frontend-editing/index.js
Outdated
Show resolved
Hide resolved
…le fields into their own templates
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/utils/models.py
Outdated
Show resolved
Hide resolved
{{cookiecutter.repo_name}}/{{cookiecutter.package_name}}/templates/editables/editable_base
Outdated
Show resolved
Hide resolved
model: this.el.dataset.model, | ||
pk: this.el.dataset.pk, | ||
field: this.el.dataset.field, | ||
value: this.el.innerHTML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
innerText might be better.
Still needs: