Skip to content

added new versions of GrapesJS and plugins (0.17.3) #7

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ db.*
TODO.*
example/static/


.vscode/
4 changes: 3 additions & 1 deletion django_grapesjs/admin/grepesjs_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@


class GrapesJsAdminMixin(object):
"""
Admin mixin to work with Django GrapesJS pages
"""
change_form_template = 'django_grapesjs/change_form.html'

6 changes: 3 additions & 3 deletions django_grapesjs/forms/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@

class GrapesJsField(forms.CharField):
'''
Form field with support grapesjs.
Form field with support of grapesjs.
'''

widget = GrapesJsWidget

def __init__(self, default_html=GRAPESJS_DEFAULT_HTML, html_name_init_conf=REDACTOR_CONFIG[BASE],
apply_django_tag=False, validate_tags=False, template_choices=None, *args, **kwargs):
apply_django_tag=False, validate_tags=False, template_choices=None, wysiwyg=True, *args, **kwargs):
super().__init__(*args, **kwargs)

self.widget.default_html = default_html
self.widget.html_name_init_conf = html_name_init_conf
self.widget.apply_django_tag = apply_django_tag
self.widget.template_choices = template_choices
self.widget.wysiwyg = wysiwyg
self.validate_tags = validate_tags

def validate(self, value):
Expand All @@ -35,4 +36,3 @@ def clean(self, value):
value = apply_string_handling(value, 'apply_tag_save')

return super().clean(value)

2 changes: 1 addition & 1 deletion django_grapesjs/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def get_context(self, name, value, attrs):
'html_name_init_conf': self.html_name_init_conf,
'template_choices': self.template_choices,
'apply_django_tag': int(self.apply_django_tag),
'wysiwyg': int(self.wysiwyg),
})

return context

6 changes: 3 additions & 3 deletions django_grapesjs/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

class GrapesJsHtmlField(models.TextField):
"""
Model field with support grapesjs.
Model field with support of grapesjs.

"""
def __init__(self, default_html=GRAPESJS_DEFAULT_HTML, redactor_config=BASE,
apply_django_tag=False, validate_tags=False, template_choices=None, **kwargs):
apply_django_tag=False, validate_tags=False, template_choices=None, wysiwyg=True, **kwargs):
if kwargs.get('choices'):
raise ValueError(
"use 'template_choices' instead of 'choices' in the '%s'" % self.__class__.__name__
Expand All @@ -31,6 +31,7 @@ def __init__(self, default_html=GRAPESJS_DEFAULT_HTML, redactor_config=BASE,
'apply_django_tag': apply_django_tag,
'validate_tags': validate_tags,
'template_choices': template_choices,
'wysiwyg': wysiwyg,
'form_class': GrapesJsField,
'widget': GrapesJsWidget,
}
Expand All @@ -52,4 +53,3 @@ def check_template_choices(self, value):
raise SystemCheckError('\nERROR:\n%s: %s' % (self.__class__.__name__, error_info, ))

return True

32 changes: 1 addition & 31 deletions django_grapesjs/static/css/django_grapesjs/grapes.min.css

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
/*
Copyright (c) 2016, Artur Arseniev
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name "GrapesJS" nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
.gjs-am-assets-cont .gjs-am-asset-image {
border-bottom: none;
float: left;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
/*
Copyright (c) 2016, Artur Arseniev
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name "GrapesJS" nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Class names prefixes */
/* Colors / Theme */
.gjs-clm-tags .gjs-sm-title,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions django_grapesjs/static/js/django_grapesjs/feather-aviary-editor.js

Large diffs are not rendered by default.

Loading