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

Spell Check settings on extended control

0 Answers 70 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 11 Sep 2012, 02:10 PM

We've created an extended version of the RadEditor to use locally.  What we need to do is set the values for the dictionarypath to a single path that all instances of the control will use.  We also need to disable the custom dictionary in the global version, but allow local versions to override in the markup.

We aren't using the markup interface in the extended version, so I can't set any values under <telerik:RadEditor/>.  I'm working in C#.  What I'm trying to do to start with looks like this:

 

 

 

public ExtendedRadEditor() : base()  

base.SpellCheckSettings.AllowAddCustom = false;  

base.SpellCheckSettings.SpellCheckProvider = SpellCheckProvider.TelerikProvider;  

base.SpellCheckSettings.DictionaryPath = System.Web.HttpContext.Current.Server.MapPath("~/Embed/TDF");

}


So, what am I missing here???

EDIT:  So I've tried exploring the various ways in which I can set the DictionaryPath.  Since this is NOT a web application, I can't use Server.MapPath(); since it's not a Windows app, I can't use GetCurrentExecutingPath.  I've tried using GetCurrentAssembly().Codebase, but since this compiles into the Visual Studio executable path at runtime, NOT the local code path (which would parallel the path utilized at deployment), I've hit a wall on trying to get the correct DictionaryPath set.  I even tried a basic Windows path ("../Embed/TDF") and THAT didn't work.

Could really use some ideas.

No answers yet. Maybe you can help?

Tags
Editor
Asked by
Paul
Top achievements
Rank 1
Share this question
or