TinyMCE 2.0.0

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
stefan

TinyMCE 2.0.0

Post by stefan »

For those interested in the TinyMCE editor: an updated module with the newest TinyMCE version has been released today.

Remarks: the module is quite large, since it contains also contains some documentation and all available language files. At the moment there is no configuration option for the language and it has to be specified manually in TinyMCE.module.php (e.g. insert 'language: "de",'  at line 143). I hope that I can address these issues in the next release.

For changes see changelog below.

Feedback welcome  ;)

Changelog:
UPDATED to version 2.0.5.1 of TinyMCE editor
ADDED compressor module
ADDED plugins:
    - simplebrowser
      a port of the FCKEditor file browser as a TinyMCE plugin
    - cmsmslink
      to insert a link to a page of the CMS
ADDED configuration options:
    - activation/deactivation of compressor module
      (turned on by default)
      remark: some people reported problems with compressor module, so turn
              it off if you encounter problems
              (see tinymce.moxiecode.com/forum)
    - choose CSS-style of editor area
      (default: body style of current page)
    - specify which plugins to use
    - configure toolbar buttons
ADDED permission to prohibit modification of settings by user
ADDED language package
pinthenet

Re: TinyMCE 2.0.0

Post by pinthenet »

I had problems after installing on 0.12.1 - it didn't show up in content editing. I could select TinyMCE as wysiwyg editor and change options but it wouldn't appear until I switched off 'Use TinyMCE compression module'. I also tried uninstalling and even deleting and re-installing. The tiny_mce_gzip.php file seems to be in the right place.

I have successfully used the compressor with previous versions of the module

Otherwise it's very good - I was using TinyFCK but the the cmslink plugin was what I missed compared to FCK.

Is there a plugin to run a tidyHTML or other formatting tool - after using various editors most of may pages' source is very badly formatted - usually no linefeeds or layout at all

John
stefan

Re: TinyMCE 2.0.0

Post by stefan »

pinthenet wrote: I had problems after installing on 0.12.1 - it didn't show up in content editing. I could select TinyMCE as wysiwyg editor and change options but it wouldn't appear until I switched off 'Use TinyMCE compression module'. I also tried uninstalling and even deleting and re-installing. The tiny_mce_gzip.php file seems to be in the right place.

I have successfully used the compressor with previous versions of the module
In the TinyMCE forum I have read about problems with some configurations of servers and browsers - therefore the option to turn it off. Sorry, I can't help further - you may search in the TinyMCE forum.
pinthenet wrote: Is there a plugin to run a tidyHTML or other formatting tool - after using various editors most of may pages' source is very badly formatted - usually no linefeeds or layout at all
You can try the 'Cleanup' button. This should tidy up your HTML code, but I don't have much experience with it. And I don't know if you could incorporate tidyHTML - probably yes, by using the 'cleanup_callback' (see documentation)

If you want to have formatted HTML, add the following line to TinyMCE.module.php:

Code: Select all

tinyMCE.init({
	...
	apply_source_formatting : true
}); 
gordon

Re: TinyMCE 2.0.0

Post by gordon »

Hi There

I have discovered a problem when entering {} cms tags into the content. TinyMCE converts the " into " and similarly for ' to #39;

So Tags like {cms_module ...} do not work.

Anyone any thoughts?

G!
jah
Forum Members
Forum Members
Posts: 147
Joined: Thu Dec 30, 2004 9:09 am
Location: Norway

Re: TinyMCE 2.0.0

Post by jah »

It used to work with single quotes. Anyone tried that?
gordon

Re: TinyMCE 2.0.0

Post by gordon »

single quotes dont work either... Although I now discover all the tags I have tried work without any quotes at all...

I dont know whats changed in this new version though.

G!
gordon

Re: TinyMCE 2.0.0

Post by gordon »

Just done some further testing, but some tags (especially parameter tags) need some sort of quotes to work...

Back to square 1...

G!
stefan

Re: TinyMCE 2.0.0

Post by stefan »

There is indeed a problem with ' and " in TinyMCE. As far as I see, TinyMCE replaces these characters with ''' and '"'. I think they do this to produce valid xhtml (I'm no expert in this regard). Therefore, it is not possible to insert something like {cms_module name='Glossary'}. I see three possibilities to solve this problem, but probably others with more experience have to decide which way to go:

1. Patch CMSms or to be more precise: smarty class (see patch below - however I don't know, if there are side effects due to it)

2. Change the behaviour of TinyMCE to not replace ' and "  (i.e. change tiny_mce.js)

3. Add a save_callback to TinyMCE to replace ''' and '"' accordingly. Basically same strategy as  previous one.

Comments?

Code: Select all

===================================================================
--- Smarty_Compiler.class.php   (Revision 2719)
+++ Smarty_Compiler.class.php   (Arbeitskopie)
@@ -1506,6 +1506,8 @@
      */
     function _parse_attrs($tag_args)
     {
+        $tag_args = str_replace( ''', "'" , $tag_args );
+        $tag_args = str_replace( '"', '"', $tag_args );
 
         /* Tokenize tag attributes. */
         preg_match_all('~(?:' . $this->_obj_call_regexp . '|' . $this->_qstr_regexp . ' | (?>[^"\'=\s]+)
 
pinthenet

Re: TinyMCE 2.0.0

Post by pinthenet »

Regarding the quotes issue - there is a TinyMCE plugin here http://sourceforge.net/tracker/index.ph ... tid=738747
that allows you to insert smarty tags and protects quotes. It also protects smarty tags that are already in a page. Unfortunately each time you run Preview it seems to delete a character after each { & }  :-\

I fixed the compression problem (or it fixed itself) - when I reactivated it this morning it worked! I found some references on the TinyMCE forum about cache/page-reload , so it must have something to do with that.

Thanks for the layout tip.

John
stefan

Re: TinyMCE 2.0.0

Post by stefan »

pinthenet wrote: Regarding the quotes issue - there is a TinyMCE plugin here http://sourceforge.net/tracker/index.ph ... tid=738747
that allows you to insert smarty tags and protects quotes. It also protects smarty tags that are already in a page. Unfortunately each time you run Preview it seems to delete a character after each { & }  :-\
Thanks for the hint of the codeprotect-TinyMCE-plugin. I tested it, but personally I find the solution not optimal (even with a fix for the deletion of the character ;) ). Therefore, I investigated the problem further and implemented a solution (already in svn). I will release a new version of either today or tomorrow.
pinthenet

Re: TinyMCE 2.0.0

Post by pinthenet »

Great News!
I checked with the developer and the fix (line 121 1 instead of 2) is correct - he assumed a 2 character left/right delimiter.

I look forward to the new version
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: TinyMCE 2.0.0

Post by Ted »

I was playing a little bit with svn.  Very nice looking.  Everything seems to work as intended, except that the image browser wasn't showing any of the files in uploads/images...

Keep up the good work!
stefan

Re: TinyMCE 2.0.0

Post by stefan »

Ted wrote: I was playing a little bit with svn.  Very nice looking.  Everything seems to work as intended, except that the image browser wasn't showing any of the files in uploads/images...

Keep up the good work!
Mmhh... strange. I think I need some help regarding this issue. Could you check once again with the latest svn version? Does the filebrowser (e.g. called from link dialog) show any files?

Do others also have the same problem?
pinthenet

Re: TinyMCE 2.0.0

Post by pinthenet »

Finally got time to look at the latest SVN - nice new features!
The file browser looks for files in $root_url/UserFiles then looks for subdirs Images/Files/Media, depending on what you are inserting. Not sure if that's just my setup (I was playing about with FCKEditor & TinyFCK before the new TinyMCE), but I couldn't find the right point to make it use /uploads as the base directory

Also, the '/" problem seems to be fixed - thanks for that too

John
wfunderberg
Forum Members
Forum Members
Posts: 42
Joined: Tue Mar 28, 2006 8:05 pm

Re: TinyMCE 2.0.0

Post by wfunderberg »

So now has this been fixed and which version of cmsms should i download? I ran into this today and it's driving me batty...

thanks
Ted wrote: I was playing a little bit with svn.  Very nice looking.  Everything seems to work as intended, except that the image browser wasn't showing any of the files in uploads/images...

Keep up the good work!
Locked

Return to “Modules/Add-Ons”