ASCII to Unicode conversion and then save the data into database using WP post editor field

Here is the WordPress default post editor as we know:
WordPress default post editor

You may notice, here are some garbage texts in the Title and Description field. They are ASCII texts.

Read More

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:

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:

  1. Copy the ASCII based texts from their text-editors (MS Word, Quark Express etc.)
  2. Paste them into any of the suggested converter
  3. Convert them into Unicode
  4. Copy and Paste them to the Post Editor and then publish

Thing was going fine until a client demanded a Tweak into the CMS:

  1. Copy the ASCII based texts from their text-editors (MS Word, Quark Express etc.)
  2. 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:

So the ultimate question is:
How to integrate javascipts into WordPress post editor’s form items: text boxes, custom fields, submit button etc.?

Related posts

1 comment

  1. 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. 🙂

    Bijoy to Unicode Converter

Comments are closed.