css参照を追加した後でも、まったく同じ問題がありました。デモページに行き、アロハを初期化して動作させるためにソースをコピーすることになりました。
<link href="/Scripts/aloha/css/aloha.css" type="text/css" rel="stylesheet" />
<script>
var Aloha = window.Aloha || (window.Aloha = {});
Aloha.settings = {
locale: 'en',
plugins: {
format: {
config: ['b', 'i', 'p', 'sub', 'sup', 'del', 'title', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre', 'removeFormat'],
editables: {
// no formatting allowed for title
'#title': []
}
},
link: {
editables: {
// No links in the title.
'#title': []
}
},
list: {
editables: {
// No lists in the title.
'#title': []
}
},
image: {
'fixedAspectRatio': true,
'maxWidth': 1024,
'minWidth': 10,
'maxHeight': 786,
'minHeight': 10,
'globalselector': '.global',
'ui': {
'oneTab': false
},
editables: {
// No images in the title.
'#title': []
}
}
},
sidebar: {
disabled: true
}
};
</script>
<script type="text/javascript" src="/Scripts/aloha/lib/aloha.js"
data-aloha-plugins="common/format,
common/table,
common/list,
common/link,
common/highlighteditables,
common/block,
common/undo,
common/contenthandler,
common/paste,
common/commands,
common/abbr,
extra/browser,
extra/linkbrowser"></script>
<!-- turn an element into editable Aloha continuous text -->
<script type="text/javascript">
Aloha.ready(function () {
Aloha.require(['aloha', 'aloha/jquery'], function (Aloha, $) {
$('.edit').aloha();
});
});
</script>
余談ですが、その場での編集機能は素晴らしいのに、結局このエディターを使用しませんでした。主な原因は、ライブラリがかなり大きく、縮小しても 1MB を超えていたことと、テスト中に奇妙な動作が見つかったことです (おそらく、プロジェクトがまだ開発の初期段階にあるためです)。私がテストしたバージョンは 0.20.10 でした。