首页 \ 问答 \ ckeditor config.protectedSource不适用于editor.insertHtml上的html元素属性(ckeditor config.protectedSource dont work for html element attributes on editor.insertHtml)

ckeditor config.protectedSource不适用于editor.insertHtml上的html元素属性(ckeditor config.protectedSource dont work for html element attributes on editor.insertHtml)

我已经将ckeditor从4.0更新到4.5.4,现在我的插件不像以前那样工作了。

在我的config.js我有

    config.protectedSource.push(  /\{[\s\S]*?\}/g );

所以我不想在编辑模式下保护所有{}(聪明的东西)。

接下来是对话框按钮中的代码。

                onOk: function () {
                    var currentTabId = this._.currentTabId;
                    var link = '';
                    var OXID = this.getContentElement(currentTabId, 'OXID').getValue();
                    link += "{assign var=\"aSb_cms_data\" value=$oViewConf->sb_cms_getCategorieData('" + OXID + "')}";

                    link += "<a href='{$aSb_cms_data.link}'";

                    title = "{$aSb_cms_data.title}";

                    link += 'title="' + title + '">' + title;
                    link += "</a>"

                    console.log(link); //
                    editor.insertHtml(link); 
                }

console.log(link)将输出:

    {assign var="aSb_cms_data" value=$oViewConf->sb_cms_getCategorieData('testid')}<a href='{$aSb_cms_data.link}'title="{$aSb_cms_data.title}">{$aSb_cms_data.title}</a>

这就是我想要的源代码。

但是在源代码(ckeditor)中现在是:

 {assign var="aSb_cms_data" value=$oViewConf->sb_cms_getCategorieData('testid')}<a href="&lt;!--{cke_protected}%7B%24aSb_cms_data.link%7D--&gt;" title="&lt;!--{cke_protected}%7B%24aSb_cms_data.title%7D--&gt;">{$aSb_cms_data.title}</a>

所有“a”属性都与cke_protected东西搞混了......在V4.0中,源代码等于console.log输出。

我该如何解决这个问题?


I've updated ckeditor from 4.0 to 4.5.4 and now my plugin dont work as before.

In my config.js i have

    config.protectedSource.push(  /\{[\s\S]*?\}/g );

So i wan't to protect all {} (smarty stuff) in the edit mode.

Next is my Code from the dialog button.

                onOk: function () {
                    var currentTabId = this._.currentTabId;
                    var link = '';
                    var OXID = this.getContentElement(currentTabId, 'OXID').getValue();
                    link += "{assign var=\"aSb_cms_data\" value=$oViewConf->sb_cms_getCategorieData('" + OXID + "')}";

                    link += "<a href='{$aSb_cms_data.link}'";

                    title = "{$aSb_cms_data.title}";

                    link += 'title="' + title + '">' + title;
                    link += "</a>"

                    console.log(link); //
                    editor.insertHtml(link); 
                }

console.log(link) will output:

    {assign var="aSb_cms_data" value=$oViewConf->sb_cms_getCategorieData('testid')}<a href='{$aSb_cms_data.link}'title="{$aSb_cms_data.title}">{$aSb_cms_data.title}</a>

That's what i want in the source code.

But in the Source Code(ckeditor) is now:

 {assign var="aSb_cms_data" value=$oViewConf->sb_cms_getCategorieData('testid')}<a href="&lt;!--{cke_protected}%7B%24aSb_cms_data.link%7D--&gt;" title="&lt;!--{cke_protected}%7B%24aSb_cms_data.title%7D--&gt;">{$aSb_cms_data.title}</a>

All "a" attributes are messed up with cke_protected stuff... at V4.0 the sourcecode was equal to the console.log output.

How can i fix that?


原文:https://stackoverflow.com/questions/33011111
更新时间:2024-05-06 12:05

最满意答案

根据http://www.gnu.org/licenses/gpl-howto.html

该声明应该接近每个源文件的开头,接近版权声明。 使用较小的GPL时,在所有三个地方的“常规”之前插入“较小”一词。 使用GNU AGPL时,在所有三个地方的“常规”之前插入“Affero”一词。

“此声明”是您在原始问题中发布的GPL小通知。


According to http://www.gnu.org/licenses/gpl-howto.html

This statement should go near the beginning of every source file, close to the copyright notices. When using the Lesser GPL, insert the word “Lesser” before “General” in all three places. When using the GNU AGPL, insert the word “Affero” before “General” in all three places.

where "this statement" is the GPL small notice posted in your original question.

相关问答

更多
  • http://en.wikipedia.org/wiki/GNU_General_Public_License#Compatibility_and_multi-licensing ...在其他许可证下许可的代码可以与GPL下的程序结合使用而不会发生冲突,只要该组合具有适用于整体的GPL即可。 [...]许多最常见的免费软件许可证,如原始的MIT / X许可证,BSD许可证(目前的3分条款)和LGPL,均为“GPL兼容” 我希望这意味着将LGPL lib链接到GPL1或GPL2程序是可以的。 http://e ...
  • 我认为你提出的分配很好。 要遵守LGPL,您的应用程序用户必须可以删除自己的otherlib.so版本并使用此版本运行您的应用程序。 假设此要求仅涵盖二进制兼容的更改,则在您的情况下,通过仅包含应用程序的二进制版本的分发来满足要求。 I think your proposed distribution is fine. To comply with LGPL it must be possible for users of your application to drop their own version ...
  • GPL并不禁止您销售基于GPL代码的程序,但它确实要求如果您将程序交给任何人(包括出售它),则必须将它们的源代码也提供给他们,并且在GPL下获得许可,以便他们可以修改它并在需要时重新分发它。 任何购买你的程序的人都可以免费将其重新分配给其他人。 LGPL不要求您分发与LGPL库链接的程序源代码,因此您可以在封闭源代码应用程序中使用它们。 (如果你自己发布LGPL库,你仍然需要为你的客户提供源代码。) 这是一个简化。 详情请阅读执照本身,和/或与律师交谈。 The GPL doesn't forbid you ...
  • 没有许可证可以使用您自己的代码实现函数是非法的。 GPL项目定期将其代码基于其他实现,例如GCJ(java编译器)和免费的Flash播放器。 我无法想象任何GPL'会因为创建具有类似功能的库而冒犯。 另一方面, 专利是一个不同的故事 - 保护代码背后的想法。 也许,这就是你的想法。 版权保护该特定代码实例。 如果您链接到他们的图书馆,那么您将不得不遵守他们的许可证。 此外,GPL项目可以在您保留许可证时获得并且很长。 因此,如果您愿意,可以直接链接到他们的库 - 只需为您的项目保留相同的许可。 No lic ...
  • LGPL允许您在不释放源代码的情况下链接到代码,所以是的,您可以这样做。 LGPL allows you to link to the code without releasing your source, so yes, you can do it.
  • 是一场热门辩论。 具体来说,如果程序提供的API用于转发呼叫,则插件基本上在逻辑上依赖于所述库,因此被一些人认为受GPL约束。 至少必须合理地确定所述插件可以“自己”/“独立地”运行并且不依赖于代码 - 从法律角度而不是技术角度。 难以制定,IANAL等,最佳做法不是留在灰色地带; 更好的发布代码:比律师便宜,让用户也开心。 如果所述插件合理地独立于所使用的库(参见第1点),您可以选择您喜欢的任何许可证。 你不能真实地阻止有人为你的程序编写一个与非免费服务接口的插件。 您可以通过使用数字签名等技术措施来阻止 ...
  • 是的,它确实。 GPL首先出现的原因之一是为了防止有人拥有二进制文件的情况,但没有任何消息来源。 IANAL,所以我不能谈论咨询 - 客户关系是否会构成一个漏洞,你可以用它来避免传递源代码,但这肯定违背了许可证的意图去做你的建议。 Yes it does. One of the reasons the GPL came into being in the first place was to prevent the situation where somebody had a binary, but no ...
  • 根据http://www.gnu.org/licenses/gpl-howto.html 该声明应该接近每个源文件的开头,接近版权声明。 使用较小的GPL时,在所有三个地方的“常规”之前插入“较小”一词。 使用GNU AGPL时,在所有三个地方的“常规”之前插入“Affero”一词。 “此声明”是您在原始问题中发布的GPL小通知。 According to http://www.gnu.org/licenses/gpl-howto.html This statement should go near the ...
  • 如果您是从头开始编写应用程序,则可以根据需要对其进行许可。 如果你想为插件的GPL做一个例外,那就有先例。 您正在寻找GPL链接异常 (例如Classpath Exception)。 If you are writing your application from scratch, you can license it however you want. If you want to make an exception to the GPL for plugins, there is precedent. ...
  • 如果您使用的是GPL库,则必须使用GPL。 我现在找不到它,但它是在GNU页面上。 You must use GPL if you are using libraries that are GPL. I can't find it now, but it was on GNU page.

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。