开发者

Htmlbox 'unwrap' function

In reference to this plugin:.

It doesn't currently have a unwrap function, but it does have a "wrap" one:

this.wrap_tags = function(start,end){
   var sel = get_selection(); 
   if(undefined===sel){sel="";}
   if(undefined===end){end="";}
   insert_text(start+sel+end,start.length,end.length);
};

It doesn't use jQuery's wrap(); function - perhaps due to x-browser compatibility...? Any开发者_如何学JAVAway, this wrap method is called in a command like so:

else if(cmd==="bold"){
           this.wrap_tags("<b>","</b>");
       }

I want to create a function to unwrap the tags on SELECTED TEXT.

Please refer to the JavaScript link above for further details.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜