File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,12 @@ export class PageEditor extends Component {
75
75
76
76
// Changelog controls
77
77
const updateChangelogDebounced = debounce ( this . updateChangelogDisplay . bind ( this ) , 300 , false ) ;
78
- this . changelogInput . addEventListener ( 'input' , updateChangelogDebounced ) ;
78
+ this . changelogInput . addEventListener ( 'input' , ( ) => {
79
+ const count = this . changelogInput . value . length ;
80
+ const counterEl = document . getElementById ( 'changelog-count' ) ;
81
+ if ( counterEl ) counterEl . innerText = `${ count } / 250` ;
82
+ updateChangelogDebounced ( ) ;
83
+ } ) ;
79
84
80
85
// Draft Controls
81
86
onSelect ( this . saveDraftButton , this . saveDraft . bind ( this ) ) ;
Original file line number Diff line number Diff line change @@ -106,11 +106,15 @@ class="dropdown-container">
106
106
<ul refs =" dropdown@menu" class =" wide dropdown-menu" >
107
107
<li class =" px-l py-m" >
108
108
<p class =" text-muted pb-s" >{{ trans (' entities.pages_edit_enter_changelog_desc' ) } } </p >
109
- <input refs =" page-editor@changelogInput"
110
- name =" summary"
111
- id =" summary-input"
112
- type =" text"
113
- placeholder =" {{ trans (' entities.pages_edit_enter_changelog' ) } }" />
109
+ <textarea
110
+ refs =" page-editor@changelogInput"
111
+ name =" summary"
112
+ id =" summary-input"
113
+ rows =" 2"
114
+ maxlength =" 250"
115
+ placeholder =" {{ trans (' entities.pages_edit_enter_changelog' ) } }"
116
+ ></textarea >
117
+ <small class =" text-muted mt-xs" id =" changelog-count" >0 / 250</small >
114
118
</li >
115
119
</ul >
116
120
<span >{{-- Prevents button jumping on menu show --}} </span >
You can’t perform that action at this time.
0 commit comments