2

Is there any jQuery WYSIWYG editor w/ ability to upload and then preview images to/from the database? Maybe there are kinda adapters for well-known CKEditor + CKFinder to work with database? Thank you!

drunkcamel
  • 915
  • 3
  • 12
  • 25

2 Answers2

1

" What's the best WYSIWYG editor when using the ASP.NET MVC Framework? " has a few WYSIWYG suggestions. Personally, I like TinyMCE. They have an image manager that's pretty slick too.

  • Easy to integrate. MCFileManager compatible.
  • Create folders. Upload images.
  • Crop & Resize (if GD is enabled).
  • Thumbnail auto generation (if GD is enabled).
  • EXIF jpg/jpeg and tiff thumbnail support. Highly customizable configuration.
  • Works perfectly in fullscreen and "popup" mode. Full source included, not obfuscated.
  • Ajax based interface using a JSON bridge. Multilanguage support.

As far as database image support goes, you can use an image list (see http://www.tinymce.com/forum/viewtopic.php?id=12634 for similar discussion in php):

<script language="javascript" type="text/javascript" src="../../jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
  theme: "advanced",
  mode : "textareas",
  plugins : "style",
  theme_advanced_buttons3_add : "styleprops",
  content_css : "../tiny.css",
  external_image_list_url : "Image/List",
  browsers : "msie,gecko,opera"
});
</script>

Where ImageController.List() is a controller action that returns a JSON array of action links to your images retrieved from the database and ImageController.View(id) is an action that returns an image:

["test_before.jpg", "Image/View/bread"],
["cherry.jpg", "Image/View/cherry"],
["bread.jpg", "Image/View/bread"],
["test_after.jpg", "Image/View/cherry"]

Then to upload, you'll need to create another action that will accept a posted file (image) and save it to your database. There are a few open source plugins that will take care of this for you:

Community
  • 1
  • 1
jrummell
  • 42,637
  • 17
  • 112
  • 171
  • But what about database connection? – drunkcamel Oct 18 '11 at 12:19
  • There's a discussion about database images on their forum, but it's php specific. http://www.tinymce.com/forum/viewtopic.php?id=12634 – jrummell Oct 18 '11 at 12:33
  • Thank you very much. I've tried this solution and it works basically. I'm just wondering whether there are a database connector which gives you the same possibilities to work with files as using a file explorer. – drunkcamel Oct 18 '11 at 14:50
0

i'm using http://labs.corefive.com/projects/filemanager/ plugin. Supports CKEditor and FCKEditor.

Ofcourse you have to program the part where you want to store the files etc. But they do have a few examples included.

Manuel van Rijn
  • 10,170
  • 1
  • 29
  • 52