( Using Sitecore 8 )
I have created a button in the Rich Text Editor and I want to translate the text from here into the page behind it. So to give the example, you click the button, the dialog pops up, you click on any of the values ( which get stored ) and then the insert button needs to be used to send those values into the Rich Text Editor box behind the dialog.
I have my xml file with the regular front end code:
<div class="fontBox">
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<li>E</li>
</ul>
</div>
Insert Icon
My .js looks like this:
$('.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
});
The Rich Text Editor is in the #EditorCenter ( td value ) with an iframe inside of it. How can you send text or values into the Rich Text Editor once I click on the button? I can't debug this so I don't know how Sitecore sends values to the Rich Text Editor from a dialog ( such as Insert Media ). All its doing right now is storing the variables and then closing the dialog without sending the values to the original Rich Text Editor. I'm sure it has to do something with the RadEditor, but at this point I'm guessing.