One option is to use HTML 5's ruby text support. Your ruby text can then easily be styled globally using CSS. Unfortunately, the syntax is extremely verbose:
<ruby>漢<rt>かん</rt>字<rt>じ</rt></ruby>
You're probably not willing to type that much!
So, you can follow Mark S. Everitt's ruby text support for Markdown. Then write your text in a reasonably concise Markdown format:
[漢](-かん)[字](-じ)
and use Everitt's scripts to process them into an output format. There's also a script to convert to XeLaTeX.
If you don't like Markdown, you can also use XeLaTeX directly:
\usepackage \ruby\ruby
Since all these formats are based on plain text, edit them in your favorite text editor. Syntax highlighting and completion for XML/HTML and TeX in many editors.