Hi all.
How can I use my own config file instead of standart fckconfig.js?
When I try following nothing is happened (this code from the official site):
<script language="JavaScript" type="text/javascript">
var oFCKeditor = new FCKeditor( "FCKeditor1" );
oFCKeditor.Config["CustomConfigurationsPath"] = "/admin/editor/myconfig.js";
oFCKeditor.Create();
</script>
After, In the page that uses FCKEditor, I get this source output:
...
<script language="JavaScript" type="text/javascript">
var oFCKeditor = new FCKeditor( "FCKeditor1" );
oFCKeditor.Config["CustomConfigurationsPath"] = "/admin/editor/myconfig.js";
oFCKeditor.Create();
</script>
script>function html(){return true;}</script>
<textarea name="txText" id="txText" style="display:none;">TEXT</textarea>
<div>
<input type="hidden" id="txText" name="" value="TEXT" />
<input type="hidden" id="txText___Config"
value="EnableXHTML=true&EditorAreaCSS=/files/Stylesheet1.css&StylesXmlPath=/admin/public/EditorXMLConfig.aspx?
PM&CustomConfigurationsPath=/admin/public/setup.js.aspx&EnableSourceXHTML=true&
AutoDetectLanguage=false&DefaultLanguage=en" />
<iframe id="txText___Frame" src="/admin/editor/editor/fckeditor.original.html?InstanceName=txText&
Toolbar=DwCustomConfig" ></iframe>
</div>
...
And my editor still uses setting from fckconfig.js.
Some time following error occurs: 'FCKEditor' is undefined
How can I use my own config file instead of standart fckconfig.js?
When I try following nothing is happened (this code from the official site):
<script language="JavaScript" type="text/javascript">
var oFCKeditor = new FCKeditor( "FCKeditor1" );
oFCKeditor.Config["CustomConfigurationsPath"] = "/admin/editor/myconfig.js";
oFCKeditor.Create();
</script>
After, In the page that uses FCKEditor, I get this source output:
...
<script language="JavaScript" type="text/javascript">
var oFCKeditor = new FCKeditor( "FCKeditor1" );
oFCKeditor.Config["CustomConfigurationsPath"] = "/admin/editor/myconfig.js";
oFCKeditor.Create();
</script>
script>function html(){return true;}</script>
<textarea name="txText" id="txText" style="display:none;">TEXT</textarea>
<div>
<input type="hidden" id="txText" name="" value="TEXT" />
<input type="hidden" id="txText___Config"
value="EnableXHTML=true&EditorAreaCSS=/files/Stylesheet1.css&StylesXmlPath=/admin/public/EditorXMLConfig.aspx?
PM&CustomConfigurationsPath=/admin/public/setup.js.aspx&EnableSourceXHTML=true&
AutoDetectLanguage=false&DefaultLanguage=en" />
<iframe id="txText___Frame" src="/admin/editor/editor/fckeditor.original.html?InstanceName=txText&
Toolbar=DwCustomConfig" ></iframe>
</div>
...
And my editor still uses setting from fckconfig.js.
Some time following error occurs: 'FCKEditor' is undefined
RE: How can I use my own config file?
Then try referencing it relatively:
oFCKeditor.Config["CustomConfigurationsPath"] = "../custom.js" ;
Settings in fckconfig.js will be used, but should be overridden by your custom values.
The base url for relative addressing seems to be from fckeditor/editor where fckeditor.html is loaded.
Re: RE: How can I use my own config file?
Thanx a lot. Such a tiny bit of information, and still the cause of so much frustration. I'm adding that to the wiki pages.