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

Changes in ToolFile.xml not reflected in editor

9 Answers 136 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tomas
Top achievements
Rank 1
Tomas asked on 10 Sep 2010, 03:47 PM
I've deployed the MOSS RadEditor to one of my Sharepoint sites. The editor works but all the changes I make to the toolsfile.xml do not show up.

The file I'm working on is this location on the server
C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor

the documentation says it should be in the ""~/RadControls/Editor" but I can't find this in my sharepoint structure anywhere

the changes I've made are simple, i removed a couple tools
    <tool name="ForeColor" />
    <tool name="BackColor" />
but they still show up. I've also tried to modify the font name list.

1) am i modifying the correct file?
2) if not, where is the toolsfile.xml exactly?

also, I have done an iisreset as well.
Thanks!

9 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 15 Sep 2010, 11:12 AM
Hi Tomas,

Could you please specify in which SharePoint scenario you use RadEditor?

If you use RadEditor for SharePoint in Content Editor Web Part and WCM (publishing) scenarios, you need to modify the ToolsFile.xml located in the following folder:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor

To remove a tool just delete the respective <tool> node from the XML definition.

Note that if you use RadEditor inSharePoint forms scenario (Lists, Wikis, Blogs, etc.), you need to modify the ListToolsFile.xml located in the same folder.


Regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tomas
Top achievements
Rank 1
answered on 15 Sep 2010, 03:43 PM
Thanks, as I couldn't find this info anywhere in the documentation. But I still can't get the fonts working, I copied this from the sample at http://www.telerik.com/help/aspnet/editor/fonts.html

 

<fontNames>
  <item name="Arial" />
  <item name="Arial Narrow" />
  <item name="Arial Black" />
</fontNames>
   

the help page does not specify whether these elements should be within the  <tool name="FontName" /> node or not (I've tried within and outside). No matter what I do the default fonts always show up. Can you send me exactly what XML is needed to just have those 3 fonts appear in my font dropdown list?

Also, is there a way to set "stripFormattingOptions" in the XML file? I would like all Word formatting removed but my radeditor isn't produced by code like in all the samples i see that give c# and javascript samples. It is the default editor for all lists is all. Thank!

0
Rumen
Telerik team
answered on 16 Sep 2010, 04:00 PM
Hello Tomas,

Since you did not specify again in which SharePoint scenario you use RadEditor, my suggestion is to put the

<fontNames>
        <font name="Arial" />
        <font name="Arial Narrow"/>
        <font name="Arial Black" />
</fontNames>

inside the ToolsFile.xml and ListToolsFile.xml files placed in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.5.6.0__1f131a624888eeed\RadControls\Editor folder.

The fontNames tags should be placed outside the <tools></tools> tags and inside the <root></root> tags.

Here is the syntax that you should use to set the StripFormattingOptions property in the ConfigFile.xml / ListConfigFile.xml files:

<property name="StripFormattingOptions">MSWordRemoveAll</property>

Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tomas
Top achievements
Rank 1
answered on 17 Sep 2010, 08:25 PM
Thanks for your help.

I am using the RadEditor inSharePoint forms scenario

I have inserted the fontnames as directed but I still get the default fonts only (no arial narrow for instance). Below is my listtoolsfile.

Also the MSWordRemoveAll property still allows alot of formatting across - like fonts that we do not support and do not appear in the dropdown. 
  • is there a way to strip ALL formatting from pasted content?  or at least a way to remove all fonts?
  • do I have it in the right place in the listtoolsfile?
 
what I'd really like is to have the paste remove everything just like format stripper "Paste Plain Text" works. It would be great to assign ctrl-V to PastPlainText but this did work, I got an error saying Could not find the command PastePlainText. Please update your command list.




<root>
  <tools name="EnhancedToolbar" dockable="false" enabled="true">
    <tool name="Cut" shortcut="CTRL+X" />
    <tool name="Copy" shortcut="CTRL+C" />
    <tool name="Paste" shortcut="CTRL+V" />
    <tool name="FormatStripper" />
    <tool separator="true" />
    <tool name="Undo" shortcut="CTRL+Z"/>
    <tool name="Redo" shortcut="CTRL+Y"/>
    <tool separator="true" />
    <tool name="MOSSInsertTable" />
    <tool name="MOSSInsertTableElement" dropDownWidth="180">
      <tool name="InsertRowAbove" />
      <tool name="InsertRowBelow" />
      <tool name="InsertColumnLeft" />
      <tool name="InsertColumnRight" />
    </tool>
    <tool name="MOSSDeleteTableElement">
      <tool name="DeleteRow" />
      <tool name="DeleteColumn" />
    </tool>
    <tool name="SplitCell" />
    <tool name="MergeColumns" />
    <tool separator="true" />
    <tool name="MOSSLinkManager" />
    <tool name="ImageManager" />
  </tools>
    <tools name="BasicToolbar" dockable="false" enabled="true">
<tool name="FontName" />
<fontNames>
  <item name="Arial" />
  <item name="Arial Narrow" />
  <item name="Arial Black" />
</fontNames>    
    <tool name="FontSize" />
    <tool separator="true" />
    <tool name="Bold" shortcut="CTRL+B" />
    <tool name="Italic" shortcut="CTRL+I" />
    <tool name="Underline" shortcut="CTRL+U" />
    <tool separator="true" />
    <tool name="JustifyLeft" shortcut="CTRL+L" />
    <tool name="JustifyCenter" shortcut="CTRL+E" />
    <tool name="JustifyRight" shortcut="CTRL+R" />
    <tool separator="true" />
    <tool name="InsertOrderedList" />
    <tool name="InsertUnorderedList" />
    <tool name="Indent" />
    <tool name="Outdent" shortcut="CTRL+M" />
    <tool separator="true" />
    <tool name="ForeColor" />
    <tool separator="true" />
    <tool name="MOSSLeftToRight" />
    <tool name="MOSSRightToLeft" />
  </tools>
  <contextMenus>
    <contextMenu forElement="*">
      <tool name="Cut"/>
      <tool name="Copy"/>
      <tool name="Paste"/>
    </contextMenu>
  </contextMenus>
<property name="StripFormattingOptions">MSWordRemoveAll</property>
  
</root>
0
Rumen
Telerik team
answered on 22 Sep 2010, 02:10 PM
Hello Tomas,

If you want to strip all the formatting from the pasted content set

<property name="StripFormattingOptions">AllExceptNewLines</property>
or
<property name="StripFormattingOptions">All</property>

  • All: strips all HTML formatting and pastes plain text.
  • AllExceptNewLines: Clears all tags except "br" and new lines (\n) on paste.

Could you please provide your ListToolsFile.xml toosfile so that I can examine it?

Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tomas
Top achievements
Rank 1
answered on 23 Sep 2010, 09:19 PM
Sure, I will attach the xml file as a screenshot, xml files don't seem to be supported in you file attacher. (please note that i pasted its entire contents in my last post)
also is a screenshot showing the problem.
0
Rumen
Telerik team
answered on 24 Sep 2010, 02:13 PM
Hi Tomas,

The fontNames tags in the ToolsFile file will update only the items in the Font Name dropdown, but not restrict the other font names pasted for example from another location: site, document, etc.

I noticed that you have put the following tag in the ToolsFile.xml file:
<property name="StripFormattingOptions">MSWordRemoveAll,Font,Span</property>
but it should be set in the ConfigFile.xml / ListConfigFile.xml files.

Set this tag in the ConfigFile/ListConfigFile and the fonts will be stripped when pasting content in RadEditor.


Yes, XML file attachments are not allowed by the ticketing system and its better to zip them.

Kind regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tomas
Top achievements
Rank 1
answered on 24 Sep 2010, 09:24 PM
I have figured out the pasting, the attribute is <property name="StripFormattingOnPaste">MSWordRemoveAll</property>
not "StripFormattingOptions" which causes an error, maybe because it's not listed in properties on your website at http://www.telerik.com/help/aspnet/editor/usingtheconfigfilexml.html

The fontNames are still being ignored though. Have you found anything wrong with with my ListToolsFile.xml in this regard. attached is a screenshot of the fonts shown with this setting. Why is this being ignored??
    <tool name="FontName" />
<fontNames>
   <item name="Arial" />
   <item name="Arial Narrow" />
   <item name="Arial Black" />
 </fontNames>


Thanks for all your help!
0
Rumen
Telerik team
answered on 27 Sep 2010, 12:57 PM
Hi Tomas,

Version 4.5.x of RadEditor for MOSS is based on the classic version of RadEditor for ASP.NET. The classic editor offers only the StripFormattingOnPaste property, which is obsolete and replaced by StripFormattingOptions property in RadEditor for ASP.NET AJAX used in the latest build of RadEditor for MOSS.

That is why the StripFormattingOptions property is not listed in the http://www.telerik.com/help/aspnet/editor/usingtheconfigfilexml.html article taken from the RadEditor for ASP.NET Classic help.

As to the FontNames problem, you should put the

<fontNames>
  <item name="Arial" />
  <item name="Arial Narrow" />
  <item name="Arial Black" />
</fontNames>  


block outside of the <tools> tags
<root>
  <tools name="EnhancedToolbar" dockable="false" enabled="true">
    <tool name="Cut" shortcut="CTRL+X" />
    <tool name="Copy" shortcut="CTRL+C" />
    <tool name="Paste" shortcut="CTRL+V" />
    <tool name="FormatStripper" />
    <tool separator="true" />
    <tool name="Undo" shortcut="CTRL+Z"/>
    <tool name="Redo" shortcut="CTRL+Y"/>
    <tool separator="true" />
    <tool name="MOSSInsertTable" />
    <tool name="MOSSInsertTableElement" dropDownWidth="180">
      <tool name="InsertRowAbove" />
      <tool name="InsertRowBelow" />
      <tool name="InsertColumnLeft" />
      <tool name="InsertColumnRight" />
    </tool>
    <tool name="MOSSDeleteTableElement">
      <tool name="DeleteRow" />
      <tool name="DeleteColumn" />
    </tool>
    <tool name="SplitCell" />
    <tool name="MergeColumns" />
    <tool separator="true" />
    <tool name="MOSSLinkManager" />
    <tool name="ImageManager" />
  </tools>
    <tools name="BasicToolbar" dockable="false" enabled="true">
    <tool name="FontName" />
    <tool name="FontSize" />
    <tool separator="true" />
    <tool name="Bold" shortcut="CTRL+B" />
    <tool name="Italic" shortcut="CTRL+I" />
    <tool name="Underline" shortcut="CTRL+U" />
    <tool separator="true" />
    <tool name="JustifyLeft" shortcut="CTRL+L" />
    <tool name="JustifyCenter" shortcut="CTRL+E" />
    <tool name="JustifyRight" shortcut="CTRL+R" />
    <tool separator="true" />
    <tool name="InsertOrderedList" />
    <tool name="InsertUnorderedList" />
    <tool name="Indent" />
    <tool name="Outdent" shortcut="CTRL+M" />
    <tool separator="true" />
    <tool name="ForeColor" />
    <tool separator="true" />
    <tool name="MOSSLeftToRight" />
    <tool name="MOSSRightToLeft" />
  </tools>
  <contextMenus>
    <contextMenu forElement="*">
      <tool name="Cut"/>
      <tool name="Copy"/>
      <tool name="Paste"/>
    </contextMenu>
  </contextMenus>
  <fontNames>
     <item name="Arial" />
     <item name="Arial Narrow" />
     <item name="Arial Black" />
   </fontNames>
</root>
.



Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Tomas
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Tomas
Top achievements
Rank 1
Share this question
or