I have a client that really does not get it and wants to use MS Word to choose any font they have on their machine and bold, underline, color etc the content. grrr no end of discussion convinces them as they used to use Dreamweaver & word to do all this.
So I have set up the content channel for them and given their word access to channel. However any formatting they add to the content comes through updated ok but when you publish the pages the formatting all disappears and it reverts back to standard formatting.
I have installed tinyMCE as a last resort but will need to create 4 font types with 4 colours with 3 line heights and 4 font sizes. Quite a few combinations they want.
Any ideas on why Umbraco is removing the word formatting??
Just a wild guess but check the file Config/TinyMCE.config You'll see an Xml element called validElements and font is excluded from being valid. remove that and see what happens.
So a bit of hunting around and I found the following valid elements addition. So I added it. Now I get the following error any ideas what I have done wrong??
font[face|size|color]
ERROR
System.NullReferenceException: Object reference not set to an instance of an
object.
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.editorControls.tinymce.tinyMCEConfiguration.init() +1833
umbraco.editorControls.tinymce.tinyMCEConfiguration.get_Plugins() +14
umbraco.editorControls.tinyMCE3.TinyMCE..ctor(IData Data, String Configuration) +1830
[ArgumentException: Incorrect TinyMCE configuration.
Parameter name: Configuration]
umbraco.editorControls.tinyMCE3.TinyMCE..ctor(IData Data, String Configuration) +6415
umbraco.editorControls.tinyMCE3.tinyMCE3dataType.get_DataEditor() +95
umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +87
umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +782
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +368
System.Web.UI.Control.InitRecursive(Control namingContainer) +333
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint
MS Word formatting
I have a client that really does not get it and wants to use MS Word to choose any font they have on their machine and bold, underline, color etc the content. grrr no end of discussion convinces them as they used to use Dreamweaver & word to do all this.
So I have set up the content channel for them and given their word access to channel. However any formatting they add to the content comes through updated ok but when you publish the pages the formatting all disappears and it reverts back to standard formatting.
I have installed tinyMCE as a last resort but will need to create 4 font types with 4 colours with 3 line heights and 4 font sizes. Quite a few combinations they want.
Any ideas on why Umbraco is removing the word formatting??
Hi,
Just a wild guess but check the file Config/TinyMCE.config You'll see an Xml element called validElements and font is excluded from being valid. remove that and see what happens.
Cheers,
Richard
Should I include font in the validelements section, if so, what would i write as i see all the other elements have extra code after each??
additional: will that also maintain the colour and size selected in ms word??
So a bit of hunting around and I found the following valid elements addition. So I added it. Now I get the following error any ideas what I have done wrong??
font[face|size|color]
ERROR
System.NullReferenceException: Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.editorControls.tinymce.tinyMCEConfiguration.init() +1833 umbraco.editorControls.tinymce.tinyMCEConfiguration.get_Plugins() +14 umbraco.editorControls.tinyMCE3.TinyMCE..ctor(IData Data, String Configuration) +1830 [ArgumentException: Incorrect TinyMCE configuration. Parameter name: Configuration] umbraco.editorControls.tinyMCE3.TinyMCE..ctor(IData Data, String Configuration) +6415 umbraco.editorControls.tinyMCE3.tinyMCE3dataType.get_DataEditor() +95 umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +87 umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +782 umbraco.cms.presentation.editContent.OnInit(EventArgs e) +368 System.Web.UI.Control.InitRecursive(Control namingContainer) +333 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint
Ok so solution for all. After much hunting around i found the code below which adds font type, size and colour selectors to tinymce editor
Add following code into tinymce config file and adjust the span in valid elements, adjust priority as needed
<command>
<umbracoAlias>mcefontselect</umbracoAlias>
<icon>images/editor/fontselect.png</icon>
<tinyMceCommand value="" userInterface="true" frontendCommand="fontselect">fontselect</tinyMceCommand>
<priority>75</priority>
</command>
<command>
<umbracoAlias>mcefontsizeselect</umbracoAlias>
<icon>images/editor/fontsizeselect.png</icon>
<tinyMceCommand value="" userInterface="true" frontendCommand="fontsizeselect">fontsizeselect</tinyMceCommand>
<priority>76</priority>
</command>
<command>
<umbracoAlias>mceForeColor</umbracoAlias>
<icon>images/editor/forecolor.gif</icon>
<tinyMceCommand value="" userInterface="true" frontendCommand="forecolor">forecolor</tinyMceCommand>
<priority>77</priority>
</command>
VALID ELEMENTS
-span[class|align|style]
is working on a reply...