Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Something I'd really like is a way to expose CSS styles to the editor easily. One of the major problems I always run into is that my customers try to make things look like the rest of the website by hacking the text a bit.

They'll see a highlighted word or sentence with a bold font, wider spacing and a blue background. So they set the background blue, the font bold and the spacing wider. But really, the editor should provide an intuitive way to apply the <span class="highlight"> element.

Some editors out there do this, but they generally suck in other areas. Wysihtml seems to apply inline CSS. Can it easily apply a class too?



It can apply classes too as you wish. You can use formatInline or formatBlock command to add inline or block elements with needed classes. An example how its done internally https://github.com/Voog/wysihtml/blob/master/src/commands/fo...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: