Skip to content
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

Move assets out of top-level to prevent conflicts #55

Open
wants to merge 1 commit 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
108 changes: 54 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ In your `application.css.scss`, include the css file:

```css
/*
@import "froala_editor.min";
@import "froala_style.min";
@import "froala/froala_editor.min";
@import "froala/froala_style.min";
@import "font-awesome-sprockets";
@import "font-awesome";
*/
```

If you want to use the dark theme, then you have to include `themes/dark.min.css` file too.
If you want to use the dark theme, then you have to include `froala/themes/dark.min.css` file too.

In your `application.js.coffee`, include the JS file:

```coffeescript
#= require froala_editor.min.js
#= require froala/froala_editor.min.js

$('selector').froalaEditor();
```
Expand All @@ -44,65 +44,65 @@ If you need to use any of the [Available Plugins](https://froala.com/wysiwyg-edi

```coffeescript
# Include other plugins.
#= require plugins/align.min.js
#= require plugins/char_counter.min.js
#= require plugins/code_beautifier.min.js
#= require plugins/code_view.min.js
#= require plugins/colors.min.js
#= require plugins/emoticons.min.js
#= require plugins/entities.min.js
#= require plugins/file.min.js
#= require plugins/font_family.min.js
#= require plugins/font_size.min.js
#= require plugins/fullscreen.min.js
#= require plugins/help.min.js
#= require plugins/image.min.js
#= require plugins/image_manager.min.js
#= require plugins/inline_style.min.js
#= require plugins/line_breaker.min.js
#= require plugins/link.min.js
#= require plugins/lists.min.js
#= require plugins/paragraph_format.min.js
#= require plugins/paragraph_style.min.js
#= require plugins/print.min.js
#= require plugins/quick_insert.min.js
#= require plugins/quote.min.js
#= require plugins/save.min.js
#= require plugins/table.min.js
#= require plugins/special_characters.min.js
#= require plugins/url.min.js
#= require plugins/video.min.js

#= require third_party/embedly.min.js
#= require third_party/image_aviary.min.js
#= require third_party/spell_checker.min.js
#= require froala/plugins/align.min.js
#= require froala/plugins/char_counter.min.js
#= require froala/plugins/code_beautifier.min.js
#= require froala/plugins/code_view.min.js
#= require froala/plugins/colors.min.js
#= require froala/plugins/emoticons.min.js
#= require froala/plugins/entities.min.js
#= require froala/plugins/file.min.js
#= require froala/plugins/font_family.min.js
#= require froala/plugins/font_size.min.js
#= require froala/plugins/fullscreen.min.js
#= require froala/plugins/help.min.js
#= require froala/plugins/image.min.js
#= require froala/plugins/image_manager.min.js
#= require froala/plugins/inline_style.min.js
#= require froala/plugins/line_breaker.min.js
#= require froala/plugins/link.min.js
#= require froala/plugins/lists.min.js
#= require froala/plugins/paragraph_format.min.js
#= require froala/plugins/paragraph_style.min.js
#= require froala/plugins/print.min.js
#= require froala/plugins/quick_insert.min.js
#= require froala/plugins/quote.min.js
#= require froala/plugins/save.min.js
#= require froala/plugins/table.min.js
#= require froala/plugins/special_characters.min.js
#= require froala/plugins/url.min.js
#= require froala/plugins/video.min.js

#= require froala/third_party/embedly.min.js
#= require froala/third_party/image_aviary.min.js
#= require froala/third_party/spell_checker.min.js
```

```css
@import 'plugins/char_counter.min.css';
@import 'plugins/code_view.min.css';
@import 'plugins/colors.min.css';
@import 'plugins/emoticons.min.css';
@import 'plugins/file.min.css';
@import 'plugins/fullscreen.min.css';
@import 'plugins/help.min.css';
@import 'plugins/image_manager.min.css';
@import 'plugins/image.min.css';
@import 'plugins/line_breaker.min.css';
@import 'plugins/quick_insert.min.css';
@import 'plugins/special_characters.min.css';
@import 'plugins/table.min.css';
@import 'plugins/video.min.css';

@import 'third_party/embedly.min.css';
@import 'third_party/spell_checker.min.css';
@import 'froala/plugins/char_counter.min.css';
@import 'froala/plugins/code_view.min.css';
@import 'froala/plugins/colors.min.css';
@import 'froala/plugins/emoticons.min.css';
@import 'froala/plugins/file.min.css';
@import 'froala/plugins/fullscreen.min.css';
@import 'froala/plugins/help.min.css';
@import 'froala/plugins/image_manager.min.css';
@import 'froala/plugins/image.min.css';
@import 'froala/plugins/line_breaker.min.css';
@import 'froala/plugins/quick_insert.min.css';
@import 'froala/plugins/special_characters.min.css';
@import 'froala/plugins/table.min.css';
@import 'froala/plugins/video.min.css';

@import 'froala/third_party/embedly.min.css';
@import 'froala/third_party/spell_checker.min.css';
```

Similar, if you want to use language translation you have to include the translation file.

```coffeescript
# Include Language if needed
#= require languages/ro.js
#= require froala/languages/ro.js
```

Then restart your web server if it was previously running.
Expand Down
16 changes: 8 additions & 8 deletions lib/wysiwyg-rails/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ module Rails
class Engine < ::Rails::Engine
initializer 'froala.assets.precompile', group: :all do |app|
app.config.assets.precompile += %W(
froala_editor.min.js
plugins/*.js
languages/*.js
froala_editor.min.css
froala_style.min.css
plugins/*.css
themes/*.css
froala/froala_editor.min.js
froala/plugins/*.js
froala/languages/*.js
froala/froala_editor.min.css
froala/froala_style.min.css
froala/plugins/*.css
froala/themes/*.css
)
end
end
end
end
end