Skip to content

SAM-IT/TinyMCE-Placeholder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About Placeholder:

A customizable placeholder plugin for TinyMCE 4. Released under the MIT license.

It can be used to put images as placeholders for tokens into the editor. Looking at the html code produced by TinyMCE, the tokens are visible in their textual form.

When the content of the editor is elaborated by, for example, a server-side script like php, then the tokens can be elaborated, substituted. The tokens managed by this plugin are like this: [!name], where name is be defined into the configuration code of TinyMCE.

Configuration

Into the configuration of TineMCE 'placeholder_tokens' should be declared as an array of objects. Each object can have the following properties:

  • token The token name.
  • title [optional] The text that will be used into the menus.
  • image [optional] The image url that will be used as placeholder.

Example of configuration

tinymce.init({
	plugins: [ "placeholder" ],
	toolbar: "placeholder",
	placeholder_tokens: [
		{ token: "foo", title: "Foo example", image: "images/t_foo.gif" },
		{ token: "placeholder" },
		{ token: "project_path", image: "images/t_project_path.gif" }
	]
});

Changelog:

Version 1.0 - December 01 2013

  • First release

About

A customizable placeholder plugin for TinyMCE 4

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.3%
  • HTML 15.7%