Permalink
Browse files

Fixing typos and changing license

  • Loading branch information...
1 parent bd4edb8 commit b202c16b9859a21938296cdb31981f7c0f7c0378 @phpnut phpnut committed Feb 17, 2010
Showing with 19 additions and 23 deletions.
  1. +6 −6 README.txt
  2. +5 −6 tests/cases/helpers/tiny_mce.test.php
  3. +8 −11 views/helpers/tiny_mce.php
View
@@ -3,14 +3,14 @@ Copyright 2009 - 2010, Cake Development Corporation
Las Vegas, Nevada 89104
http://cakedc.com
-TinyMce Plugin
+TinyMCE Plugin
-The purpose of placing TinyMce in a plugin is to keep it separate from a themed
+The purpose of placing TinyMCE in a plugin is to keep it separate from a themed
view, the regular webroot or the app in general, which makes it easier to update
and overall follows the idea of keeping the code clean and modular.
-The TinyMce helper is basically just a convenience helper that allows you to use
-php and CakePHP conventions to generate the configuration for TinyMce and as an
+The TinyMCE helper is basically just a convenience helper that allows you to use
+php and CakePHP conventions to generate the configuration for TinyMCE and as an
extra it allows you to load configs.
@@ -20,7 +20,7 @@ There two ways you can use this plugin, simply use the helper or load the editor
$this->Html->script('/tiny_mce/js/tiny_mce/tiny_mce.js', false);
}}}
and placing your own script in the head of the page. Please note that the helper
-will auto add the TinyMce editor script to the header of the page. No need to
+will auto add the TinyMCE editor script to the header of the page. No need to
to that by hand if you use the helper.
== How to use the helper ==
@@ -37,7 +37,7 @@ array.
'theme' => 'advanced'));
}}}
-You can find a list of possible configration keys for TinyMce here
+You can find a list of possible configration keys for TinyMCE here
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration for a list of keys
== Advanced usage of the helper ==
@@ -1,20 +1,19 @@
<?php
/**
- * CakePHP TinyMce Plugin
+ * CakePHP TinyMCE Plugin
*
* Copyright 2009 - 2010, Cake Development Corporation
* 1785 E. Sahara Avenue, Suite 490-423
* Las Vegas, Nevada 89104
*
- * Licensed under The MIT License
+ * Licensed under The LGPL License
* Redistributions of files must retain the above copyright notice.
*
* @copyright 2009 - 2010, Cake Development Corporation (http://cakedc.com)
- * @link http://github.com/CakeDC/TinyMce
- * @package plugins.tags
- * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ * @link http://github.com/CakeDC/TinyMCE
+ * @package plugins.tiny_mce.tests.cases.helpers
+ * @license LGPL License (http://www.opensource.org/licenses/lgpl-2.1.php)
*/
-
App::import('Core', array('View', 'Helper'));
App::import('Helper', array('Html', 'TinyMce.TinyMce'));
View
@@ -1,24 +1,24 @@
<?php
/**
- * CakePHP TinyMce Plugin
+ * CakePHP TinyMCE Plugin
*
* Copyright 2009 - 2010, Cake Development Corporation
* 1785 E. Sahara Avenue, Suite 490-423
* Las Vegas, Nevada 89104
*
- * Licensed under The MIT License
+ * Licensed under The LGPL License
* Redistributions of files must retain the above copyright notice.
*
* @copyright 2009 - 2010, Cake Development Corporation (http://cakedc.com)
- * @link http://github.com/CakeDC/TinyMce
- * @package plugins.tags
- * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ * @link http://github.com/CakeDC/TinyMCE
+ * @package plugins.tiny_mce
+ * @license LGPL License (http://www.opensource.org/licenses/lgpl-2.1.php)
*/
/**
* Short description for class.
*
- * @package plugins.tiny_mce
+ * @package plugins.tiny_mce.views.helpers
*/
class TinymceHelper extends AppHelper {
@@ -60,17 +60,15 @@ public function editor($options = array()) {
if (isset($this->configs[$options])) {
$options = $this->configs[$options];
} else {
- throw new OutOfBoundsException(sprintf(__('Invalid TinyMce configuration preset %s', true), $options));
+ throw new OutOfBoundsException(sprintf(__('Invalid TinyMCE configuration preset %s', true), $options));
}
}
-
$options = array_merge($this->_defaults, $options);
-
$lines = '';
+
foreach ($options as $option => $value) {
$lines .= Inflector::underscore($option) . ' : "' . $value . '",' . "\n";
}
-
$this->Html->scriptBlock('tinyMCE.init({' . "\n" . $lines . '});' . "\n", array(
'inline' => false));
}
@@ -84,6 +82,5 @@ public function editor($options = array()) {
public function beforeRender() {
$this->Html->script('/tiny_mce/js/tiny_mce/tiny_mce.js', false);
}
-
}
?>

0 comments on commit b202c16

Please sign in to comment.