Hi
The paste as plain text dialog seems to remember the previously pasted text is it possible to have it so the text on the dialog is cleared each time. Here's how i'm using it.
<telerik:RadSpell ID="spell1" runat="server" ButtonType="None" />
<telerik:RadEditor ID="radEditor1" runat="server" StripFormattingOptions="AllExceptNewLines"
ToolsFile="~/Includes/RadEditorJobAdd.xml" Skin="WebBlue" EditModes="Design"
Width="505" Height="265" OnClientLoad="OnRadEditorClientLoad">
<ContextMenus>
<telerik:EditorContextMenu>
<telerik:EditorTool Name="Cut" />
<telerik:EditorTool Name="Copy" />
<telerik:EditorTool Name="Paste" />
</telerik:EditorContextMenu>
</ContextMenus>
<Content> </Content>
<SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="RepeatedWords" />
</telerik:RadEditor>
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor)
{
var spell = GetRadSpell('<%= spell1.ClientID %>');
spell.spellCheck(new PrometheusTextSource(editor));
return false;
}
var PrometheusTextSource = function(editor)
{
this._editor = editor;
this.get_text = function() { return this._editor.get_html(); };
this.set_text = function(value) { this._editor.set_html(value); };
}
var oldFunction = Telerik.Web.UI.Editor.CommandList["Paste"]; //save the original Paste function
Telerik.Web.UI.Editor.CommandList["Paste"] = function(commandName, editor, args)
{
if (!document.all) {
editor.fire("PastePlainText");
}
else {
oldFunction(commandName, editor, args);
}
};
</script>
The paste as plain text dialog seems to remember the previously pasted text is it possible to have it so the text on the dialog is cleared each time. Here's how i'm using it.
<telerik:RadSpell ID="spell1" runat="server" ButtonType="None" />
<telerik:RadEditor ID="radEditor1" runat="server" StripFormattingOptions="AllExceptNewLines"
ToolsFile="~/Includes/RadEditorJobAdd.xml" Skin="WebBlue" EditModes="Design"
Width="505" Height="265" OnClientLoad="OnRadEditorClientLoad">
<ContextMenus>
<telerik:EditorContextMenu>
<telerik:EditorTool Name="Cut" />
<telerik:EditorTool Name="Copy" />
<telerik:EditorTool Name="Paste" />
</telerik:EditorContextMenu>
</ContextMenus>
<Content> </Content>
<SpellCheckSettings SpellCheckProvider="PhoneticProvider" WordIgnoreOptions="RepeatedWords" />
</telerik:RadEditor>
<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor)
{
var spell = GetRadSpell('<%= spell1.ClientID %>');
spell.spellCheck(new PrometheusTextSource(editor));
return false;
}
var PrometheusTextSource = function(editor)
{
this._editor = editor;
this.get_text = function() { return this._editor.get_html(); };
this.set_text = function(value) { this._editor.set_html(value); };
}
var oldFunction = Telerik.Web.UI.Editor.CommandList["Paste"]; //save the original Paste function
Telerik.Web.UI.Editor.CommandList["Paste"] = function(commandName, editor, args)
{
if (!document.all) {
editor.fire("PastePlainText");
}
else {
oldFunction(commandName, editor, args);
}
};
</script>