Coder Social home page Coder Social logo

Comments (7)

jaywcjlove avatar jaywcjlove commented on July 20, 2024

@SundaramMaheshkumar You can define your own md syntax, such as <!--input:value=xxxx--!>

Define your own rehype plug-in to parse your grammar

from react-md-editor.

SundaramMaheshkumar avatar SundaramMaheshkumar commented on July 20, 2024

@jaywcjlove

I am not sure whether I understand you properly.

Please find my codesandbox here.

In there, I have a button called Get content after the preview. Ideally, I want to get the updated raw markdown content ( as there would be changes when users input in HTML text boxes or checkboxes) on onClick of that button.

Currently, in that sandbox, I did a crude way of getting the raw HTML from the preview. But if I could get the markdown instead of processing the HTML, it would be great. But I couldn't figure out, how to achieve that!!!

Thanks.

from react-md-editor.

SundaramMaheshkumar avatar SundaramMaheshkumar commented on July 20, 2024

@jaywcjlove

Any suggestion or idea of how to achieve the above? Thank you

from react-md-editor.

jaywcjlove avatar jaywcjlove commented on July 20, 2024

Do you want to change the content, and then want to get the changed markdown content?
@jaywcjlove

from react-md-editor.

SundaramMaheshkumar avatar SundaramMaheshkumar commented on July 20, 2024

@jaywcjlove

I am not sure whether I understand you properly.

Please find my codesandbox here.

In there, I have a button called Get content after the preview. Ideally, I want to get the updated raw markdown content ( as there would be changes when users input in HTML text boxes or checkboxes) on onClick of that button.

Currently, in that sandbox, I did a crude way of getting the raw HTML from the preview. But if I could get the markdown instead of processing the HTML, it would be great. But I couldn't figure out, how to achieve that!!!

Thanks.

@jaywcjlove

As you see above images and in the sandbox, I type values in HTML text boxes or checkboxes in the preview. Yes, I wanted to get the markdown with these changes. In the sandbox, I did a crude way of getting the HTML and but am not sure how to get the changes in md format itself.

from react-md-editor.

jaywcjlove avatar jaywcjlove commented on July 20, 2024

@SundaramMaheshkumar Storing it in HTML comments or HTML attributes might be a good idea, but you'll need to change the markdown content yourself.

from react-md-editor.

SundaramMaheshkumar avatar SundaramMaheshkumar commented on July 20, 2024

@jaywcjlove

Thanks. I'll just use the HTML as the library supports pure HTML too. Because updating HTML and then updating markdown manually seems redundant.

from react-md-editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.