Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:38:40+00:00 2026-06-11T16:38:40+00:00

This is not a duplicate question, i know how to create a rich editor,

  • 0

This is not a duplicate question, i know how to create a rich editor, but i meet problems

I want to make a rich text box like stackoverflow does.

  1. I import the wmd plugin just like SO.

  2. When i save a topic to mysql, it saves the processed text like this:

< p>hello world< /p>

< pre >< code >class Text {} < /code >< /pre >

This is normal i think because the html page can render this correctly.

But When i try to edit this topic, it directly shows the code in my textarea:

enter image description here

What i need is this(Just like the first time i entered):

enter image description here

My textarea code is very simple like this:

<!-- text area start -->
      <div id="wmd-button-bar"></div>
      <textarea id="wmd-input" name="description" onblur="checkForm()">${topic?.description}</textarea>
      <div id="wmd-preview"></div>
<!-- text area end -->

Anyone can help ? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:38:42+00:00Added an answer on June 11, 2026 at 4:38 pm

    I find the answer myself.

    What i need to do is simply add a new hidden field to store the original text before wmd process it.

    And then i save both original and processed text into my database.

    When i need to edit it, just use original text.
    When i need to render it, use the processed text.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope this question is not a duplicate but I didn't find anything equivalent
Ok, I know this seems like a duplicate question, but don't think it is.
I know this type of question has been asked before, but I could not
This is NOT a duplicate question, and the problem is driving me crazy. I
Note, this is not a duplicate of .prop() vs .attr() ; that question refers
This is not a duplicate post, i just done research but not helping. First,
I am sorry if this is a duplicate but I was not able to
I know there is a seemingly exact duplicate of this question here: iPhone SDK:
Ok this is not duplicate of Alternative to Process.Start() because my question is something
I know this question is a duplicate of Execute method on startup in spring

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.