File tree 1 file changed +20
-0
lines changed
packages/notebook-extension/src 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -605,4 +605,24 @@ const plugins: JupyterFrontEndPlugin<any>[] = [
605
605
trusted ,
606
606
] ;
607
607
608
+ /**
609
+ * A plugin to add a "test" title at the top of the notebook.
610
+ */
611
+ const addTestTitle : JupyterFrontEndPlugin < void > = {
612
+ id : '@jupyter-notebook/notebook-extension:add-test-title' ,
613
+ description : 'A plugin to add a "test" title at the top of the notebook.' ,
614
+ autoStart : true ,
615
+ requires : [ INotebookShell ] ,
616
+ activate : ( app : JupyterFrontEnd , shell : INotebookShell ) => {
617
+ const titleWidget = new Widget ( { node : document . createElement ( 'h1' ) } ) ;
618
+ titleWidget . node . textContent = 'Test' ;
619
+ titleWidget . addClass ( 'jp-NotebookTest-title' ) ;
620
+
621
+ app . shell . add ( titleWidget , 'top' , { rank : 0 } ) ;
622
+ }
623
+ } ;
624
+
625
+ // Add this to the plugins array
626
+ plugins . push ( addTestTitle ) ;
627
+
608
628
export default plugins ;
You can’t perform that action at this time.
0 commit comments