Skip to content

Commit

Permalink
fix(summernote): fix summernote airmode issues and double enter or re…
Browse files Browse the repository at this point in the history
…turn
  • Loading branch information
ekowidianto committed Mar 4, 2022
1 parent 8b0c560 commit 4536835
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 197 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ gem 'bootstrap3-datetimepicker-rails'
gem 'bootstrap-select-rails'
gem 'bootstrap_tokenfield_rails'
gem 'twitter-typeahead-rails'
gem 'summernote-rails', git: 'https://github.com/zhuhanming/summernote-rails'
gem 'summernote-rails', git: 'https://github.com/noesya/summernote-rails'

# Using CarrierWave for file uploads
gem 'carrierwave'
Expand Down
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ GIT
specs:
rwordnet (2.0.0)

GIT
remote: https://github.com/noesya/summernote-rails
revision: 6dcff6c2a0e56492dbbcaf0a91ccc5898e6be922
specs:
summernote-rails (0.8.20.1)
railties (>= 3.1)

GIT
remote: https://github.com/raymondtangsc/rails_utils.git
revision: 5c8c0caacf08985ae14c5d007529a09d5f284da0
Expand Down Expand Up @@ -70,13 +77,6 @@ GIT
themes_on_rails (0.4.0)
rails (>= 3.2)

GIT
remote: https://github.com/zhuhanming/summernote-rails
revision: f9b60b93fa12151f390283b9f237ec6181db7a06
specs:
summernote-rails (0.8.20.3)
railties (>= 3.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -751,4 +751,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.2.22
2.2.32
13 changes: 13 additions & 0 deletions app/assets/stylesheets/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,20 @@ table.codehilite {
}

// Summernote defaults
.note-editor,
.note-editor.note-airframe {
border: 1px solid #e4e4e4;
overflow: visible;
}

.note-editor.note-airframe .note-editing-area .note-editable,
.note-editor.note-frame .note-editing-area .note-editable,
.note-editor .note-editing-area .note-editable {
padding: 10px 10px;
color: #000;
}

.note-editor .note-popover .popover-content {
line-height: 2.5;
padding: 5px 0 5px 5px;
}
26 changes: 25 additions & 1 deletion client/app/lib/styles/MaterialSummernote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,37 @@
box-sizing: border-box;
}

.btn {
border-radius: 2px;
cursor: pointer;
display: inline-block;
font-size: 13px;
font-weight: 400;
line-height: 1.42857143;
margin-bottom: 0;
padding: 6px 12px;
text-align: center;
touch-action: manipulation;
user-select: none;
white-space: nowrap;
}

*,
:active,
:focus,
:hover {
outline: 0 !important;
}

.note-editor .note-toolbar .btn,
.note-editor .popover-content .btn,
.note-popover .note-toolbar .btn,
.note-popover .popover-content .btn {
border-radius: 2px !important;
box-shadow: none !important;
height: 35px;
}

.note-editor,
.note-editor.note-airframe {
border: 1px solid #e4e4e4;
Expand All @@ -21,7 +45,7 @@

.note-editor .note-editing-area .note-editable,
.note-editor.note-airframe .note-editing-area .note-editable {
padding: 20px 23px;
padding: 10px;
}
}
// scss-lint:enable ImportantRule MergeableSelector QualifyingElement ColorVariable
Loading

0 comments on commit 4536835

Please sign in to comment.