0.0.2 • Published 3 years ago

suggest-fix v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

SuggestFix

Let your users suggest content fixes by selected wrong text and suggesting a new.

Demo

This JS library sends to the backend wrong and correct text, page URL where it was captured, ID of the closest parent. This information could be used to find location of wrong text.

Instalation

Simple configuration:

    <script src="./suggest-fix.js"></script>
    <script>
      new SuggestFix({
        destination: '/some/url'
      });
    </script>

Or if you want to customize position or send AJAX request with some headers:

    <script src="./suggest-fix.js"></script>
    <script>
      new SuggestFix({
        destination: '/some/url',
        position: 'suggest-fix-icon-top suggest-fix-icon-left',
        headers: {
          'header-a-key': 'header-a-value'
        }
      });
    </script>

Development and Build

yarn start - to start coding. Open http://localhost:8080/ to see how it works.

yarn build - to build production bundle (./dist folder).

Other ideas

  • better readme
  • instructions how to use with npm
  • move away from prompt and user own styled window
  • add more CSS classes for position

Credits

Thanks for the idea and some pieces of code took from: https://wordpress.org/plugins/reword.

License

MIT

PS

It's my first JS package :)