This is a migrated thread and some comments may be shown as answers.

Javascript Error when trying to use editor.pasteHtml

1 Answer 69 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Yavuz Bogazci
Top achievements
Rank 1
Yavuz Bogazci asked on 27 Oct 2009, 12:30 PM
Hi,

i have a big Problem. I get a Javascript Error when i try to use the editor.pasteHtml Function.

Here is my Code:

ConfigFile.xml
<configuration> 
    <property name="ToolbarMode">ShowOnFocus</property> 
    <property name="ToolsWidth">680px</property>    
    <property name="AllowScripts">true</property> 
</configuration> 

ToolsFile.xml
    <tool name="Inhaltsverzeichnis" /> 

MOSSEditorTools.js
Telerik.Web.UI.Editor.CommandList["Inhaltsverzeichnis"] = function(commandName, editor, args)  
{  
  alert('test');  
  editor.PasteHtml('Hallo!!!');   
};  

It is very curious! When i only call alert('test'); without editor.PasteHtml('asdasd'); finally, everything works fine and i get an alert without any errors. But when i try to use the editor.PasteHtml('hello'); function, i always get an Javascript error and nothing happens.

Can someone help please.

regards
yavuz

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 27 Oct 2009, 03:10 PM
Hello Yavuz,

You suggested the following correction in other thread.

The P of .PasteHtml must be lowercase!

Correct: .pasteHtml


Sincerely yours,
Stanimir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
WebParts for SharePoint
Asked by
Yavuz Bogazci
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or