===================================================== == SleekProduct ===================================================== Name: SleekProduct Editor Template Author: xxxx Source: Http://www.xxx.com Template Replace Value (ie. template_replace_values in tinyMCE.init) : {$TemplateInstance} stands for the template instance which distinguish SleekProduct on the same page to avoid multi objects with same id. This should be a short GUID from server logic and put in tinyMCE.init each time the page load. Note: CSS / JS blocks should be put after the template content (otherwise it doesn't work in IE); The template code should be clean (without comments) Limitation: Only one SleekProduct instance could be placed in current tinymce editor job. Lisense: LGPL ===================================================== == SleekProduct ===================================================== 名字:SleekProduct 编辑模板 作者:xxx 来源:Http://www.xxx.com 替换标签 (对应 tinyMCE.init 中的 template_replace_values ):{$TemplateInstance} 用来区分不同 SleekProduct 以防止同一页面有多个 SleekProduct 实例的时候,相同的 id 命名导致 js 相互影响, 该值在每次页面加载的时候,用后台逻辑在 tinyMCE.init 中写入一个简短 GUID 注意:CSS / JS 需要放在模板内容的最后 (否则在 IE 中会出错); 模板代码要干净(不要包含注释) 局限:在同一次编辑操作中,只能插入一个 SleekProduct,当打开编辑页面的时候,编辑器已经从后台获取了一个 GUID 并传递到这里,再次打开编辑页面,会获取新的 GUID,因此即使不同的编辑作业是发生在同一个页面,也可以保证不同 SleekProduct 实例相互不干扰;然而,如果在打开一个编辑页面的时候,同时插入多个 SleekProduct 实例,它们的 GUID 是相同的,会相互干扰。对于同一个编辑页面不同语种下的编辑器实例问题,因为编辑器在不同语种下是即时加载的,因此也不存在相互干扰问题,而内容一旦发布并生成页面后,由于不同语种下的页面不可能同时加载,也不存在相互干扰问题。 许可:LGPL