Coder Social home page Coder Social logo

electron-spellchecker's Introduction

FINOS - Archived

This project is archived, which means that it's in read-only state; you can download and use this code, but please be aware that it may be buggy and may also contain security vulnerabilities. If you're interested to restore development activities on this project, please email [email protected].

electron-spellchecker

electron-spellchecker is a library to help you implement spellchecking in your Electron applications, as well as handle default right-click Context Menus (since spell checking shows up in them). This library intends to solve the problem of spellchecking in a production-ready, international-friendly way.

electron-spellchecker:

  • Spell checks in all of the languages that Google Chrome supports by reusing its dictionaries.
  • Automatically detects the language the user is typing in and silently switches on the fly.
  • Handles locale correctly and automatically (i.e. users who are from Australia should not be corrected for 'colour', but US English speakers should)
  • Automatically downloads and manages dictionaries in the background.
  • Checks very quickly, doesn't introduce input lag which is extremely noticable
  • Only loads one Dictionary at a time which saves a significant amount of memory

Quick Start

import {SpellCheckHandler, ContextMenuListener, ContextMenuBuilder} from 'electron-spellchecker';

window.spellCheckHandler = new SpellCheckHandler();
window.spellCheckHandler.attachToInput();

// Start off as US English, America #1 (lol)
window.spellCheckHandler.switchLanguage('en-US');

let contextMenuBuilder = new ContextMenuBuilder(window.spellCheckHandler);
let contextMenuListener = new ContextMenuListener((info) => {
  contextMenuBuilder.showPopupMenu(info);
});

Language Auto-Detection

The spell checker will attempt to automatically check the language that the user is typing in and switch on-the fly. However, giving it an explicit hint by calling switchLanguage, or providing it a block of sample text via provideHintText will result in much better results.

Sample text should be text that is reasonably likely to be in the same language as the user typing - for example, in an Email reply box, the original Email text would be a great sample, or in the case of Slack, the existing channel messages are used as the sample text.

About node-spellchecker

This module uses a fork of Atom's excellent node-spellchecker that takes a slightly different path on Windows by using Hunspell only. You can find the source here.

Learning more

Contributing

  1. Fork it (https://github.com/symphonyoss/electron-spellchecker/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Read our contribution guidelines and Community Code of Conduct
  4. Commit your changes (git commit -am 'Add some fooBar')
  5. Push to the branch (git push origin feature/fooBar)
  6. Create a new Pull Request

NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.

Need an ICLA? Unsure if you are covered under an existing CCLA? Email [email protected]

License

The code in this repository is distributed under the Apache License, Version 2.0.

Copyright 2019 Symphony

electron-spellchecker's People

Contributors

adamjspooner avatar agitana avatar anaisbetts avatar aneesv avatar bengotow avatar blaatunga avatar charliehess avatar danmckeon avatar dependabot[bot] avatar dudeofawesome avatar felixrieseberg avatar finos-admin avatar johankwarnmarksymphony avatar kiranniranjan avatar kwonoj avatar leekevinyg avatar mlalkaka avatar nornagon avatar rhythm-sharma avatar rkistner avatar sbenmoussati avatar vishwasshashidhar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

electron-spellchecker's Issues

Is repo still needed?

Hi @sbenmoussati !

I see that there haven't been updates on this repo since a long time; is it still used/relevant, or shall we archive it?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.