开发者

Htmlbox 'unwrap' function

开发者 https://www.devze.com 2023-02-13 01:24 出处:网络
In reference to this plugin:. It doesn\'t currently have a unwrap function, but it does have a \"wrap\" one:

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

精彩评论

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