GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.95k stars 395 forks source link

How to edit page settings rather than just page text? #387

Closed marcesh closed 6 years ago

marcesh commented 7 years ago

Let's say i'm using ContentTools to edit a blog article, so the text, headline etc. edits nicely. But how about settings like "category" of the blogpost? I can edit the name of "category" but is there a way to have it turn into e.g. some sort of select box and give me all possible categories to select instead of editing the current category name itself?

anthonyjb commented 7 years ago

Hi @marcesh - that's currently beyond the scope of the base editor itself however some nice examples of how to tackle this task have been provided https://www.youtube.com/watch?v=cpkFQlZxXrQ (3:31)

marcesh commented 7 years ago

thanks for the quick response. would it e.g. be possible to "unhide" a special div containing a form with all the settings underneath the blog article itself upon pressing the edit button? how would i catch that event to unhide the form? i can't seem to find anything in the docs

anthonyjb commented 7 years ago

@marcesh just to follow up on this - ContentFlow now does something very similar to this (in terms of the show hide functionality you mention) the relevant code is here: