TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Save rich text in Rails from contentEditable divs?

1 点作者 tommaxwell超过 11 年前
Hi HN,<p>So I&#x27;m a Rails newbie making my first app and am running into some problems with my content editor. The user is supposed to be able to make entries, like diary entries, so the content editor should be simple. But I don&#x27;t know how to save things like paragraph breaks and apostrophe&#x27;s in the database and render them properly again when the user opens the entry.<p>Are there any gems or plugins that could help me with this? I would really like to be able to preserve my contentEditable divs, as they make the design clean.

1 comment

macarthy12超过 11 年前
This content is more suited to stackoverflow.com