Skip to content

Commit

Permalink
saving file, 3 types of editors, added uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkasyanchuk committed Feb 15, 2020
1 parent 5298783 commit d2ba950
Show file tree
Hide file tree
Showing 324 changed files with 276 additions and 360 deletions.
4 changes: 4 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ test/dummy/db/*.sqlite3-*
test/dummy/log/*.log
test/dummy/storage/
test/dummy/tmp/


*.gem
coverage
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ gemspec
# gem 'byebug', group: [:development, :test]

gem 'pry'
gem 'simple_form'
gem 'simple_form'
gem 'simplecov'
24 changes: 24 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PATH
remote: .
specs:
new_ckeditor (0.1.0)
carrierwave
rails

GEM
Expand Down Expand Up @@ -62,15 +63,29 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
builder (3.2.4)
carrierwave (2.0.2)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
image_processing (~> 1.1)
mimemagic (>= 0.3.0)
mini_mime (>= 0.1.3)
coderay (1.1.2)
concurrent-ruby (1.1.6)
crass (1.0.6)
docile (1.3.2)
erubi (1.9.0)
ffi (1.12.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
image_processing (1.10.3)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand All @@ -80,6 +95,7 @@ GEM
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.4)
mini_magick (4.10.1)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
Expand All @@ -89,6 +105,7 @@ GEM
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.3)
rack (2.2.2)
rack-test (1.1.0)
rack (>= 1.0, < 3)
Expand Down Expand Up @@ -119,9 +136,15 @@ GEM
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
ruby-vips (2.0.17)
ffi (~> 1.9)
simple_form (5.0.2)
actionpack (>= 5.0)
activemodel (>= 5.0)
simplecov (0.18.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-html (0.12.0)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand All @@ -146,6 +169,7 @@ DEPENDENCIES
new_ckeditor!
pry
simple_form
simplecov
sqlite3

BUNDLED WITH
Expand Down
48 changes: 48 additions & 0 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,54 @@ Or install it yourself as:
$ gem install new_ckeditor
```

## Output

### Output RAW HTML from CKEditor

To use same CSS as in editor, to keep consistent UI:

```erb
<p>
<strong>About:</strong>
<div class="ck-content">
<%= raw @user.about %>
</div>
</p>
```
More documentation: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html

## Styling

### CKEditor 5 set min-height, height, width

```css
.ck-editor__editable {
min-height: 500px;
}
```

You can editor in some parent div and set height explicitly for editor inside.

## TODO

- different types of ckeditors
- generator for toolbar
- configuration to specify toolbar
- generator for controller?
- store files using active storage
- store with user_id, and parent?
- readme, samples
- gif with demo
- sample with ajax? and with ballon?
- tests
- CSFR-Token
- support inline editor?
- remove title plugin

## Customization

https://ckeditor.com/ckeditor-5/online-builder/

## Contributing
Contribution directions go here.

Expand Down
6 changes: 0 additions & 6 deletions app/assets/javascripts/new_ckeditor/balloon-block/ckeditor.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit d2ba950

Please sign in to comment.