Here is the WordPress default post editor as we know:
You may notice, here are some garbage texts in the Title and Description field. They are ASCII texts.
PLOT
In Bangla, a widespread software named Bijoy was basically developed on ASCII keyboard patching. Now though there are Unicode based solution available, but some people are till using the ASCII one. So, we need to convert the ASCII based texts into Unicode based texts in Bangla scripts using converters like:
- Avro Converter [Beta],
- Online Unicode Converter by Morshed, etc.
SCENARIO
We developed a WordPress based theme for Bangla News Portals. On client-side, they are requested to use our CMS in a four-step process:
- Copy the ASCII based texts from their text-editors (MS Word, Quark Express etc.)
- Paste them into any of the suggested converter
- Convert them into Unicode
- Copy and Paste them to the Post Editor and then publish
Thing was going fine until a client demanded a Tweak into the CMS:
- Copy the ASCII based texts from their text-editors (MS Word, Quark Express etc.)
- Paste them to the Post Editor and then publish
But in the meantime, the editor must convert the ASCII texts into Unicode and store the Unicode texts into database.
WHAT WE NEED
What we want is to integrate some javascripts into the title text field (post title field), textarea (post description field), any custom fields etc. that will do twofold jobs at a time when we hit the “publish” button to publish a post:
- Convert the ASCII texts into Unicode as we get the
js
from Online Unicode Converter by Morshed - Insert the converted Unicode texts into db as it does always
So the ultimate question is:
How to integrate javascipts into WordPress post editor’s form items: text boxes, custom fields, submit button etc.?
Ok. At last with the confidence of Ms. Tahmina Aktar (Nishi) and with the help of the scripts of Mr. Morshed we developed a plugin for the purpose. It’s actually a Bangla Bijoy to Unicode Converter, where Bijoy is an old ASCII based writing system and Avro is a latest Unicode based one – in Bangla.
The plugin, with installation, activate a meta box on the right-top of the Post, Page and Attachment edit screen. With this, you can convert Bijoy (ASCII) texts into Avro (Unicode). But the plugin can’t function in the WordPress visual editor, so only when you are converting, you just need to get to the Text mode. Then you can get back to the Editor mode again.
Kudos to the effort of Ms. Aktar. 🙂