Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/choptastic/nitrogen_tinymce
TinyMCE plugin elements for the Nitrogen Web Framework
https://github.com/choptastic/nitrogen_tinymce
Last synced: 21 days ago
JSON representation
TinyMCE plugin elements for the Nitrogen Web Framework
- Host: GitHub
- URL: https://github.com/choptastic/nitrogen_tinymce
- Owner: choptastic
- Created: 2014-05-02T01:36:43.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-11T23:05:31.000Z (5 months ago)
- Last Synced: 2024-10-08T15:24:20.167Z (about 1 month ago)
- Language: Erlang
- Size: 519 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TinyMCE for Nitrogen (#tinymce)
A WYSIWYG textarea element for the [Nitrogen Web Framework](http://nitrogenproject.com) using the editor [TinyMCE](http://www.tinymce.com/).
## Installing into a Nitrogen Application
Add it as a rebar dependency by adding into the deps section of rebar.config:
```erlang
{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](https://github.com/nitrogen/nitrogen_core/commit/78eaf4849ebae5bd2895491c98edf717dc9523fc) , which introduced the `#before_postback{}` action).**
Run `make` in your Application. The rest should be automatic.
## #tinymce Usage
```erlang
#tinymce{id=my_html, text=Text},
```## Attributes
+ `plugins` :: string() | binary() - A shortcut attribute for the [plugins](http://www.tinymce.com/wiki.php/Configuration:plugins) configuration options
+ `menubar` :: boolean() - Whether or not to show the menubar.
+ `toolbar1`, `toolbar2`, `toolbar3` :: string() | binary() - A shortcut attribute for the [toolbarN](http://www.tinymce.com/wiki.php/Configuration:toolbar%3CN%3E) 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](http://www.tinymce.com/wiki.php/Configuration). 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](https://raw.githubusercontent.com/choptastic/nitrogen_tinymce/master/priv/readme/preview.png)
## License
Copyright (c) 2014, [Jesse Gumm](http://jessegumm.com)
([@jessegumm](http://twitter.com/jessegumm))MIT License