开发者

Adding a "quote" button to jwysiwyg

开发者 https://www.devze.com 2023-02-08 12:21 出处:网络
I\'m trying to add a \"quote\" button to jwysiwyg, but I\'m having a problem... My code for the button is like:

I'm trying to add a "quote" button to jwysiwyg, but I'm having a problem... My code for the button is like:

quote: {
  visible: true,
  tags: ['blockquote'],
  command: "FormatBlock",
  "arguments": ($.browser.msie || $.browser.safari) ? "<blockquote>" : "blockquote",
}

and it works (at least in Firefox), but when I press the button and the blockquote appears, I can't find a way to move the cursor outside that block, and everything I type afterwards en开发者_Python百科ds up as quoted.

What could I try?


The jwysiwyg source code has an example of how to do this:

https://github.com/akzhan/jwysiwyg/blob/master/_help/examples/10-custom-controls.html#L23

0

精彩评论

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