Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
pluginaweek-tiny_mce_helper
Advanced tools
= tiny_mce_helper
+tiny_mce_helper+ adds helper methods for creating the TinyMCE initialization script.
== Resources
API
Bugs
Development
Source
== Description
TinyMCE is a rich text editor written in Javascript. This helper plugin helps make it easier to validate your code and include the TinyMCE initialization script. It also provides various tasks for installing/updating TinyMCE.
=== Usage
=== Installing TinyMCE
To install TinyMCE, you can use the tiny_mce:install task. This will download the latest version (or one specified by you) from Sourceforge and extract it into your application's public/javascripts folder.
For example, to install the latest version:
$ rake tiny_mce:install (in /my/project) Downloading TinyMCE source... Extracting... Done!
To install a custom version:
$ rake tiny_mce:install VERSION=3.2.2 (in /my/project) Downloading TinyMCE source... Extracting... Done!
If tinymce already exists in your application's public/javascript folder, the rake task will prompt you as to whether or not it should be overwritten:
$ rake tiny_mce:install (in /my/project) TinyMCE already be installed in /my/project/config/../public/javascripts/tiny_mce. Overwrite? (y/n): y Downloading TinyMCE source... Extracting... Done!
=== Updating TinyMCE
If you have already installed TinyMCE and wish to update to the latest version, you can run the tiny_mce:update task. This will overwrite the current TinyMCE installation and WILL NOT prompt you if the folder already exists. For example,
$ rake tiny_mce:update (in /my/project) Downloading TinyMCE source... Extracting... Done!
Like tiny_mce:install, you can also specify a custom version:
$ rake tiny_mce:update VERSION=3.2.2 (in /my/project) Downloading TinyMCE source... Extracting... Done!
=== Updating configuration options
In addition to installing the Javascript source, tiny_mce_helper is also able to validate the options that are passed in to initialize TinyMCE. Since these options can change over time, a configuration file is generated based on information from the TinyMCE wiki. This configuration file contains a list of all of the current possible options that can be specified.
For example, to create a new configuration file:
$ rake tiny_mce:update VERSION=3.2.2 (in /my/project) Downloading configuration options from TinyMCE Wiki... Done!
This will create config/tiny_mce_options.yml. The content of the configuration should look similar to:
=== Uninstalling TinyMCE
Uninstalling TinyMCE will remove the javascript source and the configuration options. To invoke the installation, run the rake task tiny_mce:uninstall.
$ rake tiny_mce:uninstall (in /my/project)
=== Creating TinyMCE script
To create the TinyMCE initialization script:
application.rhtml: <%= tiny_mce_init_script( :theme => 'advanced', :editor_selector => 'rich_text', :content_css => '/stylesheets/tiny_mce_content.css', :editor_css => '/stylesheets/tiny_mce_editor.css', :auto_reset_designmode => true ) %>
will generate the following javascript:
tinyMCE.init({ 'mode' : 'textareas', 'theme' : 'advanced', 'editor_selected' : 'rich_text', 'content_css' : '/stylesheets/tiny_mce_content.css' });
To see additional initialization helpers, see the API for TinyMCEHelper
== Testing
Before you can run any tests, the following gem must be installed:
To run against a specific version of Rails:
rake test RAILS_FRAMEWORK_ROOT=/path/to/rails
Since the rake tasks for installing TinyMCE and updating the configuration options are part of the unit tests, already-downloaded files are included with the plugin. If you want to perform a "live" test which actually downloads the files off the Internet (rather than using the local versions), you must set the LIVE environment variable to true. For example,
rake test LIVE=true
== Dependencies
== References
This plugin provides for the installation and utilization of TinyMCE in Ruby on Rails applications. TinyMCE is a WYSIWYG HTML editing component released under the GNU Public License (GPL) by Moxiecode Systems (http://tinymce.moxiecode.com/).
This plugin was originally created by by Blake Watters blake@near-time.com and later modified by Aaron Pfeifer.
FAQs
Unknown package
We found that pluginaweek-tiny_mce_helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.