Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Changing editor for different content types #72

Open

Description

@Kingtreemonkey

Hi,

I have implemented a basic silex app using createphp. Im pretty happy so far but I'd like to take it a step further!

I plan to eventually have various kinds of content to edit, like dates, images and other collections.

My current goal is to create a simple gallery, so id like to just have a list of images with an add button which brings up just a upload image interface. I'm currently it's CKeditor for everything.

Any advice welcomed!

Activity

  1. flack commented on Feb 5, 2015

    @flack
    Collaborator

    Hi,

    yes, having different editors (datepickers & such) would be great. As far as I can tell, you would need to implement editor widgets for those, like the ones found here:

    https://github.com/bergie/create/tree/master/src/editingWidgets

  2. dbu commented on Feb 6, 2015

    @dbu
    Collaborator

    @Kingtreemonkey this sounds very interesting. as you can specify the "editor" for each field, it should be not too hard to add custom editors. but its a bit underdocumented on create.js side. if you manage to do anything, would love to hear about it. also check with @bergie if you can contribute the widgets into create.js itself. a widget that allows to mark an image as its own editable field with file upload and selection from server would be awesome indeed.

  3. bergie commented on Feb 7, 2015

    @bergie
    Contributor

    Basically different editor loading can be directed based on the content schema, which you need to provide in a VIE-compatible way.

    Example of setting up the type system:
    https://github.com/bergie/create/blob/master/examples/example-withtype.html#L41

    Providing different content-creation templates for different types:
    https://github.com/bergie/create/blob/master/examples/example-withtype.html#L86

    Then you can set up custom editor widgets for different types (default is the catch-all type, editors can be associated based on either the predicate or type in VIE data structure):
    https://github.com/bergie/create/blob/master/src/jquery.Midgard.midgardEditable.js#L27

  4. Kingtreemonkey commented on Feb 9, 2015

    @Kingtreemonkey
    ContributorAuthor

    Thanks Bergie, very useful information :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions