开发者

How I can create my own wysiwyg editor with my own style?

开发者 https://www.devze.com 2023-02-09 13:51 出处:网络
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百科

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:

How I can create my own wysiwyg editor with my own style?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号