29thStPublishing / Dumpling2

0 stars 0 forks source link

Replace regex (pattern) with actual images and sound files #5

Open norabearman opened 9 years ago

norabearman commented 9 years ago

(should support other multimedia content like videos as well)

lata-nga commented 9 years ago

@norabearman, @djacobs - should I use HTML 5 tags for audio and video assets? I am checking for image assets and adding an tag like Dumpling does

norabearman commented 9 years ago

@lata-nga I'm not sure and David is out! Can we come back to this next week? Or is it blocking you?

lata-nga commented 9 years ago

No problem, I have other things to work on till then

djacobs commented 9 years ago

"should I use HTML 5 tags for audio and video assets?"

If possible, no, because HTML is not a requirement - we expect to build TextKit apps on top of Dumpling 2 (and for other people to build TextKit apps on Dumpling 2).

lata-nga commented 9 years ago

So what should I replace it with? Dumpling as of now replaces images with img tags. So what should audio and video placeholders be replaced with?

djacobs commented 9 years ago

Let's talk through this tomorrow - that's actually work that the client should be doing, in my opinion, not Dumpling.

David

On Mon, Mar 16, 2015 at 12:21 PM lata-nga notifications@github.com wrote:

So what should I replace it with? Dumpling as of now replaces images with img tags. So what should audio and video placeholders be replaced with?

— Reply to this email directly or view it on GitHub https://github.com/29thStPublishing/Dumpling2/issues/5#issuecomment-81772188 .

adregan commented 9 years ago

I'm actually curious as to what the appropriate method of storing this content would be if we were to take a step down the native text path. I would wonder if this would be an eventual API feature.

ie. toggle native text vs web view

native text would likely want to be structured:

body: [
  {"type": "text", "content": "Lorem Ipsum..."},
  {"type": "image", "content": "<asset id>"},
  {"type": "text", "content": "More Lorem Ipsum"},
]
djacobs commented 9 years ago

We discussed briefly this morning! Yes, this would surely necessitate API & Platypus changes to do it right. And we'd probably want to use http://quilljs.com/ (I believe suggested by you!)

Alternatively, we may want to use OS X's native textare widget which offers text styling controls and saves attributed strings. In this scheme, the baked text would be an asset type. (/me waves hands, moonwalks away).

But for the first iteration, I think we'd try and push this logic onto the iOS client as much as possible. If we have a customer that insists on this, we'd revisit. Make sense?

lata-nga commented 9 years ago

@djacobs so for now, do I let the client define the text to be replaced and what it should be replaced with? Or just send them the Article object and let them decide what they wish to do with it?

lata-nga commented 9 years ago

For now we let the user make whatever changes they wish to to the article body and save the article back to Realm The methods we have should suffice - get or search articles for an issue, make changes in the enclosing app, save article object back to realm (or update if it already exists)