Quick SpellCheck

I was excited when I thought of this, but after I made a quick plugin to my dismay, the RMMV Chromium game wrapper does not have built-in spellcheck like other Chromium. Or maybe just mine is buggy; does your spell check work? I know I'm having other problems with my game wrapper lately. So this only works for me when I run the game in a browser through the game project index.html, which voids the purpose of easy spell check in that if you have to spellcheck in something else anyway why even use a plugin?


What this does is creates a tag with contentEditable and spellcheck outside the game wrapper and all message text shows up in it, and if your Chromium has spellcheck or if you run this in the browser it puts the red underline on the misspelled words. You have to resize the game window to see the tag if not in a browser. I didn't think it would work in the game wrapper anyway (for me it doesn't), so I didn't add anything to resize the window automatically. I will do that if you test this and it does in fact work for you. Probably won't.


Of course you would take this plugin out, before distributing your game.


Screenshot: misspelled word underlined in the tag (above the game window)

Spoiler
Screen Shot 2017-01-27 at 10.07.07 PM.png



version 0.2 (possibly browser-only, so it's pointless... take it or leave it...)

Spoiler
Code:
/*
 * Spell-check Window
 *
 * @plugindesc Shows text in an outside window for spell-checking.
 * @author Mogwai "Jake Jilg"
 *
 */
window.addEventListener("load", function(e){
	var p = document.createElement("p");
	p.contentEditable = true;
	p.spellcheck = true;
	p.id = "spellCheckBox";
	p.style.color = "#000";
	p.style.backgroundColor = "#fff";
	p.appendChild(document.createTextNode("Spell Check Box"));
	document.body.appendChild(p);
});
Game_Message.prototype.addCached = Game_Message.prototype.add;
Game_Message.prototype.add = function(text) {
	var p = document.getElementById("spellCheckBox");
	p.innerHTML = '';
	var text_node = document.createTextNode(text);
	p.appendChild(text_node);
    return Game_Message.prototype.addCached.apply(this, arguments);
};
Very nice!  Are you adding the ability to add words to the dictionary?  I imagine most of my player's names will throw up errors.  It might be worth experimenting with the placement of the check - I suspect that would throw a few errors if escape codes are used.
It's browser spellcheck so add to dictionary is usually in the right click menu,Screen Shot 2017-01-28 at 9.22.18 AM.png


but I just discovered a bug when I add it this way that for some reason disabled context menu events.


Tinkering around adding it on window load seems to fix this for whatever reason so now I have a version 0.2


I didn't think anybody would be impressed. Do you mean to say this works in your playtest Chromium? It doesn't work in mine.
I haven't tried it.  I just really like the concept.  I hope you do get it working.
For all functional purposes this does work in a browser anyway. So if you require the task of spellchecking a whole game at once, then this script will be handy, but it just needs to be playtested in a browser instead of the playtest wrapper (just open index.html in the game folder).

EDIT: This is a better plugin for spellchecking.


For the task of spellchecking as you go and not a whole game, I made an html utility for the useful tools forum for spellchecking, and that also helps you preview font, size, color, format, and line breaks too.


Relying on browser spellcheck is useful, because I don't have to get language libraries and stuff; you'll already have your own thing in that department. That being said, I'm incapable of making a script with language libraries and stuff anyway. This script is only 20 lines and it only creates an element and changes its innerHTML.

Original thread: https://forums.rpgmakerweb.com/threads/quick-spellcheck.74204/