我如何... Chrome中的html编辑器扩展程序问题

编程入门 行业动态 更新时间:2024-10-15 12:29:59
本文介绍了我如何... Chrome中的html编辑器扩展程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果使用html编辑器扩展器

解决方案

< pre lang = cs>& lt; script& gt;

(文件).ready(function(){ if (Sys.Extended& amp; amp; amp; Sys.Extended.UI& amp;& amp; & Sys.Extended.UI.HtmlEditorExtenderBehavior& amp; amp; amp; Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype& amp; amp; amp; amp; Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit){ Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function(){ // html encode var char = 3 ; var sel = null ; setTimeout(function(){ if ( this 。 _editableDiv!= null ) 此 ._ editableDiv.focus(); } , 0 ); if (Sys.Browser.agent!= Sys.Browser.Firefox){ if (document.selection){ sel = document.selection.createRange(); sel.moveStart(' character',炭); sel。 select (); } 其他 { 如果( this ._ editableDiv.firstChild!= null & amp;& amp; this ._ editableDiv.firstChild!= undefined){ sel = window.getSelection(); sel.collapse( this ._ editableDiv.firstChild, char ); } } } // 编码html标签 此 ._ textbox._element。 value = 此 ._ encodeHtml(); } } }); & lt; / script& gt; < / pre >

Select index change event not fire in chrome if using html editor extender

解决方案

<pre lang="cs">&lt;script&gt;

(document).ready(function () { if (Sys.Extended &amp;&amp; Sys.Extended.UI &amp;&amp; Sys.Extended.UI.HtmlEditorExtenderBehavior &amp;&amp; Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype &amp;&amp; Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit) { Sys.Extended.UI.HtmlEditorExtenderBehavior.prototype._editableDiv_submit = function () { //html encode var char = 3; var sel = null; setTimeout(function () { if (this._editableDiv != null) this._editableDiv.focus(); }, 0); if (Sys.Browser.agent != Sys.Browser.Firefox) { if (document.selection) { sel = document.selection.createRange(); sel.moveStart('character', char); sel.select(); } else { if (this._editableDiv.firstChild != null &amp;&amp; this._editableDiv.firstChild != undefined) { sel = window.getSelection(); sel.collapse(this._editableDiv.firstChild, char); } } } //Encode html tags this._textbox._element.value = this._encodeHtml(); } } }); &lt;/script&gt;</pre>

更多推荐

我如何... Chrome中的html编辑器扩展程序问题

本文发布于:2023-11-25 00:33:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:编辑器   程序   Chrome   html

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!