0

小さなニュース投稿 (非技術者によって書かれた) を変換する簡単な CakePHP の方法を最初に Web で検索したとき、そのflay方法がTextHelper. ただし、 TextileHelper w/SmartyPantsを参照すると、非推奨になっていることが判明しました。

確かに、テキスタイルは非常に有能なマークアップ言語のようです。とはいえ、技術に詳しくないライターにとっては複雑すぎると思います。彼が望んでいるのは、2 つの改行で区切られた段落を記述し、ハイパーリンクをそのまま挿入できることだけです。

CakePHP でそれを達成するための単純で肥大化しない方法はありますか?

4

2 に答える 2

1

Languages like Textile or Markdown (used on stackoverflow, for instance) are great for people that are used to editing text in "plain mode", and have a bit of technical-background, I think...

But for "real normal people" that don't understand that much about computers, those are not really user-friendly, nor fault-tolerant :-( -- and are too far away from MS Word ^^
Even I, who understand why those languages are used, and how they work, often have to edit my posts on SO because of errors like "not inserting an empty line at the right place to get this or that recognized :-(

A nice solution for your users would be to use some kind of WYSIWYG editor, so they could type in their text, use some little MS Word-looking icons to format it, and all that.

Common examples of those are

  • TinyMCE (this link points to the "simple demo" page, which might be just what your users need)
  • FCKeditor

They are not that hard to integrate in an existing application, and can really make your backoffice more user-friendly !
And, depending on the use editing text, you might activate more or less options, to best fit their needs.

But there are lots of others ;-)


It would imply that you store HTML text in your DB ; and, for security reasons, you might want to sanitize it using something like HTMLPurifier.

于 2009-08-02T11:35:33.933 に答える
0

I think you could create your own markup set if it will only have several members. Handling those marks is easily, you just need to replace them using regular expressions after submit.

Another solution is to add a JavaSctipt WYSIWYG to your site. Something like TinyMCE could make editing even less painful.

于 2009-08-02T11:34:32.797 に答える