Spaw Editor For CMSimple

Spaw Editor is a web based in-browser WYSIWYG HTML editor control.

this advantage are :

  • Xhtml Output
  • nice identation in HTML mode
  • Advanced File Manager that allow to:
    • upload, rename, delete file/image/flash:youtube(with plugin)
    • Create, rename, delete folder
  • and all other features as other web based editor

Source : http://www.spaweditor.com

This integration functions with the Official Spaw Editor downloaded directly from the site. All parameters are inside the spaw.php file describe bellow.

About Prototype Library

From the site : « Prototype is a JavaScript Framework that aims to easy development of dynamic web applications.»

I've integrate this library for the saving process with Spaw Editor. I allow to NOT load every time all pictures during working & saving.

I use the version '1.6.0.3'.

Screenshot

ToolBar

version 02/12/2008 : original version + a plugin for saving with standart toolbar

Image Manager

Version

18/01/2009

  • I've fix a bug for IE7 (Many thank, again, for emilio castelluccio). \\Before I use «node.contentDocument.activeElement (but it's only compatible with firefox not IE). Now I use « contentWindow.document.body».
    But sorry for user of IE…I met a problem with Ajax on IE so I disable it for a time only for IE.

16/01/2009

  • Fix a bug when you have a site with more than one language.
    thank to emilio castelluccio for his help & thank to Marek for his comment and finding the bug.

12/01/2009

  • Another bug fixed same as previous but…I'm a bit tired :s. Now all is right.

11/01/2009

  • Fix a little bug. Now when you change the headline from hx to hy I call a form.submit()

29/12/2008

  • Add unEscape function call for compare title

23/12/2008

  • Great! Now I make a mix between submit form and ajax. So I use submit form only if you change title or add a new headline inside your text otherelse I use ajax. * Well, It's my gift for this site. Happy Christmas and Happy New Year :o) 06/12/2008 * Integration of « Prototype » Library for Ajax for fix some problems. 02/12/2008 * I've integrate Ajax technology for saving data so the editor is not reloaded (faster than ever) * If you add/modify a header (h1, H2 or h3), you must refresh your site for seeing change in menu structure!

12/11/2008

  • Add function for adding and removing absolute path for keeping compatibility with other plugin like Thumbnail with effect
  • the version was tested with the original version of CMSimple 3.2 and Spaw Editor 2.0.8.1.

28/10/2008

  • integration inside CMSimple

How to install

  1. Install CMSimple 3.2 (I've tested only with this version)
  2. Copy the folder « Spaw2 » inside your site
  3. Copy spaw.php inside your cmsimple folder
  4. In the SETTINGS seciont, go to « Edit configuration » and set « editor_externa » to the name of your config file. (I've use « spaw »)
+-root
|    +-addons                 <- New folder where I've put « Prototype.js » library
|      +-prototype.js         <- this file help you to make Ajax
|    +-cmsimple               <- Put the file spaw.php here
|    +-content
|    +-downloads              <- the folder must be defined for filemanager (it uploads files & flash)
|    +-images                 <- the folder must be defined for filemanager (it uploads images inside)
|      +-spaw                 <- this folder containt image used with ajax plugin for saving data
|        +-ajax-loader.gif    <- it's the image name used with ajax plugin for saving data
|    +-Spaw                   <- I put the Spaw Editor folder here
|      +-config
|      | +-config.default.php <- if you see this file change it to « config.php »
|      +-plugins              <- this folder is used by spaw for loading all plugins
|        +-extended           <- copy the folder « extended » inside the folder « plugins »

Configuration

For configuring Spaw Editor go the spaw.php inside cmsimple folder…I've let you enougth (I think) comment for you understand.

You can configure :

  • width, height of Editor.
  • Rights access for images folder and downloads folder
  • Rights on file : upload, rename, delete file
  • Restricted type : images, flash, file
  • path for file like images path, file path, …
  • The button « save » is used only with the standard toolbar. So if you want to use the full toolbard you must make some change in spaw.php inside your cmsimple folder. Ask me if you don't know how to do that.

Download

Official Site

Download the Php version from the official site : Official Site

Download the last version of « Prototype » Library : Prototype Library

Version 18/01/2009

You can download Spaw editor (2.0.8.1) + file used by CMSimple for integration there: Spaw In CMSimple with Ajax

You can download only useful files : Only used files

Author

This integration is made by Jaufré Devosse

Discussion

Martin Sereday, 2008/10/31 06:42

The editor is very promissing replacement to oEdit. But something goes either wrong or is not exactly explained in DOCs. Installation is really super simple. But evethohug I made it step by step reading documentaton, and I can upload pictures into the root/images dorectory, a creation of subdirs doesn’t work with me. There is a set of plugins (highslide-, lightboxthumb). These also do not work if SPAW is used as editor. But this may be the question for Treichler.

Marek, 2009/01/13 20:50

Regarding the subdir creation in images directory:

You should check the permitions of the images directory. Works for me

Regarding the lightbox script, etc.:

It seems it’s a conflict between this two scripts.

Marek, 2009/01/13 20:47

I have some problems using this editor on multilanguage CMSimple. I use two languages: LT & EN.

On main language (LT) everything is fine, but on additional something is wrong. I’ve copied the spaw2 dir into the EN directory and it shows up, but unfortunatelly it doesn’t save the changes in EN version. It seems, that somehow the scrips doesn’t stay in the root directory.

Also is it possible to implement the LINKS dropbox, cause sometimes there’s a need to enter link to other page on the site.

Thank You

emilio castelluccio, 2009/01/16 15:14

hello, this solves the problem for the multilanguage:

http://www.icb.cnr.it/~mysony/spaw.php.zip

Jaufré Devosse, 2009/01/16 16:19

@Emilio Thank Emilio,

I will integrate that soon as possible.

@Marek Ok Marek I will look for multi language asap, also.

emilio castelluccio, 2009/01/17 11:09

mmmmm ... it seems that the ‘save’ button does not work with ie7 and vista:

‘page error: node.contentDocument.activeElement is null or not object’

the code seems to be to line 98 of savebutton.js

any ideas?

thanks

Jaufré Devosse, 2009/01/18 18:21

Yes I’ve fix it, many thank it’s one of thousand difference between firefox and IE… I’ve disable Ajax on IE. It does not work currently.

emilio castelluccio, 2009/02/02 16:29

Hi, @Marek this implement the LINKS dropbox in spaw.php (for the moment only in the current language):

...

// code to populate Quick links drop box (only in current language)
         $ilink=array(); //+
         for($i=0;$i<$cl;$i++){$ilink[$sn.'?'.$u[$i]] = $h[$i];} //+
         SpawConfig::setStaticConfigItem("quick_links",$ilink,SPAW_CFG_TRANSFER_SECURE); //+
//--------------------------------------------------------------------------
      // Instanciate the Spaw Editor with good context
      // !!! Do not change "text". It's the name of variable
      // used inside CMS for saving data

...

@Jaufré consider whether you want to include it in your code

regards

Jaufré Devosse, 2009/02/20 10:00

Hi emilio castelluccio,

If you want you can do that. Currently, I’ve no time to update this project so if someone wants update this He can.

I’ll try to put this project on Google Code for synchronize it with SVN but later.

Do not wait for it.

Have a good day

daniel evertsson, 2009/03/20 17:09

what do I have to do to create a save buttom in the toolbar???

Jaufré Devosse, 2009/03/20 18:55

Give me your mail and I tell you how to do that.

I think this section is not appropriate

See you

ammar, 2009/07/15 21:51

how to add the original button and toolbar in the spaw toolbar?i'm planning to adda ll the available toolbars and button..

ammar, 2009/07/15 22:32

and also,how to add the original button such as add page, html code, and so on.. thanx in advanced

by the way,my email is mydcarbo@yahoo.com..

Jaufré Devosse, 2009/08/09 20:52

Sorry but I've no time currently for working at this editor. My advices are to look inside plugin folder for adding button and picture and look in the file «spaw.php» for changing the tool bar.

The documentation on the Spaw site is really helpful.

good luck

editors/spaw_editor.txt · Last modified: 2009/12/03 18:55 (external edit)
Webdesign: NMuD chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0