contentful / extensions

Repository providing samples using the UI Extensions SDK
ISC License
204 stars 211 forks source link

Can you open source the markdown widget? #17

Closed jessegavin closed 5 years ago

jessegavin commented 7 years ago

I need to allow my editors to create inline links to other entities from text in a markdown field.

Because this feature isn't provided out of the box, I was hoping to clone and modify the markdown widget so I could customize the default "link" dialog. I'll use the dialog.selectSingleEntry() to allow them to select an entry. And with their selection I'll create a markdown link like so..

[link text here](entry:ABC123)

Then, in my web application code, I'll expand that into a url.

I can use an alternate Markdown editor if yours can't be open sourced, but I thought I would ask first.

geigerzaehler commented 7 years ago

Hi @jessegavin. Open sourcing the Markdown editor is already on our roadmap but we have no clear time frame yet. We’ll get back to you as soon as we know more.

jessegavin commented 7 years ago

I have sort of figured out a wonky work-around for my use case.

I realized that your link dialog will allow me to enter urls in the form of http://{content_id}. This will allow my editors to enter the links by hand.

I may create a UI Extension which will add a button which will trigger dialog.selectSingleEntry() so they at least have an easy way to get the id of the entry they want to link to.

johnandblue commented 7 years ago

Hi @jessegavin, have you been able to create the extension that you mentioned? I'm in the same situation with the editors...

jessegavin commented 6 years ago

@geigerzaehler Any word on this?

dsbrianwebster commented 6 years ago

@geigerzaehler This is touches on significant issue as my team sees it! Forgive me as I broaden this topic a bit, but if Contentful is serious about becoming a fully viable alternative to Wordpress (which we all WANT desperately), there needs to be some serious work from the POV of the content creator. Specifically around the body field.

  1. YES, to the topic at hand... the linking solution w/in the editor is one of several deal breakers for our clients. We build sites for mid-to-large news publications and editorial teams, and they would NEVER go for having to type out absolute urls every time they wanted to cross link a post in the article body. Who knows the URL's of all the entries off hand? Crazy talk! We very much need a widget comparable to Wordpress inline link.

  2. Markdown -- the choice of Markdown is fine as a behind the scenes language. BUT, the fact that editors MUST interact with it and that they can not work in the preview/rendered mode while the markdown happens in the bg is crazy. Netlify CMS and several others work that way and it is vastly superior. Expecting non-tech-savvy folk to escape characters like "[", will never fly. Also, petty note, but the font family used the body field... total style clash.

  3. 50k hard character limit -- say what now? at ALL plan levels!?!? I get the idea of modular content via linked content types and all, but sometimes that is just not a preferable solution. I was told from support that the JSON field has no limit, but again... we're going to take clients from WP's editor to a JSON field?? I think not.

There are many more things to say on this front, but overall it all comes down to the fact that BodyField vs BodyField -- WP crushes Contentful right now. Despite all the WP headaches that Contentful alleviates we could never make a hard pitch to a WP client that they'll be happier in Contentful until it is competitive or superior on this front.

martzoukos commented 6 years ago

Hello @dsbrianwebster !

You just explained some of the problems that we are trying to solve with a feature we're currently working on 🎉 . We like talking to our users while building our features, so would you be available for a 45' chat in order to discuss about this feature and your points above? If yes, send me a DM or let me know here. Otherwise, we could discuss here or in another channel.

@jessegavin regarding your question about the Markdown editor open sourcing, we had to stash this initiative in order to focus on other topics, one of which is aforementioned feature which plans to tackle some of the problems that this Markdown editor maybe wasn't meant to do.

dsbrianwebster commented 6 years ago

@martzoukos lets do it! I have a vested interest in seeing Contentful level up in this regard and will gladly carve out time for this. DM'ing your email with my avail now :)

denito commented 6 years ago

I am evaluating Contentful as a potential option and while I love many features, the failures of the Markdown editor especially in preview mode is a deal-breaker - our writers will never adopt it as it currently is I'm afraid

martzoukos commented 6 years ago

Hello @denito . What would you say are the deal-breaker issues with the preview mode? Thank you for the feedback!

denito commented 6 years ago

Hi @martzoukos - Thanks for your interest in my concern.

The deal breaker for us is that the preview mode does not seem to render items added via the "Insert media" button - which to my mind seems like a bug. This is also the case with videos and other rich media I have tried

An example. I add a pdf https://snag.gy/C91J4T.jpg

In Preview mode it renders as a missing image https://snag.gy/ZHT1Me.jpg

In the frontend using the sample Gatsby code from your github it is rendered neither as a hyperlink nor an object but with an <img tag and thus as a missing image

https://snag.gy/kKlSb4.jpg

floelhoeffel commented 5 years ago

I am closing this issue as this is not going to be solved through a UI Extension. @denito talking to @martzoukos is the way to go.

Shy commented 4 years ago

Just wanted to toss a comment here for folks that find this issue via google. We've open sourced our field extensions including our Markdown editor. You can learn more at https://www.contentful.com/developers/docs/extensibility/field-editors/

jessegavin commented 4 years ago

3 years later! Thanks.