Giter Site home page Giter Site logo

Comments (7)

yaniswang avatar yaniswang commented on July 16, 2024

你没把<>进行转义吧?

页面输 出的源代码发来看下。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月20日 17:43
收件人: yaniswang/xhEditor
主题: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

用xhEditor初始化一个不为空的textarea,该textarea中存在<>等内容时,xhEditor会将这些内容转换为<>,导致本来希望在页面上显示的<>括号由于是HMTL的关键字原因而被隐藏。


Reply to this email directly or view it on GitHub #12 . https://github.com/notifications/beacon/AA7Oll5WQUt7iSncW1RR9pQpyZSUcMwHks5oLE6igaJpZM4Ehk3o.gif

from xheditor.

keijack avatar keijack commented on July 16, 2024

很好复现的,你的网页中编写一个 textarea,里面的内容填写 <p>xxxx</p>
然后使用xhEditor初始化为编辑器,然后里面的内容很神奇的变成了

xxxx

2015-05-20 21:31 GMT+08:00 Yanis Wang [email protected]:

你没把<>进行转义吧?

页面输 出的源代码发来看下。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月20日 17:43
收件人: yaniswang/xhEditor
主题: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

用xhEditor初始化一个不为空的textarea,该textarea中存在<>等内容时,xhEditor会将这些内容转换为<>,导致本来希望在页面上显示的<>括号由于是HMTL的关键字原因而被隐藏。


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12> . <
https://github.com/notifications/beacon/AA7Oll5WQUt7iSncW1RR9pQpyZSUcMwHks5oLE6igaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack

from xheditor.

yaniswang avatar yaniswang commented on July 16, 2024

按照你这种说法,应该是正确的。

你之前不是说

被隐藏了?

但是按照你刚刚的说法,是正确显示的。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月21日 23:20
收件人: yaniswang/xhEditor
抄送: Yanis Wang
主题: Re: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

很好复现的,你的网页中编写一个 textarea,里面的内容填写 <p>xxxx</p>
然后使用xhEditor初始化为编辑器,然后里面的内容很神奇的变成了

xxxx

2015-05-20 21:31 GMT+08:00 Yanis Wang <[email protected] mailto:[email protected] >:

你没把<>进行转义吧?

页面输 出的源代码发来看下。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月20日 17:43
收件人: yaniswang/xhEditor
主题: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

用xhEditor初始化一个不为空的textarea,该textarea中存在<>等内容时,xhEditor会将这些内容转换为<>,导致本来希望在页面上显示的<>括号由于是HMTL的关键字原因而被隐藏。


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12> . <
https://github.com/notifications/beacon/AA7Oll5WQUt7iSncW1RR9pQpyZSUcMwHks5oLE6igaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack


Reply to this email directly or view it on GitHub #12 (comment) . https://github.com/notifications/beacon/AA7OlsE3RO4xyScTC7qeP5OS6tfTLr0dks5oLe8mgaJpZM4Ehk3o.gif

from xheditor.

keijack avatar keijack commented on July 16, 2024

这是你的例子,我在根目录下加了个文件xx.html,你运行一下就知道了。我说的变成

xxxx

是源代码级别的,在编辑器上看到的只有 xxxx

2015-05-22 8:34 GMT+08:00 Yanis Wang [email protected]:

按照你这种说法,应该是正确的。

你之前不是说

被隐藏了?

但是按照你刚刚的说法,是正确显示的。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月21日 23:20
收件人: yaniswang/xhEditor
抄送: Yanis Wang
主题: Re: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

很好复现的,你的网页中编写一个 textarea,里面的内容填写 <p>xxxx</p>
然后使用xhEditor初始化为编辑器,然后里面的内容很神奇的变成了

xxxx

2015-05-20 21:31 GMT+08:00 Yanis Wang <[email protected] <mailto:
[email protected]> >:

你没把<>进行转义吧?

页面输 出的源代码发来看下。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月20日 17:43
收件人: yaniswang/xhEditor
主题: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

用xhEditor初始化一个不为空的textarea,该textarea中存在<>等内容时,xhEditor会将这些内容转换为<>,导致本来希望在页面上显示的<>括号由于是HMTL的关键字原因而被隐藏。


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12> . <

https://github.com/notifications/beacon/AA7Oll5WQUt7iSncW1RR9pQpyZSUcMwHks5oLE6igaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12#issuecomment-104317181> .
<
https://github.com/notifications/beacon/AA7OlsE3RO4xyScTC7qeP5OS6tfTLr0dks5oLe8mgaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack

from xheditor.

keijack avatar keijack commented on July 16, 2024

另,我的浏览器是 linux 下的 firefox 38.0.1 (64bit)

2015-05-22 8:34 GMT+08:00 Yanis Wang [email protected]:

按照你这种说法,应该是正确的。

你之前不是说

被隐藏了?

但是按照你刚刚的说法,是正确显示的。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月21日 23:20
收件人: yaniswang/xhEditor
抄送: Yanis Wang
主题: Re: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

很好复现的,你的网页中编写一个 textarea,里面的内容填写 <p>xxxx</p>
然后使用xhEditor初始化为编辑器,然后里面的内容很神奇的变成了

xxxx

2015-05-20 21:31 GMT+08:00 Yanis Wang <[email protected] <mailto:
[email protected]> >:

你没把<>进行转义吧?

页面输 出的源代码发来看下。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月20日 17:43
收件人: yaniswang/xhEditor
主题: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

用xhEditor初始化一个不为空的textarea,该textarea中存在<>等内容时,xhEditor会将这些内容转换为<>,导致本来希望在页面上显示的<>括号由于是HMTL的关键字原因而被隐藏。


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12> . <

https://github.com/notifications/beacon/AA7Oll5WQUt7iSncW1RR9pQpyZSUcMwHks5oLE6igaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12#issuecomment-104317181> .
<
https://github.com/notifications/beacon/AA7OlsE3RO4xyScTC7qeP5OS6tfTLr0dks5oLe8mgaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack

from xheditor.

keijack avatar keijack commented on July 16, 2024
<title>xhEditor Test</title> <script type="text/javascript" src="jquery/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="xheditor-1.2.2.min.js"></script> <script type="text/javascript" src="xheditor_lang/zh-cn.js"></script> <script type="text/javascript"> $(function () { $('textarea[name=preview]').attr("id", "xx").xheditor({ }); }); </script>
<textarea id="preview" name="preview" rows="8" cols="120"><p>xxxxx</p></textarea>

2015-05-22 10:05 GMT+08:00 Keijack Wu [email protected]:

另,我的浏览器是 linux 下的 firefox 38.0.1 (64bit)

2015-05-22 8:34 GMT+08:00 Yanis Wang [email protected]:

按照你这种说法,应该是正确的。

你之前不是说

被隐藏了?

但是按照你刚刚的说法,是正确显示的。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月21日 23:20
收件人: yaniswang/xhEditor
抄送: Yanis Wang
主题: Re: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

很好复现的,你的网页中编写一个 textarea,里面的内容填写 <p>xxxx</p>
然后使用xhEditor初始化为编辑器,然后里面的内容很神奇的变成了

xxxx

2015-05-20 21:31 GMT+08:00 Yanis Wang <[email protected] <mailto:
[email protected]> >:

你没把<>进行转义吧?

页面输 出的源代码发来看下。

发件人: Keijack [mailto:[email protected]]
发送时间: 2015年5月20日 17:43
收件人: yaniswang/xhEditor
主题: [xhEditor] 如果初始化编辑器之前的textarea存在数据可能出现问题 (#12)

用xhEditor初始化一个不为空的textarea,该textarea中存在<>等内容时,xhEditor会将这些内容转换为<>,导致本来希望在页面上显示的<>括号由于是HMTL的关键字原因而被隐藏。


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12> . <

https://github.com/notifications/beacon/AA7Oll5WQUt7iSncW1RR9pQpyZSUcMwHks5oLE6igaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack


Reply to this email directly or view it on GitHub <
https://github.com/yaniswang/xhEditor/issues/12#issuecomment-104317181>
. <
https://github.com/notifications/beacon/AA7OlsE3RO4xyScTC7qeP5OS6tfTLr0dks5oLe8mgaJpZM4Ehk3o.gif>


Reply to this email directly or view it on GitHub
#12 (comment).

Keijack

Keijack

from xheditor.

yaniswang avatar yaniswang commented on July 16, 2024

这个结果是正确的。

你可以尝试不要加载xhEditor,看看原始的textarea是什么样的结果。

这个结果和xhEditor中的源代码模式是一样的。

xhEditor的可视化模式是用来辅助编辑你的源代码的,所以可视状态下看不到

是正常的。

from xheditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.