richardhell
richardhell

Reputation: 969

ExtJS Create a component like editor of stackoverflow

I want to create a component on ExtJS like the editor that have stackoverflow for ask question (only Bold and Emphasis buttons). I think that should be an extension of textarea but i dont know how to select text selected and how to replace with tags+text. Please give me some ideas.

Thanks

Upvotes: 2

Views: 2280

Answers (2)

If you're talking about the ability to use asterisks for bullets and such, in that mode StackOverflow's editor uses something called "Markdown".

Here's one example of someone trying to make a markdown-based textarea with preview in Extjs:

http://www.sencha.com/learn/Extension:Ext.ux.MarkdownEditor

If you look around for other Markdown-related editors, you might find some ideas. If you're instead looking for just an "Online Rich-Text Editor" there's plenty of those.


UPDATE 29-APR-2014: There's actually a project you should take a look at. It's called "StackEdit":

https://stackedit.io

It's an open source initiative to supply a markdown editing component. Not ExtJS based, but those who find this question may be interested in what they are doing it.

(I discovered it through one of SO's open-source-recruiting sidebar campaigns; advertising can be useful, apparently.)

Upvotes: 1

pierre
pierre

Reputation: 1245

Markdown by John Gruber can be obtained from his site. You could use his documentation as a basis for creating your own plugin for the HtmlEditor.

Upvotes: 1

Related Questions