maziyank/editorjs-change-case

Support toLocaleLowerCase and toLocaleUpperCase

Closed this issue · 3 comments

Hi,
i really like your work. I want to use your package.
Can you please update package to support local case sensitive conversion.

Following links has some information about local case conversion.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase

Hi @mhmttosun, thanks for suggesting the idea.

However those method need a locale argument. Should we leave it blank (default) or let user choose their own (this will be more complicated) ?

Hi @maziyank
Thanks for your interest.
I think there are two options. I think second approach will make this plugin more usable.

  1. calling with blank paramater like toLocaleLowerCase(). In this case host environment’s current locale will be used.
  2. enabling config parameter for this plugin. Header and other official plugins has this properties. When initiating plugin, user can determine local parameter. Here is an example for Header and Table plugin
    https://github.com/editor-js/header
    https://github.com/editor-js/table

Screen Shot 2021-07-01 at 15 20 22

Screen Shot 2021-07-01 at 15 30 04

Hi @mhmttosun i have updated the source according to this improvement.