TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Wysihtml – Open-source rich text editor for web apps

215 pointsby ollaover 10 years ago

19 comments

ollaover 10 years ago
We are trying to revive and modernise a once popular open source editor xing&#x2F;wysihtml5. It is configurable to be used with and without an iframe. The editable area API is separated from the toolbar so it would be easy to customise or completely rebuild the toolbar logic for your own app.<p>The Voog team
评论 #8769301 未加载
评论 #8770428 未加载
otherusernameover 10 years ago
Something I&#x27;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.<p>They&#x27;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 &lt;span class=&quot;highlight&quot;&gt; element.<p>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?
评论 #8767670 未加载
mhdover 10 years ago
Is there some way to sanitize the output? The prevalence of &lt;br&gt;&lt;br&gt; is something I&#x27;ve always disliked about WYSIWYG HTML editors (something a markdown converter doesn&#x27;t have to struggle with, usually).<p>I can do paragraphs by not manually breaking lines and instead select the second paragraph&#x27;s content, then apply the &quot;normal text&quot; style, but this isn&#x27;t exactly intuitive.<p>Or one could disallow further linebreaks and thus just create paragraphs when you&#x27;re entering a linebreak.
评论 #8767787 未加载
评论 #8767799 未加载
BenjaminNover 10 years ago
&quot;Fast and lightweight&quot; is 200ko?<p>We have so many choices when it comes to WYSIWYG. My favorite is <a href="https://github.com/daviferreira/medium-editor" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;daviferreira&#x2F;medium-editor</a>.
评论 #8768467 未加载
评论 #8776543 未加载
kemayoover 10 years ago
A few feedback points, I suppose...<p># Clicking the &quot;no-color&quot; option in the text color-picker doesn&#x27;t do anything.<p># Using the &quot;remove&quot; option on a link inserts a space as well as removing the link, which seems incorrect.<p># Using the &quot;remove&quot; option on a link doesn&#x27;t always remove the entire link. Repro on <a href="http://wysihtml.com/" rel="nofollow">http:&#x2F;&#x2F;wysihtml.com&#x2F;</a> by selecting the word &quot;typewriter&quot;, adding a link, then clicking on it again and removing the link. Depending on where you clicked either &quot;type&quot; or &quot;writer&quot; will still be linked.<p># Repeatedly toggling tags can get weird. e.g. select a word and keep on clicking the bold&#x2F;italic&#x2F;underline button, and note how it&#x27;ll toggle the tag on, toggle it off, and then just start adding spaces in front of it with every subsequent click.<p># Possibly related to the spaces issue, after toggling tags for a bit checking the source generated shows a lot of empty-tags, which is kind of messy.
评论 #8767794 未加载
评论 #8767693 未加载
andybakover 10 years ago
&gt; Unifies line-break handling across browsers (hitting enter will create &lt;br&gt; instead of &lt;p&gt; or &lt;div&gt;)<p>This implies it isn&#x27;t configurable and unfortunately - in my view this is the incorrect direction to unify in.<p>Hasn&#x27;t even MS Word nowadays standardized on Enter=paragraph break, Shift+Enter=line break
评论 #8769191 未加载
NARKOZover 10 years ago
For your rails apps you can use &#x27;wysihtml5-rails&#x27; gem.<p><a href="https://github.com/narkoz/wysihtml5-rails" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;narkoz&#x2F;wysihtml5-rails</a><p>Author plans to update it to use wysihtml as a drop-in replacement.
评论 #8767674 未加载
cstiglerover 10 years ago
FWIW, we&#x27;ve been pretty happy with the Froala Editor: <a href="https://editor.froala.com/" rel="nofollow">https:&#x2F;&#x2F;editor.froala.com&#x2F;</a>
fredkellyover 10 years ago
Having had the (dis)pleasure of working with TinyMCE on a number of past projects this looks like a no-brainer. The only thing I&#x27;m not sure about is the use of `data-wysihtml5-command` attributes to configure the toolbar, is there an option to configure this via a configuration object in JS? - e.g. I just pass the ID of the element I want to use and a set of options?
评论 #8767387 未加载
评论 #8767845 未加载
j_sover 10 years ago
There are a lot of commercial options available too; I was reminded of the &#x27;How I reverse-engineered Google Docs&#x27; discussion where the author recommended paying $200 for Redactor. Releasing an easily usable full-featured rich text editor is a generous gift!
metaraover 10 years ago
so timid<p>Try out their beautiful working app: <a href="http://voog.com" rel="nofollow">http:&#x2F;&#x2F;voog.com</a>
评论 #8767297 未加载
评论 #8767282 未加载
swalshover 10 years ago
This is very cool, I&#x27;ve used the Telerik editor (<a href="http://demos.telerik.com/kendo-ui/editor/index" rel="nofollow">http:&#x2F;&#x2F;demos.telerik.com&#x2F;kendo-ui&#x2F;editor&#x2F;index</a>) control in the past, but this might be a decent competitor.
WimLeersover 10 years ago
Why fork something that is incomplete, unstable, has very limited test coverage, and doesn&#x27;t tightly control the generated markup?<p>CKEditor has had the ACF (Advanced Content Filter) for &gt;1.5 years now. It allows you to very tightly control which tags and attributes are allowed.<p>This feature, and the rest of CKEditor has much, much more test coverage to account for the many browser quirks (notably in contentEditable) that they have had to work around, to prevent regressions. It&#x27;s a waste of time for everybody to solve the same problems and work around the same browser quirks over and over again.<p>The &quot;Ability to add uneditable area inside editor text flow (useful when building modules like video tools, advanced image editor etc).&quot; feature is probably the only interesting feature. But it&#x27;s nothing compared to CKEditor Widgets, which does exactly this, and much more (think storing structured content but transforming it to the specific markup that a frontend developer wants). Just compare Wysihtml&#x27;s &quot;advanced&quot; demo to the CKEditor Widgets demo: <a href="http://docs.ckeditor.com/#!/guide/dev_widgets" rel="nofollow">http:&#x2F;&#x2F;docs.ckeditor.com&#x2F;#!&#x2F;guide&#x2F;dev_widgets</a><p>See <a href="http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter" rel="nofollow">http:&#x2F;&#x2F;docs.ckeditor.com&#x2F;#!&#x2F;guide&#x2F;dev_advanced_content_filte...</a> for more about ACF and <a href="http://docs.ckeditor.com/#!/guide/dev_widgets" rel="nofollow">http:&#x2F;&#x2F;docs.ckeditor.com&#x2F;#!&#x2F;guide&#x2F;dev_widgets</a> for more about Widgets.<p>And yes, it&#x27;s open source: GPL&#x2F;LGPL&#x2F;MPL&#x2F;commercial: <a href="http://ckeditor.com/about/license" rel="nofollow">http:&#x2F;&#x2F;ckeditor.com&#x2F;about&#x2F;license</a><p>If we&#x27;d collaborate more rather than reinventing the wheel, we&#x27;d get so much further. One does not just write a WYSIWYG editor…
评论 #8769432 未加载
matthew86over 10 years ago
Thanks! Been looking for such editor. Will try it out soon.
LukeB_UKover 10 years ago
It seems to suffer from tags being left over even after all their content has been deleted. Many editors seem to suffer this too.
acomjeanover 10 years ago
Cool.<p>but why no jquery?<p>Just asking.<p>As someone who ported a embedded website away from jquery, it was painful, and I&#x27;ve come to really appreciate it
评论 #8767259 未加载
评论 #8767561 未加载
评论 #8767401 未加载
partsteetover 10 years ago
Looks nice.
kaspar-naaberover 10 years ago
Cool!
curiouslyover 10 years ago
so after I create an html how do I &quot;export&quot; out the html code?