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
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.
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.)
精彩评论