| 
									
										
										
										
											2018-02-03 10:37:57 -05:00
										 |  |  | const api = (function() { | 
					
						
							| 
									
										
										
										
											2018-02-14 23:31:20 -05:00
										 |  |  |     const $pluginButtons = $("#plugin-buttons"); | 
					
						
							| 
									
										
										
										
											2018-02-03 10:37:57 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  |     async function activateNote(notePath) { | 
					
						
							|  |  |  |         await noteTree.activateNode(notePath); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     function addButtonToToolbar(buttonId, button) { | 
					
						
							|  |  |  |         $("#" + buttonId).remove(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         button.attr('id', buttonId); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-14 23:31:20 -05:00
										 |  |  |         $pluginButtons.append(button); | 
					
						
							| 
									
										
										
										
											2018-02-03 10:37:57 -05:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |         addButtonToToolbar, | 
					
						
							| 
									
										
										
										
											2018-02-24 21:23:04 -05:00
										 |  |  |         activateNote, | 
					
						
							|  |  |  |         getInstanceName: noteTree.getInstanceName | 
					
						
							| 
									
										
										
										
											2018-02-03 10:37:57 -05:00
										 |  |  |     } | 
					
						
							|  |  |  | })(); |