Live data from Hacker News

WYSIHTML5: A better approach to rich text editing

xing.github.com

61–70 of 82 posts

Re: WYSIHTML5: A better approach to rich text editing

#61
post #33
post #4

Wouldn't it be more desirable to have these WYSIWYG editors serialize to a non-HTML markup (like textile or markdown) to reduce the hassle of user-input sanitization on the back-end? (e.g. stripping script and iframe tags). What's best-practice these days for storing and displaying rich-edit user input?

I doubt Markdown, BBCode or anything similar is a good idea here. That's just introducing extra complexity - and what for? The point of markdown is that its simple for humans to read and write directly, which isn't applicable here. The downside to markdown should be obvious: * more code, both server and client-side (to implement the to-and-from conversion) * more bugs (due to more code and the complexity of escaping…

I suppose it's strange to say this on HN where the markup is, well, atrocious, but after using Markdown for ages in varieties of places, it's simply more pleasant to use for the "advanced" user who doesn't want to memorize hotkeys or highlight and press buttons to give their text some basic simple formatting.

It's a hit on reddit, GitHub and more for a good reason. They could have whitelisted things as well, but they chose not to.

Re: WYSIHTML5: A better approach to rich text editing

#62
post #6

Earlier quoted context omitted.

Depends on the use case. If you are using it in as a website authoring tool, it makes sense to store the rich-edit user input as HTML itself. However, in a scenario like commenting or composing a message (where only limited editing options are available), storing in a format such as Markdown make sense.

Are you aware of any such editor that does store the data in Markdown or something similar?

https://github.com/OscarGodson/EpicEditor

Re: WYSIHTML5: A better approach to rich text editing

#64

Valid HTML5 markup? It's certainly not semantic. should be , should be

Only I don't want my text to be "strong", I want it to be bold, and I don't want my italicized items to me "emphasized", I bloody want them in italics.

I don't consider my bolds and italics to be mere style and much less I consider them mere suggestions.

Bold and italic are typographic conventions of author _intent_ (that is: semantics) with centuries of use. I put them there in purpose, and I don't want them converted to anything else via styling. Sure, someone can style "b" as "purple text with a yellow dotted underline", but I might as well make my _actual_ intention clear.

Outside of its proper context, "semantic" is just a BS notion that got popular with designers and co because it sounds sophisticated, giving rise to inane arguments similar to how many angels fit in the head of a needle.

Re: WYSIHTML5: A better approach to rich text editing

#65
post #3

Whenever I see "new rich HTML editor", I notice that there is no table editing. What's the point of editor that is missing the most needed function? You could argue that it is not needed, however lack of this function leads to cases of copy-paste from word/excel with bad markup.

Copy and pasting tables from MS Office is the most needed feature? I don't know whether to raise my eyebrows or feel bad for you.

How about neither, and just try to comprehend that tables are a common use case that if we haven't perfected yet in HTML editors it's web programmers/standards' fault and not Word's?

Re: WYSIHTML5: A better approach to rich text editing

#66
post #65

Earlier quoted context omitted.

Copy and pasting tables from MS Office is the most needed feature? I don't know whether to raise my eyebrows or feel bad for you.

How about neither, and just try to comprehend that tables are a common use case that if we haven't perfected yet in HTML editors it's web programmers/standards' fault and not Word's?

And why is that the logic conclusion exactly?

Re: WYSIHTML5: A better approach to rich text editing

#67

Creating a simple editor which works, seems to be quiet hard, judging based on all the horrible examples we have of existing ones. Hopefully, they'll keep it clean and don't add many new features.

It's hard, especially if you want to support IE8. You need a 100-line function simply to get cursor position in a cross-browser fashion.

Re: WYSIHTML5: A better approach to rich text editing

#68
post #44

Earlier quoted context omitted.

Cool! That's the first thing that hit my mind - how would this look in bootstrap? Thanks for doing and sharing this!

Just to be clear. I didn't write this! I just used it. The credit for writing this goes to James Hollingworth: https://github.com/jhollingworth

Thanks :) Glad you like it!

Re: WYSIHTML5: A better approach to rich text editing

#69
post #64

Valid HTML5 markup? It's certainly not semantic. should be , should be

Only I don't want my text to be "strong", I want it to be bold, and I don't want my italicized items to me "emphasized", I bloody want them in italics. I don't consider my bolds and italics to be mere style and much less I consider them mere suggestions. Bold and italic are typographic conventions of author _intent_ (that is: semantics) with centuries of use. I put them there in purpose, and I don't want them convert…

I understand that, but when I open your page in lynx I don't want to read text without any formatting because there are no direct equivalents to "bold" or "italics".

Re: WYSIHTML5: A better approach to rich text editing

#70
post #44

Earlier quoted context omitted.

Just to be clear. I didn't write this! I just used it. The credit for writing this goes to James Hollingworth: https://github.com/jhollingworth

Thanks :) Glad you like it!

Lol. You're lurking around here. Nice to see other Brits here!
Post reply on HN