BeyondGrammar For TinyMCE

by Craig Haywood

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.3.10/tinymce.min.js"></script>
<!-- Include tinymce and RTG code sources -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.3.10/tinymce.min.js"></script>
<script src="https://prowriting.azureedge.net/beyondgrammar-tinymce/1.0.57/dist/beyond-grammar-plugin.js"></script>

<div id="editor">
  <p>
  Motivation and De-motivation Expansive-Restrictive Continuum
Researches into various workplace domain dynamics have culminated in the establishment of a theoretical framework that seeks to explain and contextualize the dynamics around which how new learners in various learning precincts acquire knowledge and skills that empower them to tackle the challenges posed by their academic challenges and later on; career compositions.</p>
<p>
The dimension of newcomer learner has been relished with valuable contributions from Lave and Wenger who developed the interlinked tenets of legitimate peripheral participation as well as communities of practice to explain how workplace newcomers (the valid peripheral partakers) develop to full participant status in a defined community of practice. The newcomers are perceived to embrace learning as a collective relational process that entails the cooperation of the novices with the more experienced personnel. “In our perspective, the acquisition of knowledge is not merely situated in practice like it were some independently definable prices that just occurred to be situated somewhere; the acquisition of knowledge is an integral part of generative social practice in the lived-in world”. (Lave and Wenger 1991)</p>
<p>
Lave and Wenger view the situated learning theory as an essential thrust for those areas tied to social practice as well as that it has contributions to attempts at surmounting what has been called by theorists Engerstrom et al (1991) as “The encapsulation of school of learning”. Much interest that has been culminated from the forerunning frameworks and...

JavaScript

//as container you can use as textarea, so and div
tinymce.init({
  selector: '#editor',
  height: 300,
  //don't forget to install 'BeyondGrammar' as a plugin and part of toolbar
  plugins: ["paste", "BeyondGrammar", 'link'],
  toolbar: [
    "undo redo | styleselect | bold italic link | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | BeyondGrammar"
  ],

  //all options placed in `bgOptions` object
  bgOptions: {
    service: {

      //localization for BeyondGrammar interface, will be used default or got by system information, please use same version with the plugin.
      i18n: {
        en: "https://prowriting.azureedge.net/beyondgrammar-tinymce/1.0.16/dist/i18n-en.js"
      },

      //You should signup for getting this key
      apiKey: "E8FEF7AE-3F36-4EAF-A451-456D05E6F2A3",

      //[optional] You can specify it for permanent access to your settings and dictionaries
      //userId: "<YOUR_USER_ID>",

      //[optional] path to js file with BeyondGrammar Core
      //sourcePath : "", 

      //[optional] path to service which provides grammar checking
      // url shouldn's contains / in the end
     serviceUrl : "https://rtg.prowritingaid.com", 
    },
    grammar: {
      //[optional] Default language [en-US, en-GB],
      languageIsoCode: "en-US",

      //[optional] checking Style. By default is "true"
      checkStyle: true,

      //[optional] checking Spelling. By default is "true"
      checkSpelling: true,

      //[optional] checking Grammar. By default is "true"
      checkGrammar: true,

      //[optional] Show thesaurus information by double click, by default true
      showThesaurusByDoubleClick: true,

      //[optional] Showing context thesaurus, works only if showThesaurusByDoubleClick = true, by default false
      showContextThesaurus: false,
    }
  }
});