bootiful-media-mogul / mogul-client

0 stars 0 forks source link

support markdown in all text panels #13

Open joshlong opened 1 month ago

joshlong commented 1 month ago

there should be a way to input markdown and then get live previews of the markdown. maybe treat it like i do the AI panel, and have a side panel off to the side? or, maybe have a little widget next to each panel that i can check to have the client preview the markdown just below the text area?

should titles also support markdown?

joshlong commented 1 week ago

i introdced a WritingTools compoennt which wraps any input - a textarea or an input. Perhaps I can generify that and then use it as the basis for both WritingTools and this new MarkdownPreview wrapper?

joshlong commented 1 week ago

i think the markdown preview could pop under the input just like WritingTools does. it could show a preview in the popunder. This begs the question: what if I click on both MarkdownPreview and WritingTools at the same time? we could use the event bus to effectively collapse any in-play popunders and allow the new popunder exclusive visibility. if we generify this mechanism into a base component it could handle the plumbing to allow these components to play well together

joshlong commented 1 week ago

do we need a protocol to allow any of these wrappers to shut themselves down safely? maybe a callback like hide? is it possible to enumerate the components attached to a given input? perhaps this base component could register each instance of a component in some global cache that's keyed by the underlying input / textarea?