알로하 편집기가 설치되어 작동합니다. 이제 도구 모음에 사용자 지정 단추를 만들려고합니다. 이 버튼을 클릭하면 codecogs equation editor popup이 열립니다. 내가 알로하없이 정상적으로 할 것입니다 방법은이 기능알로하 편집기 툴바에 codecogs 방정식 버튼을 추가하는 방법은 무엇입니까?
<p><a href="javascript:OpenLatexEditor('target','html','')">
Launch CodeCogs Equation Editor</a></p>
를 팝업 스크립트를 추가하고 호출하는 것입니다하지만 난 오히려 다음 도구 모음 각 편집 후 링크 버튼을 것이다. aloha-editor에 대한 플러그인 문서를 읽었습니다.
이것은 내가 지금까지 무엇을 가지고 :
그러나define([
'aloha',
'jquery',
'aloha/plugin',
'ui/ui',
'ui/button'
], function(Aloha,
jQuery,
Plugin,
Ui,
Button) {
'use strict';
var GENTICS = window.GENTICS;
return Plugin.create('equationButton', {
init: function() {
var that = this;
this._insertEquation = Ui.adopt("insertEquation", Button, {
iconOnly: true,
icon: 'aloha-icon-equation',
click: function(){
that.insertEQ();
}
});
},
insertEQ: function() {
var self = this;
if(Aloha.activeEditable) {
window.location = OpenLatexEditor('target','html','');
}
}
});
});
, 내가 here 인 수식 편집기 팝업의 스크립트를 포함합니까. 그리고 이것이 Window.location을 사용하는 방법입니까 아니면 원시 URL 문자열 만 가져 오는 것입니까?
감사합니다, Jiyda