I’m looking for a new plugin to implement an optional feature in my current published plugin.
I am currently publishing a plugin to implement an optional feature,
I am trying to add a drop down list,
In the native HTML, when I write the following,The “-” part becomes a separator line.
“-” (utf8 code: 2D) → separator
“–” (utf8 code: E2 80 93) → no problem
“—” (utf8 code: E2 80 94) → no problem
I used “-” (utf8 code: 2D) that can be easily input from the keyboard as much as possible,
so I decided to use “–” (utf8 code: E2 80 93), which looks similar just to display
the process separately as shown below.
The distinction between ‘-’, ‘–’, and ‘—’ was taken into account and helpful.
Thank you very much for the hint.
if (data === '-') {
//Branching so that the label is "–" only when - is used.
return `<option value="${data}">–</option>`; // -> – utf8 code: E2 80 93
} else {
return `<option value="${data}">${data}</option>`;
}