Tiny MCE XHTML Editor question

Vote:
 

Is there an option that will show me the source code of the stuff inside tiny mce editor ?

#216970
Feb 11, 2020 17:25
Vote:
 

Yes. it's called code!

public void ConfigureContainer(ServiceConfigurationContext context)
{
	context.Services.Configure<TinyMceConfiguration>(config =>
	{
		config.Default()
			.AddPlugin("code")
			.Toolbar("code")


	});
}

Configuring TinyMCE in Episerver: 
https://world.episerver.com/documentation/developer-guides/CMS/add-ons/customizing-the-tinymce-editor-v2/

List of what plugins you must add in order to use the different controls:
https://www.tiny.cloud/docs/advanced/editor-control-identifiers/

#216971
Edited, Feb 11, 2020 17:40
Vote:
 

Yes you can achieve this by creating a initialization module.

Below is the sample class that you can use-

using EPiServer.Cms.TinyMce.Core;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;

namespace MyEpiserverSite.Business.Initialization
{
    [ModuleDependency(typeof(TinyMceInitialization))]
    public class ExtendedTinyMceInitialization : IConfigurableModule
    {
        public void Initialize(InitializationEngine context)
        {
        }

        public void Uninitialize(InitializationEngine context)
        {
        }

        public void ConfigureContainer(ServiceConfigurationContext context)
        {
            context.Services.Configure<TinyMceConfiguration>(config =>
            {
                config.Default()
                    .AddPlugin("code")
.Toolbar("code")
            });
        }
    }
}

More information-

https://www.epinova.no/en/blog/configuring-default-toolbar-buttons-in-tinymce-4-for-episerver/

#216972
Edited, Feb 11, 2020 18:04
Vote:
 

Thanks Guys. This is perfect.

#216975
Feb 11, 2020 18:45
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.