In order to work with Navision (2016, 2017, 2018 and BC), TinymceEditor is using the world's #1 JavaScript library for rich text editing TinyMCE
Navision Version | RTC | Web Client |
---|---|---|
2016 | Yes | Yes |
2017 | Yes | Yes |
2018 | Yes | Yes |
Here for Business Central (BC)
Yes, you can choose either offline or online to get latest tinymce js for Web client.
RTC is only offline mode.
Some of functions are do not work online js. eg, language, skin or domain validation. This is a reason to set default offline js for RTC.
If you want to use online js for RTC. Here, you need to change as per requirement.
/* "TinyMCEEditorHelper.js" *
/* From */
LoadOnlineScript: function () {
if ((TinyMCEEditorHelper.GetControlAddInReady()) && (TinyMCEEditorHelper.GetOnlineScriptUrl() != '') && (!TinyMCEEditorHelper.GetScriptLoaded()) && (TinyMCEEditorHelper.GetPlatform() != 0)) {
var excludeJsFiles = ['TinyMCEEditor.js', 'TinyMCEEditorHelper.js', 'jquery.min.js'];
var excludeCssiles = ['css'];
TinyMCEEditorHelper.RemoveJsCssfile(excludeJsFiles, 'js');
TinyMCEEditorHelper.RemoveJsCssfile(excludeCssiles, 'css');
tinymce = undefined;
TinyMCEEditorHelper.AddJsCssfile(TinyMCEEditorHelper.GetOnlineScriptUrl(), 'js');
TinyMCEEditorHelper.SetScriptLoaded();
}
},
/* To */
LoadOnlineScript: function () {
if ((TinyMCEEditorHelper.GetControlAddInReady()) && (TinyMCEEditorHelper.GetOnlineScriptUrl() != '') && (!TinyMCEEditorHelper.GetScriptLoaded())) {
var excludeJsFiles = ['TinyMCEEditor.js', 'TinyMCEEditorHelper.js', 'jquery.min.js'];
var excludeCssiles = ['css'];
TinyMCEEditorHelper.RemoveJsCssfile(excludeJsFiles, 'js');
TinyMCEEditorHelper.RemoveJsCssfile(excludeCssiles, 'css');
tinymce = undefined;
TinyMCEEditorHelper.AddJsCssfile(TinyMCEEditorHelper.GetOnlineScriptUrl(), 'js');
TinyMCEEditorHelper.SetScriptLoaded();
}
},
I'll choose offline rather than online. No need internet connection and the loading is fast.
You call below method to check offline or online
CurrPage.TinyMCEEditor.GetVersion();
In order to use as online, firstly, you need to register your domain and get the api key from TinyMCE. And then you can set tinymce js url as per below property.
CurrPage.TinyMCEEditor.SetOnlineScriptUrl("https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js","Free License");
You can use below link. But you need to replace "no-api-key" with your api key after register from TinyMCE web site.
https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js
If you do not register, you will get notification when you use.
You can register at tinymce web site to get api key.
Yes, it is. But, you can't use premium plugin feature.
Yes, you can use it as basic. It won't work for language or other plugin. It's better to get the link from TinyMCE.
No.
Yes, open the powershell with Administrator and then run the "Create-Resource-Package.ps1". It will auto download the latest version of TinyMCE package from TinyMCE web site and make the "Resource_TinyMCE_Ver_x.x.x.zip" file is under "TinyMCEEditor Package" folder. Please read the documentation from "Create-Resource-Package.ps1" before build yourself.
Yes, you can make your own skin from TinyMCE Skin tool and download the skin from TinyMCE Skin tool and save at "TinyMCEEditor CAL\TinyMCEEditor JS\skins" folder. And then rebuild the package again.
You can use below code to set the skin.
CurrPage.TinyMCEEditor.SetSkinIconAndCss(SkinName,IconSize,CssName,CssCores)
You can use below code to get the avaiable skins.
CurrPage.TinyMCEEditor.GetAvaiableSkin();
It allows you to change the view, like document or writer or dark mode. Here is avaiable CSS Names
- default
- dark
- document
- writer
- your own skin name
Yes, it is. Visit to this link to view the supported language.
No, TinyMCEEditor is already downloaded and added for you. But you can't find your langauge inside, you may need to add yourself and build it again.
You can find the language code at here. And then you need to set the language code as per below
CurrPage.TinyMCEEditor.SetLanguage('de'; 'ltr');
//or
CurrPage.TinyMCEEditor.SetLanguage('ar'; 'rtl');
No. you can switch between Html mode from Text mode or Text mode to Html mode when you are editing the document.
Yes.
//For Html
CurrPage.TinyMCEEditor.InitContent(False, True);
//For Text
CurrPage.TinyMCEEditor.InitContent(True, True);
Yes.
//Set True or False between Html and Text
CurrPage.TinyMCEEditor.SetContentType(True/False,True/False);
Yes.
CurrPage.TinyMCEEditor.SetViewMode;
Yes.
CurrPage.TinyMCEEditor.SetEditable(CurrPage.EDITABLE);
Use below method and event to get content from TinyMCEEditor to AL
CurrPage.TinyMCEEditor.GetContent();
trigger ContentText(Contents: Text; IsText: Boolean)
begin
// Do Something
/*
if (IsControlAddInReady AND IsDocumentReady) then begin
end;
*/
end;
Yes, you can to use below property for auto save.
CurrPage.TinyMCEEditor.SetAutoSave(Second,ConfirmY/N);
You allow user to switch between Html or Text mode at editor. You need to use GetContent() to get current editor content.
You set Editor mode is html only but you want to get html as text. In this case, you need to use GetContentAs(True)
Editor mode is text only but you want to get text as html. In this case, you need to use GetContentAs(False)
Yes, you should call SetDispose() method when you close the page. It will be released memory.
CurrPage.TinyMCEEditor.SetDispose();
You can find at "TinyMCEEditor Package" folder.
Addin Name : Microsoft.Dynamics.Nav.Client.TinyMCEEditor
Public Key Token: 1bd514f27c8bf57b
Version: 1.0.0.0
Category: JavaScript Control Add-in
Description: Microsoft.Dynamics.Nav.Client.TinyMCEEditor control add-in
Yes. you can find at below section.
TINYMCEEDITOR CAL
├─Images
│ HtmlMode.png
│ TextMode.png
│
├─TinyMCEEditor C#
│ │ TinyMCEEditor.cs
│ │ TinyMCEEditor.csproj
│ │ TinyMCEEditor.sln
│ │
│ ├─bin
│ │ ├─Debug
│ │ │ blank.txt
│ │ │
│ │ └─Release
│ │ blank.txt
│ │
│ ├─obj
│ │ ├─Debug
│ │ │ blank.txt
│ │ │
│ │ └─Release
│ │ blank.txt
│ │
│ ├─Properties
│ │ AssemblyInfo.cs
│ │
│ ├─References
│ │ Microsoft.Dynamics.Framework.UI.Extensibility.dll
│ │ Microsoft.Dynamics.Framework.UI.Extensibility.xml
│ │
│ └─snk
│ TinyMCEEditor.snk
│
├─TinyMCEEditor FOB
│ TinyMCEEditor.fob
│ TinyMCEEditor.txt
│
├─TinyMCEEditor JS
│ │ Create-Resource-Package.ps1
│ │ manifest.xml
│ │
│ ├─image
│ │ Loader.gif
│ │
│ ├─script
│ │ jquery.min.js
│ │ TinyMCEEditor.js
│ │ TinyMCEEditorHelper.js
│ │ TinyMCEEditorStartUp.js
│ │
│ └─skins
│ tinymceeditor-black.zip
│ tinymceeditor-blue.zip
│ tinymceeditor-dark-gray.zip
│ tinymceeditor-dark-green.zip
│ tinymceeditor-dark.zip
│ tinymceeditor-gray.zip
│
└─TinyMCEEditor Package
Microsoft.Dynamics.Nav.Client.TinyMCEEditor.dll
ReadMe.txt
Resource_TinyMCE_Ver_5.5.1.zip
VersionLog.txt
**Properties and Methods**
SetSkinIconAndCss(pSkinName: Text; pIconSize: Text; pCssName: Text; pCssCores: Boolean);
SetFonts(pFonts: Text);
SetFontSize(pFontSize: Text);
SetLanguage(pLanguage: Text; pDirectionality: Text);
SetTokenProvider(pTokenProvider: Text);
SetDropboxAppKey(pDropboxAppKey: Text);
SetGoogleDriveKey(pGoogleDriveKey: Text);
SetGoogleDriveClientId(pGoogleDriveClientid: Text);
SetOnlineScriptUrl(pUrl: Text; pFreeLicense: Boolean);
SetEditable(pEditable: Boolean);
SetHtmlSchema(pSchema: Text);
SetAutoSave(pSecond: Integer; pConfirm: Boolean);
InitContent(pIsText: Boolean; pIsFixContentType: Boolean);
SetContent(pContent: Text);
SetContentBlock(pBlock: Text);
SetEnableContentEventOn(pInput: Boolean; pKeyup: Boolean; pChange: Boolean; pNodeChange: Boolean);
SetContentType(pIsText: Boolean; pIsFixContentType: Boolean);
SetContentStyle(pStyle: Text);
SetHideBrand();
SetHideToolbar();
SetViewMode();
SetShowMenu();
SetContentOnly();
SetEnablePremiumPlugin();
SetDispose();
GetVersion();
GetAvaiableSkin();
GetDefaultFonts();
GetDefaultFontSize();
GetContent();
GetContentAs(pIsText: Boolean);
**Events**
ContentHasSaved();
ContentTypeHasChanged();
ContentHasChanged(EventName: Text);
ContentText(Contents: Text; IsText: Boolean);
ControlAddInReady(IsReady: Boolean);
DocumentReady(IsReady: Boolean);
You are facing endless loading screen when you are using Control Add-In with RTC client. You need change the setting of Internet Explorer.
TinyMCEEditor is totally free and unlicense. But you must follow the TinyMCE and JQuery license terms and condition