Skip to content

kostia/scrivito-medium-editor

Repository files navigation

scrivito-medium-editor

Gem Version

This gem integrates the WYSIWYG JavaScript editor MediumEditor in Scrivito UI.

scrivito-medium-editor

Installation

Add to Gemfile:

gem 'scrivito-medium-editor', require: 'scrivito_medium_editor'

Add to app/assets/javascripts/application.js after scrivito:

//= require scrivito-medium-editor

Add to app/assets/stylesheets/application.css after scrivito:

/*
 *= require scrivito-medium-editor
 */

Usage

Set the MediumEditor as the in-place editor when using scrivito_tag:

<%= scrivito_tag :div, @obj, :body, data: {editor: :medium} %>

You can also override the toolbar options of the MediumEditor:

<%= scrivito_tag :div, @obj, :body, data: {editor: :medium,
      medium_editor_toolbar: {buttons: %w[bold italic underline scrivito_anchor]}} %>

Contributing

  1. Fork it ( https://github.com/kostia/scrivito-medium-editor/merge_tags/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

MediumEditor for Scrivito

Resources

License

Stars

Watchers

Forks

Packages

No packages published