
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
TinyMCE is a javascript rich text editor. It is easy to integrate with blogs, cms, messages and mailers.
Plugin uses jrails(jquery) and paperclip plugin for upload support.
./script/plugin install git://github.com/sandipransing/rails_tiny_mce.git
./script/generate rails_tiny_mce_migration
rake db:migrate
./script/plugin install git://github.com/aaronchi/jrails.git
rake rails_tiny_mce:plugins
Above command will copy paperclip, responds_to_parent, will_paginate plugins to vendor/plugins directory.
<%= javascript_include_tag :defaults %>
<%= javascript_include_tiny_mce_if_used %>
<%= tiny_mce if using_tiny_mce? %>
uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:new, :edit])
This AppConfig.default_mce_options is in config/initializers/tiny_mce_plus_config.rb, you could change the setting there
Then append the following to the text area you want to transform into a TinyMCE editor.
:class => "mceEditor"
rake rails_tiny_mce:install
will Install following files:
app
|-- controller
|-- attachments_controller.rb
|-- helpers
|-- remote_link_renderer.rb
|-- models
|-- print.rb
|-- video.rb
|-- views
|-- attachments
|-- _show_attachment_list.html.erb
config
|-- initializers
|-- tiny_mce_plus_config.rb
public
|-- images
|-- tiny_mce
|-- javascripts
|-- tiny_mce
You may custom the config in tiny_mce_plus_config.rb.
Create CRUD for post
./script/generate scaffold post title:string text:description
Run Migrations
rake db:migrate
Add following line to posts_controller.rb
uses_tiny_mce(:options => AppConfig.default_mce_options, :only => [:new, :edit])
Open /views/posts/new.html.erb and /views/posts/edit.html.erb
Modifiy following line
<%= f.text_area :description %> to <%= f.text_area :description, :class => "mceEditor" %>
How to get image from post body
#Add imagepath method in post model def imagepath match = body.match(/img src="(.+)" border/) $1 if match end
And use post.imagepath to get url of image embeded in post content
thats, all
any sugestions? san2821 at gmail.com or sandip at joshsoftware.com released under the MIT license
FAQs
Unknown package
We found that rails_tinymce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.