2016-06-22 17 views
0

(使用Sitecore的8)Sitecore的8對話框

我已經創建了富文本編輯器的按鈕,我想從這裏將文本翻譯成它背後的頁面。所以舉個例子,你點擊按鈕,彈出對話框,點擊任何一個值(它們被存儲),然後需要使用插入按鈕將這些值發送到對話框後面的富文本編輯器框中。

我有正規前端代碼我的XML文件:

<div class="fontBox"> 

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

</div> 
插入圖標

我的.js文件看起來是這樣的:

$('.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如何通過對話框(例如插入媒體)將值發送到富文本編輯器。現在它所做的全部工作就是存儲變量,然後關閉對話框而不將值發送到原始富文本編輯器。我相信它必須對RadEditor做些什麼,但在這一點上,我猜測。

回答

相關問題