0

I want to include images in an aloha editable after a drop event, thus not using the toolbar button.

While some aloha commands may be executed programmatically, there is not so much doc about it and one must look into the code.

With the debugger i found that the relevant function is here so now i would go for copying the insertImg function body somewhere in my code and build my function.

On the other hand it would be much cleaner to reuse that code calling something like

Aloha.plugins.image.insertImg();

In a way similar to how it is done here. Is it possible to do such a thing?

4

1 回答 1

0

一位同事向我解释说,插入图像没有什么特别的要求。aloha 使用的函数只是替代 jQuery 的一种方式,没有必要。

加载插件后,在可编辑项common/image中添加一个标签就足够了<img>,也可以使用 jQuery,插件将在其上触发,添加调整大小句柄并在需要时显示图像工具栏。

于 2014-01-09T14:05:05.157 回答