Rich text editor / RTE frameworks that works with Mark.js - wysiwyg

I'm working on a project where I need advanced text highlighting features on a rich text editor.
I've came across mark.js, which has a really powerful API for text highlighting logic. However, I couldn't find any rich text editors, or rich text editor frameworks that works with mark.js.
I've been using draft.js, but I recently started looking for some alternatives. There are ones that stands out, such as Slate and Quill, but none of them seems to support mark.js.
Anyone know any alternative WYSIWYG editor that supports such a feature ?
Thanks!

Related

How to build a pure e4 RCP Text Editor

I am using the latest Eclipse 4.7 Eclipse. I am trying to build a language sensitive editor for a pure e4 RCP application. I have modeled my editor after the example XML Text Editor template project (generated from File->New->Plug-in project). I have modified it and extended it to support my custom language (loosely based on specialized XML tags/elements/attributes).
I can run this plugin on its own from the default product “org.eclipse.platform.ide” and it works just fine. But I am trying to include this plug-in into my own pure e4 RCP application and I am having a challenge in figuring out how to present my custom editor.
I try to follow the tutorial from Vogella found here: http://www.vogella.com/tutorials/EclipseEditors/article.html#add-simple-content-assist
I even purchased the Vogella book.
But that example looks nothing like the standard XML Text Editor example. From the tutorial, it mentions that to launch the editor programmatically, it implies that you need to create your own implementation of IEditorInput – but how does this relate to how the example XML Text Editor provides input for the editor through extending the FileDocuementProvider?
Perhaps the XML Text Editor example is the old 3.X way of doing things and I need to refactor my editor. I can do this – but then are there pure e4 RCP Text Editor examples similar in functionality to the XML Text Editor example? I really do need the syntax highlighting, validation, support markers, etc. found in the XML Editor example. Where can I go to learn how to do this?

In the Eclipse HTML editor, is there an easy way to have custom tags available in content assist (autocomplete)?

I'm learning to use a new hosted e-commerce system at work which uses a proprietary markup/scripting language for its page templates. They are similar to JSP pages (although the server tags don't have a prefix, i.e. there is no "xsp:") and use ${expressions} similar to Expression Language. We are transitioning from a .Net system, so all of my fellow devs are very used to having thorough IntelliSense available in our editors.
So, my question is whether it is possible to make these custom tags available in content assist, and whether it is worth the hassle if there is any. (I'm aware the latter is subjective - I'm a reasonable guy and open to opinions.)
FYI, I'm more concerned with auto-completion of tags, but expressions would be great as well depending on how much work is involved. We are using eclipse for Java EE, Juno (core IDE v4.2.1) with WTP... Sorry I'm not really sure how or what to share as far as versions and components go! Let me know if any additional info would help.
Thanks in advance.
A decidedly non-hassle-free answer would be to create an Eclipse plug-in to support your proprietary template language. One place to start might be Veloeclipse, a HTML/XML/JSP/Velocity Editor for Eclipse, which claims to have the following features which you may find interesting:
Smart indentation of velocity directives (on pressing return or when using tabs)
Code folding
Code Formatting
Smart indentation of html tags (on pressing return or when using tabs)
Syntax highlighting for both html and velocity
Autocompletion and Content assist for tags, directives and references (Ctrl + space in html attribute values or when opening or closing tags)
Sources here: http://code.google.com/p/veloeclipse/source/checkout

How to setup a new language IDE

At work we are using a proprietary language and to program we are using Notepad++ with a simple code highlight. That is really annoying so, what I want to do is to invest some time to setup a text editor or an existing IDE to support my language.
I've googled a lot and there are so many options and before starting to work I wanna ask to you what is the best choice.
What I want to do is to have, like an IDE, a syntax highlight, a window with the function list tree, with the local function variables inside the same subtree, maybe text autocomplete (if I type "pro" I would like to see the suggestion "procedure" and if I press enter it will write for me something like
procedure "name" {
--code--
}
with the cursor on "name" ready to change it.
etc etc...
Can you suggest me the right path to follow?
Is it to keep using Notepad++? With sourcecookifier? functionlist?
Or I have to change to another text editor?
Or there is some famous IDE like Eclipse, NetBeans etc that allow to easily add my own language?
PS. my language is pretty simple, I don't have complex structures, is Pascal-like. Something like that:
variable int xyz
PROCEDURE asd
BEGIN
END PROCEDURE asd
I would recommend you to stay with Notepad++ and extend it with some plugins and configuration. This would be fairly quick and easy to set up and still give a big win, even though you might not be able to get all the nice features of something like Eclipse. But since you already know the Notepad++ it wouldn't require learning an entirely new tool.
Some plugins that I have found useful
Function List
Light Explorer
XBrackets Lite
There are probably a lot more that can be useful to you.
Notepad++ also got some built in auto-completion functionality that can be enabled in the settings.
Have you evaluated Eclipse XTEXT ?
What is Xtext?
Xtext is a framework for development of programming languages and domain specific languages.
The only IDE I have used for the last few years is Eclipse. There are lots of other IDEs available, also notable and popular is Netbeans. There are many others. It's important to note that all IDEs have their fans, but I can only speak to Eclipse.
Eclipse is a platform, which means it is an application on which you can build other applications. Eclipse provides a framework which you can customize and extend to produce a working application. It takes care of the user interface, preferences storage, modularisation using OSGi, and lots of other things.
Eclipse has facilities to support what you're looking for:
Syntax highlighting in the editor.
The Outline View provides function and variable listing in a tree
Autocompletion and Suggestions (activated by hitting ctrl-space)
Code Templates to fill out files and procedures etc.
The disadvantage is that customising and extending Eclipse to do what you want isn't trivial. Having written a language debugger for Eclipse, I can tell you that leveraging Eclipse's platform helped enormously, but there's a learning curve. You'd essentially have to be coming up with a new set of plugins to provide your highlighting, outlining, autocomplete suggestions and templates (I'm not sure if template support is built into the platform or not).
So I would say, unless you can find some sort of extensible editor for Eclipse - I know Aptana is extensible for tag-based markup - you are probably as well staying with your existing tooling.
Do explore the other IDEs though - I've heard good things about IDEA as well as Netbeans. :)
Good luck!
I can recommend SynWrite editor. Good support for external languages, fully customizable. (Editor of new lexers is there)

Industry experience with WYSIWYG editors

Just wanted to get an idea for ways (web) developers get round the short fall of (most) WYSIWYG editors, whereby the users that are editing the text aren't always HTML literate enough to produce good/great results.
In the past we have resigned ourselves to either locking down the editor or simply not supplying one.
What are other peoples experiences?
If I understand your question correctly, my advice would be to allow basic text formatting in the editor (bold, italicize, underline, paragraph breaks, etc). Anything beyond that should be handled either by custom fields in your CMS system that talk to the corresponding template, or directly by your designers / front-end people. There really should be no designing going on in your text editor.
Also, using a templating language like Markdown might help editors feel more comfortable formatting their pages.
If you have the resources (as the question implies you do) you get the users to supply copy and designs in what they do know (Powerpoint, Word, Fireworks, etc) and get the people who can do a correct implementation (but who might not be able to write decent prose, etc) to put it into the HTML/CMS/magicthing.
Sometimes it is possible to use something like WYMeditor - it isn't that simple but produces clean semantic code. The other way is using some wiki-like code - Markdown for example. And you can ease editor's life by using some helpers like MarkItUp editor (it also supports original Wiki and Textile).

Using MarkDown on dynamic websites?

Do any WYSIWYG editors exist that work natively in Markdown? (any Platform/Language)
...So consumers don't have to see the code behind, just work in an MS-Word like interface.
An assisted MarkDown editor where you're viewing and editing the Markdown-source (like the one I'm writing this question with) would also be okay.
There is the Wysiwym Markdown Editor (The one we're using here). It shows live-markdown though, rather than masking it. I think the great thing about Markdown is that just about anybody can understand the basics of it.
This is the only editor I know of. After doing a cursory browsing of Google it appears to be one of the few, if not the only one in wide-spread use at the moment.
A large list of Markdown implementations at the Markdown Wiki.
Perl
PHP
Python
Ruby
C
C#
Java
Javascript
Common Lisp
Lua
Haskell
And:
Blog Software
Wiki Software
Text Editor
Desktop Software
Other Tools