About SharePoint Ajax Content Load

Use Ajax to load content from files into SharePoint.

SharePoint Ajax Content Load uses Ajax to load content into SharePoint. This simple but powerful solution extends the standard Richtext HTML editor in SharePoint with the option to insert fields containing linked files. Available for all implementations of SharePoint 2013 and 2010.

SharePoint Ajax Content Load Syntax

  • MyFile.txt - Just a single file name loads the file from the <Current Web>/modulerixAjaxContent library.
  • -site-MyFile.txt - Adding the -site- tag loads the file from the <Root Web of Site Collection>/modulerixAjaxContent library.
  • -root-MyFile.txt - Adding the -root- tag loads the file from the <Root Web of Root Site Collection>/modulerixAjaxContent library.
  • /MyLib/MyFile.txt - With a leading / or http the file is loaded from the specified url.
  • MyFile.txt{"mytoken": "mytokenvalue"} - A additional object (JSON-format) to specify tokens with values you want to replace before the content is injected.
  • MyFile.txt{"mytoken": "-noencode-mytokenvalue"} - Adding the -noencode- tag on a token value means the string will not be HTML encoded.

Global JavaScript Object and Token Replacement
The global JavaScript object $.mxal is available to help you write reusable HTML templates and JavaScript libraries with relative paths to the current Web or site collection. The object has the following properties (you can extend):

  • weburl - The url to the current web.
  • webliburl - The url to the library of the current web.
  • siteurl - The url to the current site collection.
  • siteliburl - The url to the library of the current site.
  • rootliburl - The url to the library of the root site.

Each of these properties can also be used as a string replace token in your files.