首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Sitecore 8对话框

Sitecore 8对话框
EN

Stack Overflow用户
提问于 2016-06-23 02:55:11
回答 1查看 192关注 0票数 0

(使用Sitecore 8)

我已经在富文本编辑器中创建了一个按钮,并希望将文本从此处转换到它后面的页面中。因此,为了给出示例,您单击按钮,弹出对话框,单击任何值(存储),然后需要使用insert按钮将这些值发送到对话框后面的Rich Text Editor框中。

我有一个包含常规前端代码的xml文件:

代码语言:javascript
复制
<div class="fontBox">

<ul>
  <li>A</li>
  <li>B</li>
  <li>C</li>
  <li>D</li>
  <li>E</li>  
</ul>

</div>

插入图标

我的.js看起来像这样:

代码语言:javascript
复制
$('.fontBox ul li').on('click', function () {
    $(this).toggleClass('selected');
});

$('#OKButton').on('click', function () {

var vSelect = $('.selected').text();  // this stores the values of every .selected li
$('.scStretch #Editor_contentIframe body').text(vSelect); // here is where I'm trying to take the values and write them 
scCancel(); // this closes the dialog box after executing

});

富文本编辑器位于#EditorCenter (td值)中,其中包含一个iframe。单击该按钮后,如何将文本或值发送到富文本编辑器中?我不能对此进行调试,所以我不知道Sitecore如何将值从对话框(如插入媒体)发送到富文本编辑器。它现在所做的就是存储变量,然后关闭对话框,而不将值发送到原始的Rich Text Editor。我确定它一定与RadEditor有关,但在这一点上,我猜。

EN

回答 1

Stack Overflow用户

发布于 2016-09-29 16:19:02

您可以使用the $find method获取对RadEditor客户端对象的引用,并通过set_html()方法设置其内容。

您可以在以下主题中找到更多信息:how to set the content to radeditor using javascriptChanging the value of a Telerik RadEditor with Javascript/jQuery

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37976166

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档