File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export default class RubyWasmPlugin extends Plugin {
5454
5555 // This adds a simple command that can be triggered anywhere
5656 this . addCommand ( {
57- id : "run-in-modal-command " ,
57+ id : "run-in-modal" ,
5858 name : "Run in Modal" ,
5959 editorCallback : ( editor : Editor ) => {
6060 const code = editor . getSelection ( ) ;
@@ -71,7 +71,7 @@ export default class RubyWasmPlugin extends Plugin {
7171
7272 // This adds an editor command that can perform some operation on the current editor instance
7373 this . addCommand ( {
74- id : "run-in-editor-command " ,
74+ id : "run-in-editor" ,
7575 name : "Run in Editor" ,
7676 editorCallback : ( editor : Editor , view : MarkdownView ) => {
7777 const code = editor . getSelection ( ) ;
@@ -152,8 +152,11 @@ class CodeModal extends Modal {
152152 } ) ;
153153 resultElement . textContent = this . result || "result" ;
154154
155- const closeButton = contentEl . createEl ( "button" , { text : "Close" } ) ;
156- closeButton . style . cssText = "float: right;" ;
155+ const closeButton = contentEl . createEl ( "button" , {
156+ cls : "modal-button" ,
157+ attr : { type : "button" } ,
158+ text : "Close" ,
159+ } ) ;
157160 closeButton . addEventListener ( "click" , ( ) => {
158161 this . close ( ) ;
159162 } ) ;
Original file line number Diff line number Diff line change @@ -6,3 +6,7 @@ available in the app when your plugin is enabled.
66If your plugin does not need CSS, delete this file.
77
88*/
9+ button .modal-button {
10+ float : right;
11+ margin : 0.75em 0 ;
12+ }
You can’t perform that action at this time.
0 commit comments