- Joined
- Jun 10, 2014
- Messages
- 875
- Reaction score
- 591
- First Language
- English
- Primarily Uses
- RMMV
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)
version 0.2 (possibly browser-only, so it's pointless... take it or leave it...)
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)
version 0.2 (possibly browser-only, so it's pointless... take it or leave it...)
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);
};
Last edited by a moderator:


