By HMED on Wednesday, 27 June 2018
Replies 14
Likes 0
Views 622
Votes 0
Hello,

As this discussion title,

some times members post discussions with a highcase titles which is not friendly and can be an abuse,
we should every time edit discussion and change the title ..

in some forum script (as IPS which we use) there is an option to lowercase discussions titles and convert :

LOWERCASE DISCUSSIONS TITLES (ABUSE CASE)

To

Lowercase discussions titles (abuse case)

any option is available now in ED ? if not maybe in the future ?
With a simple css you could enforce the case sensitivity of the title. Altering the original source of what the user enters is not a solution because if I need to enter several characters to be uppercase, you are altering what I was trying to outline.
·
Thursday, 28 June 2018 00:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark, yes i think you have reason !
any example how to alter the ED titles only with only first letter upercase ?
·
Thursday, 28 June 2018 00:33
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is one example,

[gist]
body #ed .ed-post-item__title {
text-transform: capitalize;
}
[/gist]
·
Thursday, 28 June 2018 00:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks !

I tried with "lowercase" but it put all the title in lower case !
any way to lowercase all title and put first letter in capital ?

ex. "Lowercase discussions"
·
Thursday, 28 June 2018 01:25
·
0 Likes
·
0 Votes
·
0 Comments
·
There is no such property. Capitalize is your best bet.
·
Thursday, 28 June 2018 01:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello

Otherwise you can use javascript to automatically format inputs.
Because with the CSS it is only superficial, only in the display.

Here is for example to put a capital letter only at the beginning (Capitalize) :
https://stackoverflow.com/a/35449451

You can try clicking on "Run code snippet"

Philippe
·
Thursday, 28 June 2018 01:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Philippe, thank you !
looks great buy that need some customization on ED not ?

@Mark With the capetilize css option the titles stays as they are, no changes! its normal ?
·
Thursday, 28 June 2018 15:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes a little bit.

Add this in the EasyDiscuss input :

onkeyup="myFunction()"

And the script in the template :

<script type="text/javascript">
function myFunction() {
var input = document.getElementById("test");
var word = input.value.split(" ");
for (var i = 0; i < word.length; i++) {
word[i] = word[i].charAt(0).toUpperCase() + word[i].slice(1).toLowerCase();
}
input.value = word.join(" ");
}
</script>

Philippe
·
Thursday, 28 June 2018 16:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post