I have a problem with inserting script to editor content (for google optimizer).
I created some button with this action:
Telerik.Web.UI.Editor.CommandList["AddGoogleOptimizer"] = function(commandName, editor, args)
{
var currentSelectedHtml = editor.getSelectionHtml();
currentSelectedHtml = String.format("<script>utmx_section(\"Section\")<\/script>{0}</noscript>", currentSelectedHtml);
editor.pasteHtml(currentSelectedHtml);
};
Also I disabled RemoveScripts filter (radEditor.DisableFilter(EditorFilters.RemoveScripts)), but in editor content appear only selected html without any tags (IE 7).
I need to insert the following code:
<script>utmx_section('Section')</script>
Is there a way to resolve this problem?
I created some button with this action:
Telerik.Web.UI.Editor.CommandList["AddGoogleOptimizer"] = function(commandName, editor, args)
{
var currentSelectedHtml = editor.getSelectionHtml();
currentSelectedHtml = String.format("<script>utmx_section(\"Section\")<\/script>{0}</noscript>", currentSelectedHtml);
editor.pasteHtml(currentSelectedHtml);
};
Also I disabled RemoveScripts filter (radEditor.DisableFilter(EditorFilters.RemoveScripts)), but in editor content appear only selected html without any tags (IE 7).
I need to insert the following code:
<script>utmx_section('Section')</script>
SelectedContent
</noscript>
Is there a way to resolve this problem?
