WYSIWYG file manager/image editor (FCK/TinyMCE)

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/25/2009 10:43:22 AM
Gravatar
Total Posts 195

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

Hello, back on this task. I made some modifications to the MCEFileDialog.aspx (file explorer) and wanted to get your feedback. Here's a screen shot:
http://www.proactivedesign.net/_admin/upload-area/files/mojoportal/file-manager/file-manager-preview.gif

And here's the new .aspx file you could download: (it goes in the /dialog/ folder within mojo)
http://www.proactivedesign.net/_admin/upload-area/files/mojoportal/file-manager/MCEFileDialog.zip

What I've done:

  1. Images are limited to a fixed width and height. Smaller images still display at their true size, but larger (say 900px) images only display at 450px for example. Makes previewing nicer I think. A lot of users are stupid and upload 300dpi images (sigh).
  2. I also modified the interface a little and added some instructions.
  3. For selecting a file I just list the path without the form field showing, seems cleaner.

Note: See how I have the "delete this file" link? That doesn't actually work right now....but maybe someone with programming knowledge could help here. I would think we could grab the file path at this preview point and then delete the file. I confirmation box would be nice (are you sure you want to delete). This would at least allow file deletion which I feel is critical.

Thoughts?

8/25/2009 11:31:07 AM
Gravatar
Total Posts 18439

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

That looks really nice! I just downloaded your zip and will consider integrating your changes as soon as I get a chance.

Best,

Joe

8/25/2009 11:34:12 AM
Gravatar
Total Posts 18439

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

I guess my only mixed feeling is that if the user uploads a huge file and then visually it looks right sized it doesn't tell them there is a problem to use this file. Ultimately we do need smart automatic image resizing. My original thought was that they would see it was too big and needed to be resized before using it in a web page.

8/25/2009 11:53:04 AM
Gravatar
Total Posts 195

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

lol, you're giving my users WAY too much credit. I've literally seen 2000x2000pixel images loaded on client sites with their CMS. They just scale the image down to postage stamp size and think it's good. The page takes minutes to load as you watch the images download bit by bit, lol. And honestly, 90% of my end users do this, I never see images formatted correctly for the web. They just upload from their 27megapixel cameras and GO.

But yea, smart image resizing would be the holy grail. Resize, crop and resample/save. By tomorrow Joe?   :)

8/25/2009 12:01:50 PM
Gravatar
Total Posts 18439

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

Well, the fact that the dialog page is in .NET code makes this not that difficult to implement.

Its just a matter of deciding what the resizing logic should be. Do we just make a config setting for max width and max height and then constrain within those while keeping the aspect ratio the same. Do we discard the full size file or let them max out their disk space quota etc. Seems like we would not want to keep it since they could then use it defeating our purpose.

Best,

Joe

8/25/2009 12:10:29 PM
Gravatar
Total Posts 195

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

I like the option of setting max width/height variable somewhere (say 550x550) and then constrain within those keeping the aspect ratio (if file is larger than max size only). That would at least give usable graphics and not eat up so much disk space. Users would still manually resize in the editor window, but it would be better. And yes, then discard the original file. For people who know to resize ahead of time the resampling wouldn't affect them.

8/26/2009 6:29:12 AM
Gravatar
Total Posts 34

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

Hi, how can I change the skins of the new tinyMCE editor, or add/edit features?

8/26/2009 7:02:10 AM
Gravatar
Total Posts 18439

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

I'm just looking into the TinyMCE skin options now. I will see about adding a web.config setting for it in the next release.

As far as making the features configurable I don't have a good answer for you at this time. TinyMCE does not load an external config file the way FCKeditor does so I don't have an easy way for you to override anything. I have configured toolbars consistent with what I think they should be depending on the feature it is used in and whether the user is an admin or not.

Best,

Joe 

8/26/2009 8:46:51 AM
Gravatar
Total Posts 195

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

Just a rainy day option but: in TinyMCE you could write out the javascript dynamically. This means on a settings page you could simple have a few open text boxes with all the option in it (hr,spell,code,help,table,etc).... that way people could customize what buttons show up from within mojo. Or even contain the entire MinyMCE javascript block in a textarea on a settings page, that way admins could tinker with all the various settings. Then just write that out in the areas where Tiny needs to load.

But obviously Joe has a lot on his plate!! Probably bigger fish to fry.

8/26/2009 12:36:49 PM
Gravatar
Total Posts 34

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

So TinyMCE is compiled that way? Just would be nice to have a way to add our own styles like FCKeditor will try using the CKeditor I see it has a config file

 

Cheers

8/27/2009 7:49:36 AM
Gravatar
Total Posts 18439

Re: WYSIWYG file manager/image editor (FCK/TinyMCE)

You can add your own style templates and use them in TinyMCE the same as in FCKeditor. What you can't do is add toolbar items for things like font size colors etc whereas in FCKeditor you could override this by the custom config file and add those items to the toolbar. For a CMS its a bad idea though because you will then have your users creating hard coded styles in your content that are not subject to skinning. To have a skinnable site where the style changes complately by changing the skin you must use only css and no hard coded styles. The hard coded styles that your users enter into the system will still be there and may look awful a year from now when you design a new skin and those hard coded styles don't match the skin.

Style templates allow you to define css classes that your users can apply from the style dropdown in the editor. Then if you later make a new skin you can change the style rules accordingly in the new skin for the same css classes.

To build a UI for customizing the TinyMCE would be a big job to figure out how to validate that approopriate settings are made else users can easily cause a javascript errors and break the editor completely.

The CKeditor looks like it has a config file but not the same as FCKeditor, not much in there and no clue how to configure it because there is no documentation about it. As soon as I learn how I will be removing the unwanted toolbar items from that editor as well. For now I consider it an experimental editor.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.