https://github.com/sourcey/designer
Rich text page designer for Rails applications
https://github.com/sourcey/designer
Last synced: about 1 year ago
JSON representation
Rich text page designer for Rails applications
- Host: GitHub
- URL: https://github.com/sourcey/designer
- Owner: sourcey
- License: mit
- Created: 2018-12-25T13:04:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T10:20:50.000Z (over 3 years ago)
- Last Synced: 2025-02-13T01:41:29.430Z (over 1 year ago)
- Language: Vue
- Size: 621 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Page Designer
Design rich text markdown pages in Rails application.
## Installation
Add the gem to your Gemfile
``
gem 'designer', github: 'sourcey/designer'
```
Run the installation task
```
rake designer:run_installer
```
Add the designer engine to your routes
```
mount Designer::Engine => "/designer"
```
Add `acts_as_designer` to each modal you want to use the designer on
```
acts_as_designer
```
Add designer.yml to your config folder.
Example config/designer.yml
```
---
image_sizes: &image_sizes
- 1920x
- 1280x
- 640x
- 480x
spec: &default_spec
- label: Text
template: text
properties:
text:
type: string
multiline: true
markdown: true
- label: Image
template: image
properties:
image_key:
type: string
caption:
type: string
size:
type: string
enum: *image_sizes
classes:
type: array
custom: true
enum:
- left
- right
- center
- block
- pull
- parallax
- label: Quote
template: quote
properties:
text:
type: string
multiline: true
cite:
type: string
classes:
type: array
custom: true
enum:
- left
- right
- center
- block
- pull
- label: Separator
template: separator
properties:
size:
type: number
articles:
preview_path: /articles/:slug
designer_template_path: /articles/designer
elements_template_path: /articles/elements
spec: *default_spec
projects:
preview_path: /:slug
designer_template_path: /projects/designer
elements_template_path: /projects/elements
spec: *default_spec
```