Introduction

    Moving editor from core to plugin will let use different editors depends on contents type, page properties etc.

    Intended Audience

     

    Additional information

     

    References

    Status

    Initial scoping by KarenA

    Functional Specification

    Use Cases

    Non-goals

    Technical Specification

    To move editor into the plugin we should have one main editor plugin to process all requests to sever. This plugin will concentrate business logic from EditPage.php, gui/editor.php and gui/loadeditor.php. It will also provide common javascript interface for all editors.

    If there are no other editor plugins handled user will see the textarea.

    Each of editor plugins should have dependence on the main editor plugin. These plugins are:

    • editor's core
    • editor class which is layer between editor core and plugin
    • handler for load editor hook which invokes all necessary javascripts

    Main editor plugin provides the following functionality:

    • ajax hooks for editor loading, transformations and checking permissions
    • saving of the form
    • common javascript interface
      • loading editor
      • save and cancel actions
      • check permissions

    The process of editing page in general case looks like:

    • User opens the page
    • Main editor plugin invokes javascript to handle edit page button
    • When user clicks edit page main plugin processes the ajax request
      • gets the page contents
      • generates the common javascript
      • generates html of the form
      • executes hook for other plugins
    • Each of plugins should handle the request
      • Plugin can use contents type property or other parameters to decide should be request handled or not
      • If editor can be used with current contents type plugin invokes javascript to loading editor
      • With this javascript plugin should provide priority of the editor and register editor loading function
    • When ajax request will return results we should get javascript code which will:
      • Register all editors via interface of main editor plugin
      • Add the form to the DOM of the page
      • Load high priority editor
    • When user saves the page:
      • Editor should send ajax request to check permissions
      • Then editor submits the form and main editor plugin should process the request and save the page

    UI requirements

    API requirements

    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by