Coder Social home page Coder Social logo

oxygenxml / web-author-learn-words-plugin Goto Github PK

View Code? Open in Web Editor NEW
0.0 26.0 1.0 236 KB

Plugin for adding learned/forbidden words functionality to Web Author spellchecking.

License: Apache License 2.0

HTML 5.97% JavaScript 7.37% Java 86.66%
oxygen-web-author-plugin

web-author-learn-words-plugin's Introduction

Web Author Learn Words Plugin

Plugin for adding learned/forbidden words functionality to Web Author spellchecking.

How it works

The list of words is stored in a file with the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<Dictionary>
    <Learned>
        <Language code="en">
            <w>wordexample</w>
            <w>worda</w>
            <w>longword</w>
            <w>learned word</w>
        </Language>
        <Language code="fr">
            <w>worta</w>
            <w>wortb</w>
        </Language>
    </Learned>
    <Forbidden>
        <Language code="en">
            <w>some</w>
            <w>forbidden</w>
            <w>words</w>
        </Language>
        <Language code="de">
            <w>verboten</w>
        </Language>
    </Forbidden>
</Dictionary>

The file is loaded either from a the server's local file system, or from an external HTTP server (GET request).

When a user chooses to learn a word the following action happens:

  1. If the plugin is configured to use a local file, the new word is added to that file.
  2. If the plugin is configured to load the file from an HTTP server, a POST request is sent to the URL of the file with the following form parameters:
Parameter name Parameter value
mode One of learned or forbidden
lang The language for which the word is added, e.g. en
word The word to be added

Installation

To install this plugin, download one of the releases (link) and upload it in your Web Author deployment.

Configuration through Administration page.

The plugin can be configured from the Web Author Administration Page. You can set:

  • the number of suggestions to be shown from the learned words list. They will always be shown at the top of the list of suggestions.
  • the read-only mode, enabled by default. If turned off, a "Learn word" action is added to the contextual menu and any user can add words to the learned words list.
  • the dictionary. It may be a local file, or an HTTP server able to serve the list of learned words(GET) and add new learn words(POST).

Configuration through options.xml file

The plugin can also be configured by customizing options in Web Author's options.xml:

  • the number of suggestions to be shown from the learned words list
<entry>
    <String>PLUGIN_CUSTOM_OPTIONS.suggestions-no.name</String>
    <String>2</String>
</entry>
  • the read-only mode
<entry>
    <String>PLUGIN_CUSTOM_OPTIONS.lw.read-only-mode</String>
    <String>off</String>
</entry>
  • use a local dictionary file
<!--Use local file-->
<entry>
    <String>PLUGIN_CUSTOM_OPTIONS.file-selected.name</String>
    <String>on</String>
</entry>
<entry>
    <String>PLUGIN_CUSTOM_OPTIONS.file-path.name</String>
    <String>PATH_TO_FILE</String>
</entry>
  • OR use an HTTP server
<!--Use URL to connect to an HTTP server-->  
<entry>
    <String>PLUGIN_CUSTOM_OPTIONS.url-selected.name</String>
    <String>on</String>
</entry>
<entry>
    <String>PLUGIN_CUSTOM_OPTIONS.url.name</String>
    <String>http://EXAMPLEURL</String>
</entry>

Copyright and License

Copyright 2021 Syncro Soft SRL.

This project is licensed under Apache License 2.0

web-author-learn-words-plugin's People

Contributors

adriansorop avatar andreip1123 avatar bogdan-cercelaru avatar bogdangoreci avatar bpaulon avatar cristibanica avatar ctalau avatar dumitrubogdanmihai avatar florinavram avatar mihai-coanda avatar stefanvasile avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bogdangoreci

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.