I want to create my own editor with my own style, I tried to edit a couple jquery editors but I can't get what I want.开发者_Go百科
Here is a sample pic of what I want:
I finished this bar in HTML and its look exactly what I want so the next step is to add actions to these buttons.
I don't have any idea how to do it but let's say that we added a textarea like other editors and attach this textarea with the top buttons - that is what I don't know how to do it.
if there is some way to make the text bold when the user click bold button for example.
We can do it easy with jQuery if this is some DIV element but this is textarea and I don't know to do it with it.
sorry for bad english.
What you would want to look for, for the editor of your choice is some API to execute commands directly instead of using the editors packaged toolbar. It might look something like "ExecuteCommand('bold')". You would then just wire up your buttons to do that.
精彩评论