mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-27 07:39:56 -06:00
publish API to allow manipulating list of allowed mime types for #192
This commit is contained in:
@@ -5,6 +5,7 @@ import infoService from './info.js';
|
||||
import linkService from './link.js';
|
||||
import treeCache from './tree_cache.js';
|
||||
import noteDetailService from './note_detail.js';
|
||||
import noteTypeService from './note_type.js';
|
||||
|
||||
/**
|
||||
* This is the main frontend API interface for scripts. It's published in the local "api" object.
|
||||
@@ -204,6 +205,24 @@ function FrontendScriptApi(startNote, currentNote, originEntity = null) {
|
||||
* @param {function} func - callback called on note change as user is typing (not necessarily tied to save event)
|
||||
*/
|
||||
this.onNoteChange = noteDetailService.onNoteChange;
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @returns {array} list of default code mime types
|
||||
*/
|
||||
this.getDefaultCodeMimeTypes = noteTypeService.getDefaultCodeMimeTypes;
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @returns {array} list of currently used code mime types
|
||||
*/
|
||||
this.getCodeMimeTypes = noteTypeService.getCodeMimeTypes;
|
||||
|
||||
/**
|
||||
* @method
|
||||
* @param {array} types - list of mime types to be used
|
||||
*/
|
||||
this.setCodeMimeTypes = noteTypeService.setCodeMimeTypes;
|
||||
}
|
||||
|
||||
export default FrontendScriptApi;
|
||||
Reference in New Issue
Block a user