Sha256: ef0bfe5e13732c8fa2d6e94c99842ce58f71ca42c122f065192b89a3984e8790
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
Revelry::Content === Revelry::Content is a gem for managing admin-editable content within Rails and React applications. # Installation Add it to your gemfile: ```ruby gem 'revelry_core' gem 'revelry_content' ``` and install it: ```shell bundle rails g revelry:core:install rails g revelry:content:install ``` # Configuration The installer makes an initializer in `config/initializer.rb`. You can edit it to customize authentication, authorization or javascript export settings. ## Configuring file uploads Revelry::Content uses [carrierwave](https://github.com/carrierwaveuploader/carrierwave) to store image uploads. You'll want to configure carrierwave appropriately for your app. # Using with React ## Adding Editable Sections with React Revelry::Content is built on React, so you can also directly invoke the React components: ```coffeescript <Rev.Content.EditableText canEdit={true} contentKey="home.headline" /> ``` or ```coffeescript <Rev.Content.EditableImage canEdit={true} contentKey="home.image" /> ``` [More details are availble here](https://github.com/revelrylabs/revelry_content/blob/master/react-components.md) There component will present ONLY the content (with no editor chrome) if out of edit mode, and can be clicked to edit in edit mode (see below). ## Adding the admin controls For admin users, you can present edit buttons and an edit mode top bar to allow entry to edit mode and provide feedback during editing: ```coffeescript <Rev.Content.TopBar /> ``` and ```coffeescript <Rev.Content.EditModeButton /> ``` These do not require any props.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
revelry_content-1.0.0 | README.md |