在 TinyMCE、PHP 留言板中处理报价
我认为我的客户会被像 phpBB 这样的留言板中的大量花里胡哨的东西弄得不知所措,所以我从头开始。到目前为止,除了回复中引用的一个小问题外,一切都运行得很好。
当用户单击“引用”时,他们会看到以下内容(使用tinyMCE作为我的所见即所得): 替代文本 http://tapp-essexvfd.org/images/post_capture1.jpg
是一个用 CSS 设计的块引用,只要它本身就很好用。但显然,如果用户引用已经有引用的帖子(嵌套块引用),这会带来问题。
我考虑的一个解决方案是在将块引用标签输入编辑器之前将其更改为跨度,希望这里有人能够提供一个简单的解决方案。我确实考虑过使用跨度而不是块引用,但我喜欢用户能够单击tinyMCE 中的块引用按钮。
I decided that my client would be overwhelmed by a lot of bells and whistles in a message board like phpBB, so I started from scratch. So far everything has been working really well, apart from a little issue with quotes in replies.
When the user clicks Quote, they see this (using tinyMCE as my WYSIWYG):
alt text http://tapp-essexvfd.org/images/post_capture1.jpg
This is a blockquote styled with CSS, works great as long as it is by itself. But clearly this would pose a problem if a user were quoting a post that had a quote already (nested blockquotes).
One solution I considered was changing the blockquote tags to spans before they are entered into the editor, hoping that someone here might be able to provide a simple solution. I did consider using a span instead of blockquote but I like that the user has the ability to click the blockquote button in tinyMCE.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有什么问题吗?你的 CSS 样式?
对嵌套块引用使用半透明 BG 图像可以为每个嵌套提供漂亮的变暗效果。
What's the problem? Your CSS styling?
Using semitransparent BG images for nested blockquotes provides a nice darkening with each nest.