I am looking for a non-HTML Rich text editing solution.
Since I do not want to allow users to post HTML code from fear of various XSS reasons I implemented a Wiki Markup solution using MarkItUp which works great.
However, there is a loud demand for a real WYSIWYG Rich Text editing.
I found out that CKEditor can support external Custom Data Processors that theoretically can have it work with any markup language.
However, I couldn't find any implementation of such a Custom Processor...
Does anyone knows of such implementation (Wiki Markup or others: MarkDown, BBCode, etc.)?
Does anyone know of any other solution to the situation?
I would prefer a client side only solution but an Ajax based converter using a .Net based converter is also acceptable.
Thanks!
A basic BBCode plugin is available in the CKEditor package: http://nightly.ckeditor.com/latest/ckeditor/_samples/bbcode.html
Related
I am working with a web project where I have full control on the "client web page" (I can add or modify HTML / CSS / JS)
The content management system is, however, not under our control. That CMS exposes one text box where I can input some description text that will be displayed on client web page but does html sanitization which remove all html tags. This prevent me from styling my text field.
Basically
<h2 class="red-text">Some Text I Wanna Style</h2>
Become just Some Text I Wanna Style
I trust that there is some way around this as I have full access to the client side which means I can implement my own "markup system" like BBCode?
[b]bolded text[/b]
Where I can find the tag and use JS to transform it to appropriate CSS class.
My question is that: Am I approaching this issue the correct way? Is there any standard/common method/library to solve this kind of problem?
Edit: I do not have access to the server side, only the client side
If you're only using light markup, then try using Markdown! Its ridiculously popular and has a million libraries in every language conceivable (most of all JS).
Almost certainly the easiest thing to use, given the simplicity of the libraries that exist for it. If its suitable for this project, I highly recommend it :)
I imagine that some libraries support extending the syntax with your own, custom rules too!
In one of the legacy project, business want to have rich text area on the client page.
The page is based on XSLT and javascript.
The knowledge that I am having about xsl/xslt is limited. I searched on internet but not able to find any helpful/complete answer to my question.
Need to know whether we can support rich text editor in XSL/XSLT page.
The traditional approach to using XSLT on the browser is that XSLT simply generates the HTML page content. So you have to think about how to do the rich text editing in HTML/Javascript, and then when you've worked out what HTML and Javascript you want, it's a fairly simple job to write the XSLT code to generate it.
If you want to code more of the actual interactive behaviour in XSLT, then you could consider using Saxon-JS. As well as supporting XSLT 3.0 rather than the rather ancient 1.0 standard supported natively by the browsers, it allows you to write XSLT code that actually responds to user input events, rather than having to write this in Javascript. Declaration of interest: Saxon-JS is my product.
My web application is similar to StackOverflow in that different users frequently edit the same blob of text.
Currently we only support plain text, and therefore it's easy to show users how the text has changed between edits.
I want to support rich text in these fields, but my users are non-technical and therefore markup of any kind is not an option.
Are there any javascript-based rich text editors that support diffs? Ideally the diffs would be in rich text as well, but if necessary they could be rendered in markdown or similar (I'd like to avoid raw HTML at all costs).
Xopus 4 supports live tracking of text changes. As opposed to a diff change tracking allows you to follow and accept/reject the changes of multiple users.
Xopus is a web based WYSIWYG XML editor so you can have it edit your own XML flavor.
I don't think anyone can authoritatively answer no to this question, but I've never heard of a Javascript WYSIWYG editor that does diffs.
Stack Overflow does diffs on the server side. You'll probably have better luck if you look for a server-side component to do the job. If you need to show the diff as the user types, or something like that, you could use AJAX to hand off the diff work to the server.
I've got page to edit some html code from db, to do that I use openwysiwig http://www.openwebware.com/wysiwyg/demo.shtml which hosts over textarea, functions implemented in editor to insert images and hyperlinks aren't quite suitable for me, so I need to find some piece of code which help me to change/insert text to that area from outside the editor itself.
I've tried to find a solution but I could't find anything valuable; I've only learned that openwysiwig creates iframe over host textarea or something like that; besides that nothing what would solve my problem.
Dunno why FCKEditor got down~voted but it most certainly can do what you need. It has a very usable javascript API which allows you to insert elements into the editor area fairly easily. it integrates well with a wide variety of server tech also and includes a well designed plugin architecture for expansion. Has a lot of support and sample code, and I've used it in tricky ajax-driven environments and am very happy with its capabilities. I can't find any usable Javascript api documents for openwysiwyg. You should be able to get FCK up and running in under an hour I would think
This isn't very helpful perhaps, but something like tinymce or fckeditor is much better documented. I suggest changing.
I'd like to dynamicly parse in text wiki-content.
I found JsWiki but its in beta form, and looks like with no community even developers). Any other?
It depends what you mean by wiki content. There are many wiki frameworks just as there are many formats for wiki text. If you're looking for something that parses mediawiki content, such as wikipedia, there's a good list of parsers here. Some are Javascript based and I've had a good experience with one of them, InstaView.
It may be that you're just looking for a form of simple markup, in which case you could try using a library like ShowDown instead.
You could use the Ra-Ajax InPlaceEdit for such things if you're on ASP.NET. It doesn't have automated built in wiki parsing, but it allows for adding up any control you wish including LinkButtons and Literals which you can then build up with the HTML you want yourself...
There is another beautiful Javascript (only) based wiki editor. I just loved the idea itself. Check it out TiddlyWiki