Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-13 Thread csnyder
On Mon, Oct 13, 2008 at 10:12 AM, Jake McGraw <[EMAIL PROTECTED]> wrote: > Forget diffs and HTML text, this problem totally ate up all my time at > a startup where a JavaScript WYSIWYG editor was the only choice for > generating a marked-up document. May I suggest Markdown [1,2] + the > Showdown pr

Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-13 Thread Jake McGraw
Forget diffs and HTML text, this problem totally ate up all my time at a startup where a JavaScript WYSIWYG editor was the only choice for generating a marked-up document. May I suggest Markdown [1,2] + the Showdown preview panel [3]. Markdown is a very light syntax for generating HTML documents, S

Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-13 Thread John Campbell
On Sun, Oct 12, 2008 at 7:19 PM, Hans Zaunere <[EMAIL PROTECTED]> wrote: > Gentlemen, > >> > The safest approach is probably to pass the html through tidy, and >> > then into DOM, and traverse and count the length of text nodes, but >> > that would be quite slow if you ran it on every request. >> >

RE: [nyphp-talk] Blog Posts with Embedded Content

2008-10-12 Thread Hans Zaunere
Gentlemen, > > The safest approach is probably to pass the html through tidy, and > > then into DOM, and traverse and count the length of text nodes, but > > that would be quite slow if you ran it on every request. > > Right, +1 for Tidy and DOM, it's the "real" way to do it. You won't > need to

Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-08 Thread csnyder
On Tue, Oct 7, 2008 at 9:19 PM, John Campbell <[EMAIL PROTECTED]> wrote: > The safest approach is probably to pass the html through tidy, and > then into DOM, and traverse and count the length of text nodes, but > that would be quite slow if you ran it on every request. Right, +1 for Tidy and DOM

Re: [nyphp-talk] Blog Posts with Embedded Content

2008-10-07 Thread John Campbell
On Tue, Oct 7, 2008 at 5:27 PM, Hans Zaunere <[EMAIL PROTECTED]> wrote: > In one part of the application, they want to show only the first X number of > characters, before forcing a user to login. So we need to cut the submitted > text at this character count, yet, of course, not cut in the middle

[nyphp-talk] Blog Posts with Embedded Content

2008-10-07 Thread Hans Zaunere
Hello, So people post blogs, which may include a youtube link or image or href embedded. In one part of the application, they want to show only the first X number of characters, before forcing a user to login. So we need to cut the submitted text at this character count, yet, of course, not cut