#5 Custom WYSIWYG with 1 additional button, multi-language
Requirements
2sxc Custom WYSIWYG with Additional Button
This example show how we customize more of TinyMCE.
You can learn how to:
- Use
addTranslations()
- Use
configureOptions(...)
to extend the toolbar - Use configureAddOns to change button options for the image
- Run code when the editor is running
init
to add button defininiots
Important: The feature "Public Use of Edit Form" is disabled
If you want this demo to run for anonymous users you would need it. Register your site on patrons.2sxc.org to get access to the feature.String WYSIWYG With Additional Button and Labels
Output
This example keeps the default buttons and adds another one, with multi-language labels
Hit this edit button to have a look:
Important: We opened permissions that you can experience the edit dialog - so you can save, but it will just create draft data đŸ˜‰.
#5 Custom WYSIWYG with 1 additional button, multi-language
Source Code of this file
Below you'll see the source code of the file. Note that we're just showing the main part, and hiding some parts of the file which are not relevant for understanding the essentials. Click to expand the code
@inherits Custom.Hybrid.Razor14 <!-- unimportant stuff, hidden --> <div @Sys.PageParts.InfoWrapper()> @Html.Partial("../shared/DefaultInfoSection.cshtml") <div @Sys.PageParts.InfoIntro()> <h2>2sxc Custom WYSIWYG with Additional Button</h2> <p> This example show how we customize more of TinyMCE. </p> <p>You can learn how to:</p> <ul> <li>Use <code>addTranslations()</code></li> <li>Use <code>configureOptions(...)</code> to extend the toolbar</li> <li>Use configureAddOns to change button options for the image</li> <li>Run code when the editor is running <code>init</code> to add button defininiots</li> </ul> </div> </div> <br> @Html.Partial("../shared/WarnAnonymousIfFeatureIsOff.cshtml") </hide> <div class="alert alert-success"> <h2>String WYSIWYG With Additional Button and Labels</h2> <p> This example keeps the default buttons and adds another one, with multi-language labels <br> Hit this edit button to have a look: </p> @Kit.Toolbar.Empty().New("UiStringWysiwygButtonMl").AsTag() </div> @Html.Partial("warning.cshtml") @* Footer *@ @Html.Partial("../Shared/Layout/FooterWithSource.cshtml", new { Sys = Sys })