mediaweb/silverstripe-tinymce4

This package is abandoned and no longer maintained. No replacement package was suggested.

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

Installs: 4 615

Dependents: 1

Suggesters: 0

Security: 0

Stars: 11

Watchers: 10

Forks: 6

Language:JavaScript

Type:silverstripe-module

1.1.8 2018-02-13 09:57 UTC

This package is auto-updated.

Last update: 2023-04-12 16:42:42 UTC


README

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.