xaraya
(4,275 views)

Misc notes about tinymce

tinymce is an open source browser-based wysiwyg html editor. xartinymce is a module that integrates it into xaraya. These are random notes about setting up and using it.

This little article is fractured, incomplete, and certainly no substitute for the XarTinyMCE documentation, as found on the module's admin pages, the readme (/modules/tinymce/README.TXT) and doc files (modules/tinymce/xarincludes/docs/index.html)

 

Non-GUI Configuration

To configure, copy the file in /modules/tinymce/xartemplates/includes/tinymceconfig.inc into /var/tinymce/tinymceconfig.inc and make your custom changes there.

 

Filebrowser vs iManager

TinyMCE includes multiple ways to insert external images and links into your content.

Filebrowser - directly integrated with TinyMCE, for file browsing and uploading for eg images, links, flash plugins

iManager -

 

Configuring Filebrowser

In TinyMCE configuration, Advanced Theme Options:

  • Check - use integrated Filebrowser
  • Names of Plugins to Load: add advimage, advlink and/or flash plugin
  • if you Build Your Own Layout of toolbar buttons, add "image" button (otherwise it's there by default)

In var/tinymce/tinymceconfig.inc,

$cfg['filebrowser_dir']= 'https://s3.amazonaws.com/vaporbase/uploads/';; //Filebrowser will look for images here and create allowed types directories

Additionally you can constrain the uploads to specific file types and extensions. See tinymceconfig.inc for details.

 

iBrowser, iManager, filebrowser

Built-in file browser for wysiwyg editing mode.

  • load the iBrowser / iManager plug-ins (Advanced Config)
  • add iBrowser / iManager buttons (Advanced Config)
  • setup a var/tinymce/tinymceconfig.inc, edit the config for pathnames etc
  • if you enable file manager, it will be available to those plugins that use it (such as adv-link for attaching files etc.)
  • or adv-image
  • be sure <img> tag is enabled in HTML module

as to which to use, depends on what you are doing..... if just dropping in an image, no fancy popups, masking etc... then adv-image or iBrowser should be fine

if you want pop-ups, masking, croping, adding over/underlays etc.... iManager

I can get browser and manager.... but I can't get advimage with one of those as well
[10:05a] Autocrat: so adv-image... OR ibrowser OR imanager or ibrowser and imanager (so far any ways...)

 

iBrowser / iManager for Dynamic Image Libraries

in tinymceconfig.inc:

$cfg['ilibs_dir'] = array('/mysitehttps://s3.amazonaws.com/vaporbase/uploads/';); // image library path with slashes; absolute to xar root directory - please make sure that the directories have write permissions
$cfg['ilibs_dir_show'] = true; // show main library (true) or only sub-dirs (false)
//You must uncomment the following to get dynamic library creation and scanning
$cfg['ilibs_inc'] = 'scripts/rdirs.php'; // uncomment to allow dynamic file library

 

 

Spell Checking

There are two plug-ins for spell checking: iespell and spellchecker.

As the name suggests, iespell is for Internet Explorer only using the spell checker built into IE. When enabled and in the icon toolbar, the icon only appears when you're using IE.

spellchecker is a more generic, browser-independent spell checker that can use one of several spell check engines, including: aspell and Google. I've never used or tried to install aspell , an open source GNU project, yet.

So Google seemed like the easiest way to go.

To configure spellchecker, edit the file /modules/tinymce/xarincludes/plugins/spellchecker/config.php . Under "Spellchecker class to use" comment out all but the Google one.

Actually, I never did get this working either because the Google service does not seem to work on servers behind a proxy.

Oh well, I guess we're stuck with "spell checking only works under IE" for now.

Note, when you have both iespell and spellchecker icons on the toolbar, the iespell one disappears when not using IE, but the spellchecker one is always there, so under IE you'll have 2 spell check icons.

 

Misc Plug-ins

Don't use the fullpage plugin. (This is not the same as the fullscreen plugin for opening up the editor full screen.) Rather, fullpage creates a stand alone html page, including <head> and <body> tags, etc.

 

 

 

Comments

New Comment

markdown formatting permitted