Aloha Editor: Insert Images / Images

I use the Aloha editor to edit content on a website running PHP and MySQL. It works fine, but I need to be able to insert images / images. For this, I found a plugin for the Aloha editor. Here are some links:

The first link has an example. However, I cannot get the plugin to work with the latest version of Aloha and jQuery. It does not load, and Chrome says:

image.js:30 Uncaught TypeError: Cannot read property 'fn' of undefined

I have no bloody clue what this means.

Ideally, the user should be able to select an image from the list of images that are on the server. They are located in the same directory and also have a MySQL table. I suspect there is a repository here, but I could not figure out how to implement this.

Has anyone managed to use this plugin in the Aloha editor or find any other ways to insert images?

+5
source share
2 answers

Too late, but if you need, I made a simple plugin for the Aloha editor to insert / upload an image. This plugin is part of my symfony 1.x plugin to easily integrate Aloha into a Symfony application.

Symfony.

/ .

, , , . , , " " .

+3

. , . .te iframe

    $SQL = "SELECT * FROM PHOTO_GALLERY";
    $result = mysql_query( $SQL );
    while( $row = mysql_fetch_array( $result ) ) {
    $photo_id = $row["photo_id"];
    $photo = $row["photo"];
    $photo_name = $row["photo_name"];

 $picture = "<img alt='$photo_name' title='$photo_name' src='http://$domain/$photo'>";

echo '<span style="cursor:pointer" class="picture_'.$photo_id.'"><img title="Click to add image" alt="'.$photo_name.'" height="50" src="/'.$photo.'" width="50"/></span>


< script>
 $(document).ready(function(){
$(".picture_'.$photo_id.'").click(function() {
$(".te").contents().find("body").append("'.$picture.'");
});
});
< /script>
0

All Articles