Skip to content

Commit

Permalink
chore: set inline editing default to True
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 30, 2024
1 parent 07a0d82 commit a028e0f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion djangocms_text/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
TEXT_PLUGIN_NAME = getattr(settings, "TEXT_PLUGIN_NAME", _("Text"))
TEXT_PLUGIN_MODULE_NAME = getattr(settings, "TEXT_PLUGIN_MODULE_NAME", _("Generic"))

TEXT_INLINE_EDITING = getattr(settings, "TEXT_INLINE_EDITING", False)
TEXT_INLINE_EDITING = getattr(settings, "TEXT_INLINE_EDITING", True)
TEXT_CHILDREN_ENABLED = getattr(settings, "TEXT_CHILDREN_ENABLED", True)
TEXT_CHILDREN_WHITELIST = getattr(settings, "TEXT_CHILDREN_WHITELIST", None)
TEXT_CHILDREN_BLACKLIST = getattr(settings, "TEXT_CHILDREN_BLACKLIST", [])
18 changes: 10 additions & 8 deletions djangocms_text/static/djangocms_text/css/cms.normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,19 @@ body.change-form .cms-editor-inline-wrapper.fixed {
border-radius: 0 !important;
line-height: 1.5 !important;
h1, h2, h3, h4, h5, h6, p {
margin: 0 0 0.8rem 0 !important;
padding: 0;
border: 0;
color: inherit;
background: inherit;
line-height: 1.5;
margin: 0 0 0.8rem 0 !important;
}
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
}
h1, h2, h3, h4, h5, h6, p {
h1, h2, h3, h4, h5, h6, p {
margin: 0;
margin-bottom: 1em;
border: none;
padding: 0;
line-height: 1.5;
color: inherit;
background: inherit;
}
h1 {
font-size: 1.7rem !important;
Expand All @@ -51,7 +48,7 @@ body.change-form .cms-editor-inline-wrapper.fixed {
border-radius: 4px !important;
font-size: 1rem !important;
}
h1 {
h1 {
font-size: 1.7rem;
}
h2 {
Expand Down Expand Up @@ -98,3 +95,8 @@ body.change-form .cms-editor-inline-wrapper.fixed {
border-inline-start: 0.3em solid var(--dca-gray-lighter, var(--border-color, #ddd));
}
}

body.change-form .field-body .flex-container {
margin: 0;
background-color: var(--dca-white, var(--body-bg, #fff));
}
2 changes: 2 additions & 0 deletions private/js/cms.linkfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class LinkField {
this.form = element.closest("form");
this.selectElement = this.form.querySelector(`input[name="${this.urlElement.id + '_select'}"]`);
if (this.selectElement) {
this.urlElement.setAttribute('type', 'hidden'); // Two input types?
this.selectElement.setAttribute('type', 'hidden'); // Make hidden and add common input
this.prepareField();
this.registerEvents();
}
Expand Down

0 comments on commit a028e0f

Please sign in to comment.