Skip to content

TheCelavi/dmTinyMcePlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dmTinyMcePlugin

dmTinyMcePlugin is a Diem plugin that implements TinyMCE - Javascript WYSIWYG Editor. This plugin is port of dmCkEditorPlugin by Thibault Duplessis, borrows some code from it and have very similar features.

##TinyMCE on admin form As you would do for a markdown field, precise in the schema.yml that the field is managed by TinyMCE:

Post:
  columns:
    body:    { type: clob, extra: tinymce }

##TinyMCE as a front widget The plugin installs HTML content widget, available in front Add menu.

##Configure TinyMCE You can pass options to the javascript editor. config/dm/config.yml

[code]
all:

tinymce:

config:
  content_css: "themeCoolWater/css/typography.css"
  theme_advanced_buttons1: "cut,copy,paste,pastetext,pasteword,|,undo,redo,|,link,unlink,anchor,image,media,|,fullscreen,code,cleanup,styleprops"
  theme_advanced_buttons2: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,bullist,numlist,outdent,indent"
  theme_advanced_buttons3: ""

[/code]

To configure TinyMCE for the whole project, use config/dm/config.yml. For the front application only, apps/front/config/dm/config.yml. For the admin application only, apps/admin/config/dm/config.yml.

TinyMCE is not distributed with this plugin, you need to download it and extract to web/js/tiny_mce/ folder.

You can find out how to configure TinyMCE on TinyMCE wiki

Location of TinyMCE library can be configured in config/dm/config.yml:

[code]
all:

tinymce:

path: "/js/custom/folder/tiny_mce.js"

[/code]