@@ -24,7 +24,6 @@
|
||||
* You don't need to do anything. Just run this on DOM ready.
|
||||
*/
|
||||
$.GollumEditor = function( IncomingOptions ) {
|
||||
|
||||
ActiveOptions = $.extend( DefaultOptions, IncomingOptions );
|
||||
|
||||
debug('GollumEditor loading');
|
||||
@@ -96,11 +95,8 @@
|
||||
$('#gollum-editor-help').hide();
|
||||
$('#gollum-editor-help').removeClass('jaws');
|
||||
}
|
||||
|
||||
}
|
||||
// EditorHas.functionBar
|
||||
}
|
||||
// EditorHas.baseEditorMarkup
|
||||
} // EditorHas.functionBar
|
||||
} // EditorHas.baseEditorMarkup
|
||||
};
|
||||
|
||||
|
||||
@@ -199,6 +195,18 @@
|
||||
if(LanguageDefinition.getHookFunctionFor("activate")) {
|
||||
LanguageDefinition.getHookFunctionFor("activate")();
|
||||
}
|
||||
|
||||
function hotkey( cmd ) {
|
||||
var def = LanguageDefinition.getDefinitionFor( cmd );
|
||||
if ( typeof def == 'object' ) {
|
||||
FunctionBar.executeAction( def );
|
||||
}
|
||||
// Prevent bubbling of hotkey.
|
||||
return false;
|
||||
}
|
||||
|
||||
Mousetrap.bind(['command+b', 'ctrl+b'], function(){ hotkey('function-bold'); });
|
||||
Mousetrap.bind(['command+i', 'ctrl+i'], function(){ hotkey('function-italic'); });
|
||||
} );
|
||||
} else {
|
||||
LanguageDefinition._ACTIVE_LANG = name;
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<textarea id="gollum-editor-body"
|
||||
data-markup-lang="{{format}}" name="content">{{content}}</textarea>
|
||||
data-markup-lang="{{format}}" name="content" class="mousetrap">{{content}}</textarea>
|
||||
|
||||
{{#header}}
|
||||
<div id="gollum-editor-edit-header" class="collapsed">
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<![endif]-->
|
||||
|
||||
<script type="text/javascript" src="/javascript/jquery.js"></script>
|
||||
<script type="text/javascript" src="/javascript/mousetrap.min.js"></script>
|
||||
<script type="text/javascript" src="/javascript/gollum.js"></script>
|
||||
<script type="text/javascript" src="/javascript/gollum.dialog.js"></script>
|
||||
<script type="text/javascript" src="/javascript/gollum.placeholder.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user