Joomla Content editors tool


How many times your content editor/submitter used some wrong html rules in your site content?

For me, the answer is numerous times. I used to be anxious each and every time, he logged in. I d

eveloped a joomla based CMS site for our company, once the site is launched I moved to other projects. But every now and then they used to call me as some pages are looking different. This is because our beloved content editor has used some new kind of fonts and text rules which were not used anywhere in the site. Yes yes,I know there is tinyMCE . But problem is when you are copying from multiple sources and pasting into your article, your article(in this case I mean joomla article) becomes very clumsy. In this situation, if apply your desired style rule using tinymce , the result may not be good.

So the best way is to

  • Remove all HTML styles.
  • Get the clean text
  • Now apply your text rules.

But again,our dear content editor may be a bit lazzy. So thats why I planned a tool for him. Its a simple two file application, you may marge it into one file too. The concept is this :

  • There is a text box where he has to paste the text
  • The script will remove all previous styles from the text and apply new styles as defined inside the script.
  • Regular expressions matching is used to apply special rules for specific words.

What it does is :

  • It removes all styling but keeps newline characters and paragraphs.
  • It converts everything to arial and with the selected font size.
  • it searches inside the text , and converts every occurrence of foo into a orange coloured foo.  You may use this feature for your brand name.
  • It also applies different styling for the title.

So thats it. Download the files, put them in your apache’s web folder and run. Please feel free to modify the codes as per your need.

Download Source Files

{ This was published previously on my old blog in college days. Please don’t judge me by this code. I know it’s kinda messy 🙂 }

Leave a Reply

Your email address will not be published. Required fields are marked *