Add Paragraph Plugin

The Add Paragraph Plugin is a generic REST Plugin that enables simple and flexible integration with Federation REST Services provided by developers for the wider community of users.

# What it does

The plugin enables a logged in user to add one-or-more new paragraphs to the current Fedwiki Page. For non-logged in users it simply shows some text saying:

This feature is only available to the site owner.

There is one button displayed with the label "Add Paragraph(s)". Pressing this button makes a jQuery REST Request to the url specified in the plugin configuration.

#Configuring the plugin

A site-owner is able to double-click and edit the text of the plugin - providing a URL to a RESTful Web Service, and optionally some data to POST.

# How it works

  1. The plugin takes the parameter stored as a URL, and the METHOD, and any keyed params and makes a jQuery REST call based on this data.
  2. This call is either direct to the RESTful service (in which case the client expect CORS headers), or the client posts to it's origin-server which uses a server side plugin component to make the call to the REST Service. This latter option could allow the REST Service to white-list
  3. The server checks the
  4. The wiki-client takes the JSON returned and uses it to create one or more paragraph items, as specified in the JSON returned to it by the RESTful web service.
  5. It adds the new paragraphs immediately below the Add Paragraph Plugin that initiated the request. An author can later move these items to whatever location thy want.

Members of the Federation provide simple CGI's on a server they own, programmed in whatever language they prefer, which responds at the URL specified with Fedwiki Page Json.

Here are some questions regarding the implementation:

http://audioboom.com/boos/3314887-fedwiki-plugin-ideas.mp3 .

London, Greater London, United Kingdom - openstreetmap

This recording was made near London, by fortyfoxes, on Jun 25, 2015 at 12:19 PM - audioboom

{ "result": "okay", "items": [ { "type": "paragraph", "id": "550a8f9ea88b6b9b", "text": "The Raspberry Pi is a credit card–sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools - - wikipedia " }, { "type": "image", "id": "fe5074abc80462dd", "url": "data:image/jpeg;base64,/9j/4AAQ..., "caption": "Uploaded image", "text": "Raspberry Pi Model B Revision 1" }, { "type": "markdown", "id": "993d71f8fd3acbc3", "text": "#Raspberry Pi 2" } ] }