Code Monkey home page Code Monkey logo

create's Introduction

Create - On-site web editing interface

Create logo

Create, from the Midgard Project is a comprehensive web editing interface for Content Management Systems. It is designed to provide a modern, fully browser-based HTML5 environment for managing content. Create can be adapted to work on almost any content management backend.

Midgard Create user interface, in March 2011 Midgard Create user interface, in March 2011

Features

  • Making RDFa-annotated content on pages editable
  • Managing collections of content (add, remove)
  • Local, in-browser storage and retrieval of unsaved content
  • Adaptable connector for communicating with the back-end system
  • Running workflows (approval, etc.) for content items
  • Browsing and reverting content history
  • Easy rebranding of the interface with some CSS

Future plans

  • Adopt the Web Intents specification for better image and link handling
  • Content annotation and auto-tagging with Apache Stanbol

Dependencies

  • Hallo - distraction-free content editor (optionally, Aloha Editor)
  • VIE - editable RDFa library
  • Backbone.js - client-side management of models, views, and collections
  • jQuery UI - widget and effect library
  • Modernizr - HTML5 browser compatibility library

Integrating Create with your CMS

In nutshell, you have to do the following:

  • Annotate your content with RDFa
  • Include the Create JavaScript file(s)
  • Implement Backbone.sync for your back-end

Starting Create

Starting Create:

jQuery(document).ready(function() {
    jQuery('body').midgardCreate({
        url: '/some/backend/url'
    });
});

You can pass Create configuration options when calling the midgardCreate widget. For example, to use Aloha Editor instead of Hallo, do:

jQuery('body').midgardCreate({
    url: '/some/backend/url',
    editor: 'aloha'
});

Communications with the back-end

Create communicates with your server-side system using Backbone.sync. By default this means that we send and retrieve content encoded in JSON-LD over XmlHttpRequest calls.

If you're using this default approach, it is important to provide the URL of the endpoint on your server that you want Backbone and Create to talk with. This can be done by passing a string when initializing midgardCreate:

jQuery('body').midgardCreate({
    url: '/some/backend/url'
});

When implemented this way, all communications from Create will happen using normal RESTful HTTP calls to that URL.

  • Creating a new object makes a HTTP POST to the URL
  • Updating or fetching an object makes a HTTP PUT or HTTP GET to that URL with the id of the object appended (for example /some/backend/url/objectId)

If you need more flexibility with your URL structure, you can also pass a function that returns the URL for an object.

You can override this default communications layer by implementing your own Backbone.sync method. Some examples:

Events

Create is an event-based user interface. Normally integrators shouldn't need to deal with these events, but they're explained here in case of some customization needs.

  • midgardcreatestatechange: when user switches between browse and edit modes. Event data contains an object with key state telling the state being changed to
  • midgardtoolbarstatechange: when user opens or minimizes the toolbar. Event data contains an object with key display telling the new state
  • midgardeditableenable: when an object has been made editable. Event data contains an object with key instance providing the Backbone model instance and entityElement providing the element containing the object
  • midgardeditabledisable: when an object has been made non-editable. Event data contains an object with key instance providing the Backbone model instance and entityElement providing the element containing the object
  • midgardeditableactivated: when a particular property of an object has been activated in an editor. Event data contains keys property, instance, element and entityElement
  • midgardeditabledeactivated: when a particular property of an object has been deactivated in an editor. Event data contains keys property, instance, element and entityElement
  • midgardeditablechanged: when a particular property of an object has been changed in an editor. Event data contains keys property, instance, element and entityElement

You can use normal jQuery event methods to deal with these events.

Read more

Status

This repository contains the new version of Create that is having its dependencies on Midgard MVC removed so that it can work with any back-end system. This work is still ongoing, and so most of the functionality doesn't work yet.

create's People

Contributors

bergie avatar fabian avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.