FCKeditor and images

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Alfred

FCKeditor and images

Post by Alfred »

Hi,

I have a problem with inserting images from another server. If I put the image-url (http://www.blah.com/image_1.jpg)  into the "URL" - field, everything seems fine, the picture is shown in the editor-box. After pressing "Submit" or "Apply" the picture is not shown anymore. If I look at the page-source then, the image-url has changed from "http://www.blah.com/image_1.jpg" into "/www.blah.com/image_1.jpg". What can I do?

I am using the actual release of cmsms. If I switch the wysiwyg-editor of and use the normal textarea, evereythingworks fine.

Alfred
Last edited by Alfred on Sat Jan 14, 2006 9:04 am, edited 1 time in total.
Phatmaxx

Re: FCKeditor and images

Post by Phatmaxx »

I have the same problems when inserting images that are not referenced locally.

There is some kind of cmsmadesimple demo site, there insertion of external images (http://www.host.com/path/to/image.jpg) works perfectly..

I have four cmsmadesimple powered sites running but all have the "image insertion bug".

The only thing i can do is to disable fckeditor so i get the lean and mean plaintext field where i see the raw (x)html code that i can edit...

I don't know what to do to fix this, maybe it's just a simple config option i didn't see..
cyberman

Re: FCKeditor and images

Post by cyberman »

Phatmaxx wrote: The only thing i can do is to disable fckeditor so i get the lean and mean plaintext field where i see the raw (x)html code that i can edit...
No, you have also a source code view fck inside to edit plain text ;).
I don't know what to do to fix this, maybe it's just a simple config option i didn't see..
Hmm, perhaps a fck bug ?
Phatmaxx

Re: FCKeditor and images

Post by Phatmaxx »

I thin i'll give Xinha a try.

Thx for your help!
cyberman

Re: FCKeditor and images

Post by cyberman »

Patricia wrote: try the last version of FCKEditor, maybe.
http://dev.cmsmadesimple.org/projects/fckeditorx/
Perhaps Robert should use the last version of FCK  ;):
December 23, 2005 - FCKeditor 2.2 released
the next editor of choice is the great Xinha, one of our devs is extensively working on it atm, maybe in the next release.
Looks IMHO not really good if the editor of cms is changed with every subversion of cms  :-\.
cyberman

Re: FCKeditor and images

Post by cyberman »

Patricia wrote: Why? we are looking for the best one!
The best for you? The best for me? The best for  ???

I think there's not a "best" editor. Every one has other wishes to an editor. IMHO it would be better the user have a choice. The code should be so flexible so many editors can used.

For instance I like to use TinyMCE V2  :) ...
westis

Re: FCKeditor and images

Post by westis »

FCKeditor image path bug
I don't know if MegaBob has done anything for the FCKeditor module for CMSMS, but apparently there was a bug with relative/absolute paths in the previous version of FCKeditor. That is fixed in FCKeditor 2.2 and MegaBob has updated the FCKeditorX module (0.9.10) to use this version of FCKeditor.


Default WYSIWYG editor
About the WYSIWYG editor to distribute with the CMSMS core package. Yes, of course it's better not to change this for every release, which may confuse users. And sure, everyone have different preferences as to which editor is the best one.

On the other side it's better to distribute an editor that as many people as possible like, can customize to their own needs and that is fast to load and outputting XHTML and accessibility compliant code. That's not an easy balancing act.

Personally, though, I think CMSMS 1.0 should have the WYSIWYG that best meets these requirements. V. 1.0 will kind of be the real kick-off for CMSMS, by that time it will be a system that is complete enough for the needs of the users we are aiming at. If we are to change the default WYSIWYG editor it should be for 1.0, I'd say.

One solution would be to include maybe two or three editors with the CMSMS package that the user can choose from. But that would mean more to download and we try to keep the download size to a minimum so that no modules are "in the way" if they are not used anyway. Then users can download modules for whichever extra needs they may have (which will be much easier with the module repository in 1.0).

I can think of two ways we probably should go forward in this issue:

1. Start a new thread where we discuss what WYSIWYG should be the default one in CMSMS 1.0 (something we also will discuss in the Development Team, for which feedback from users is of utmost importance).

2. Have a section somewhere in the documentation where all available WYSIWYG's are described, what they do/not do, what browsers they can be used with, known issues, pros and cons etc. This will make it easier for users to make their own choice. But how would people find this section?

What do you think?

;D
cyberman

Re: FCKeditor and images

Post by cyberman »

westis wrote: On the other side it's better to distribute an editor that as many people as possible like, can customize to their own needs and that is fast to load and outputting XHTML and accessibility compliant code. That's not an easy balancing act.
How I said I love TinyMCE - please look at the description:
Features

    * Easy to integrate, takes only two lines of code.
    * Customizable through themes and plugins.
    * Customizable XHTML 1.0 output. Block invalid elements and force attributes.
    * International language support (Language packs)
    * Multiple browser support, Mozilla, MSIE, FireFox, Opera and Safari (experimental).
    * PHP/.NET GZip compressor, Makes TinyMCE 75% smaller and a lot faster to load.
Especially the gzip compressor makes TinyMCE fast enough for me  :).
One solution would be to include maybe two or three editors with the CMSMS package that the user can choose from. But that would mean more to download and we try to keep the download size to a minimum so that no modules are "in the way" if they are not used anyway.
We live in the third millenium, we have quick internet connections ... So I think the file size should not be the main problem. Please look at typo 3 - it has a size of 17 MB. Many software for computers (security udates, virus updates and so other) I must download every day are bigger than the complete cms distribution.
1. Start a new thread where we discuss what WYSIWYG should be the default one in CMSMS 1.0 (something we also will discuss in the Development Team, for which feedback from users is of utmost importance).
The question is a little bit wrong. We don't ask, what can CMS do with the choosed editor; we should ask, what can the editor do for CMS!

For instance with TinyMCE it's easy to specify if a textarea should be shown with or without the editor (with id). Also it's possible to define in which configuration the editor should started (depended from user permissions). But this must specify in cms source code and should be well documented in developer guide.
2. Have a section somewhere in the documentation where all available WYSIWYG's are described, what they do/not do, what browsers they can be used with, known issues, pros and cons etc. This will make it easier for users to make their own choice.
This would be a good part for documentation.
But how would people find this section?
With a good table of contents or a link from "my preferences - user preferences" in documentation ;)?
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

cyberman wrote:
How I said I love TinyMCE - please look at the description:

.....
Also me love TinyMCE.

Like i love Xinha.

My suggestion is support for CMSMS all 3 WYSIWYG.

But one must be as default, maybe it's good do the poll, a poll only for choose the default editor.

But must be the possibility to have other WYSIWYG.

My vote will TinyMCE like default for cross-over compability reason.
cyberman

Re: FCKeditor and images

Post by cyberman »

megabob3 wrote: But one must be as default, maybe it's good do the poll, a poll only for choose the default editor.
Please look at the last poll (new name for html blob) - userbase: over 1100, readed: over 200, votes: 16  :( - in my opinion this makes no sense.
tamlyn

Re: FCKeditor and images

Post by tamlyn »

westis wrote: FCKeditor image path bug
I don't know if MegaBob has done anything for the FCKeditor module for CMSMS, but apparently there was a bug with relative/absolute paths in the previous version of FCKeditor. That is fixed in FCKeditor 2.2 and MegaBob has updated the FCKeditorX module (0.9.10) to use this version of FCKeditor.
Upgraded as advised but it hasn't fixed my image url problem:

I can upload and browse images using both the image browser and the fck insert image thing. The images are located in /files/images/ and I can insert them into documents as expected. The problem arises when the document is saved: the image url is changed from /files/images/image.jpg to /images/image.jpg I can't work out what's going on...
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote:
westis wrote: FCKeditor image path bug
I don't know if MegaBob has done anything for the FCKeditor module for CMSMS, but apparently there was a bug with relative/absolute paths in the previous version of FCKeditor. That is fixed in FCKeditor 2.2 and MegaBob has updated the FCKeditorX module (0.9.10) to use this version of FCKeditor.
Upgraded as advised but it hasn't fixed my image url problem:

I can upload and browse images using both the image browser and the fck insert image thing. The images are located in /files/images/ and I can insert them into documents as expected. The problem arises when the document is saved: the image url is changed from /files/images/image.jpg to /images/image.jpg I can't work out what's going on...
I  wanna understand :D

tamlyn you have:

$config['uploads_path'] = 'c:\YOUR_PATH/files';
$config['uploads_url'] = 'http://YOUR_URL/files';

and not


$config['uploads_path'] = 'c:\YOUR_PATH/uploads';
$config['uploads_url'] = 'http://YOUR_URL/uploads';

right?

If yes i know what's the matter, and i have to FIX.

By the way here you a faster solution for your case

you have to change FCKeditorX.module.php in this line:

line  302
  have      --> $offsetPath = str_replace( 'uploads', '', $offsetPath );
change in  -> $offsetPath = str_replace( 'files', '', $offsetPath );


line 363
  have      --> $content = str_replace('src="uploads', 'src="'.$offsetPath.'uploads', $content) ;
change in --> $content = str_replace('src="files', 'src="'.$offsetPath.'files', $content) ;



Hope this help. Bye ;)
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

Fixed into SVN.

Now also if the user change the "config.php" destination must be OK.

Tamlyn sorry for inconvenience :D
tamlyn

Re: FCKeditor and images

Post by tamlyn »

Cool thanks for that bob. I've had some real headaches getting firefox to recognise the updated scripts - it seems to cache them even when doing a refresh-bypass-cache (ctrl+f5) so you have to clear the cache, restart and then refresh and even then it doesn't always seem to work. Ah well.
megabob3
Power Poster
Power Poster
Posts: 498
Joined: Sat Jan 08, 2005 11:11 pm

Re: FCKeditor and images

Post by megabob3 »

tamlyn wrote: Cool thanks for that bob. I've had some real headaches getting firefox to recognise the updated scripts - it seems to cache them even when doing a refresh-bypass-cache (ctrl+f5) so you have to clear the cache, restart and then refresh and even then it doesn't always seem to work. Ah well.
Happy :D
Locked

Return to “CMSMS Core”