Skip to content

choptastic/nitrogen_tinymce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyMCE for Nitrogen (#tinymce)

A WYSIWYG textarea element for the Nitrogen Web Framework using the editor TinyMCE.

Installing into a Nitrogen Application

Add it as a rebar dependency by adding into the deps section of rebar.config:

	{nitrogen_tinymce, ".*", {git, "git://github.com/choptastic/nitrogen_tinymce.git", {branch, master}}}

Using Nitrogen's built-in plugin installer (Requires Nitrogen 2.3.0)

Note: This requires Nitrogen 2.3.0 (or at earliest 78eaf4849 , which introduced the #before_postback{} action).

Run make in your Application. The rest should be automatic.

#tinymce Usage

	#tinymce{id=my_html, text=Text},

Attributes

  • plugins :: string() | binary() - A shortcut attribute for the plugins configuration options

  • menubar :: boolean() - Whether or not to show the menubar.

  • toolbar1, toolbar2, toolbar3 :: string() | binary() - A shortcut attribute for the toolbarN configuration option

  • options :: proplist() - An erlang proplist consisting of additional options to be passed to the init function. See the TinyMCE docs for more options. Example: #tinymce{options=[{resize, false}, {height, 700}]} disables resize and sets an absolute height of 700 pixels.

Default

Without any options specified, this is how the default editor looks:

preview

License

Copyright (c) 2014, Jesse Gumm (@jessegumm)

MIT License

About

TinyMCE plugin elements for the Nitrogen Web Framework

Resources

Stars

Watchers

Forks

Packages

No packages published