Skip to content

helpfulrobot/mediaweb-silverstripe-tinymce4

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

silverstripe-tinymce4

Replaces the default Silverstripe HTMLEditor (TinyMCE v3) with TinyMCE v4.

Screenshop

Usage

  • HtmlEditorConfig is replaced with CustomHtmlEditorConfig
  • HtmlEditorField is replaced with CustomHtmlEditorField

When using this module, beware: using HTMLEditorField will probably break the admin. Replace all occurences with CustomHTMLEditorField.

There are two use cases:

  1. Using automatic scaffolding (scaffoldFormField):
	private static $db = array(
		'CustomContent' => 'CustomHTMLText'
	)
  1. Using updateCMSFields or getCMSFields:
	public function getCMSFields() {
		$fields = parent::getCMSFields();

		$fields->insertAfter(
			CustomHTMLEditorField::create('CustomContent', 'Custom Content')->addExtraClass('stacked'),
			'Content'
		);

		return $fields;
	}

Note: Be sure to allow access to 'thirdparty/tinymce/tiny_mce_gzip.php'; a .htaccess file is added, some extra configuration is required when using Nginx.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 65.9%
  • PHP 32.9%
  • Other 1.2%