mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Add button to revert SimpleMDE to plain textarea (#10099)
This commit is contained in:
		| @@ -1369,7 +1369,16 @@ function initWikiForm() { | |||||||
|         }, '|', |         }, '|', | ||||||
|         'unordered-list', 'ordered-list', '|', |         'unordered-list', 'ordered-list', '|', | ||||||
|         'link', 'image', 'table', 'horizontal-rule', '|', |         'link', 'image', 'table', 'horizontal-rule', '|', | ||||||
|         'clean-block', 'preview', 'fullscreen', 'side-by-side'] |         'clean-block', 'preview', 'fullscreen', 'side-by-side', '|', | ||||||
|  |         { | ||||||
|  |           name: 'revert-to-textarea', | ||||||
|  |           action(e) { | ||||||
|  |             e.toTextArea(); | ||||||
|  |           }, | ||||||
|  |           className: 'fa fa-file', | ||||||
|  |           title: 'Revert to simple textarea', | ||||||
|  |         }, | ||||||
|  |       ] | ||||||
|     }); |     }); | ||||||
|     $(simplemde.codemirror.getInputField()).addClass('js-quick-submit'); |     $(simplemde.codemirror.getInputField()).addClass('js-quick-submit'); | ||||||
|  |  | ||||||
| @@ -1473,7 +1482,16 @@ function setSimpleMDE($editArea) { | |||||||
|       'code', 'quote', '|', |       'code', 'quote', '|', | ||||||
|       'unordered-list', 'ordered-list', '|', |       'unordered-list', 'ordered-list', '|', | ||||||
|       'link', 'image', 'table', 'horizontal-rule', '|', |       'link', 'image', 'table', 'horizontal-rule', '|', | ||||||
|       'clean-block', 'preview', 'fullscreen', 'side-by-side'] |       'clean-block', 'preview', 'fullscreen', 'side-by-side', '|', | ||||||
|  |       { | ||||||
|  |         name: 'revert-to-textarea', | ||||||
|  |         action(e) { | ||||||
|  |           e.toTextArea(); | ||||||
|  |         }, | ||||||
|  |         className: 'fa fa-file', | ||||||
|  |         title: 'Revert to simple textarea', | ||||||
|  |       }, | ||||||
|  |     ] | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   return true; |   return true; | ||||||
| @@ -1495,7 +1513,16 @@ function setCommentSimpleMDE($editArea) { | |||||||
|       'code', 'quote', '|', |       'code', 'quote', '|', | ||||||
|       'unordered-list', 'ordered-list', '|', |       'unordered-list', 'ordered-list', '|', | ||||||
|       'link', 'image', 'table', 'horizontal-rule', '|', |       'link', 'image', 'table', 'horizontal-rule', '|', | ||||||
|       'clean-block'] |       'clean-block', '|', | ||||||
|  |       { | ||||||
|  |         name: 'revert-to-textarea', | ||||||
|  |         action(e) { | ||||||
|  |           e.toTextArea(); | ||||||
|  |         }, | ||||||
|  |         className: 'fa fa-file', | ||||||
|  |         title: 'Revert to simple textarea', | ||||||
|  |       }, | ||||||
|  |     ] | ||||||
|   }); |   }); | ||||||
|   simplemde.codemirror.setOption('extraKeys', { |   simplemde.codemirror.setOption('extraKeys', { | ||||||
|     Enter: () => { |     Enter: () => { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user