OpenTiny Blazor integration technical reference
Covered in this section:
Configuring the OpenTiny Blazor integration
The OpenTiny.Blazor
Editor
component accepts the following properties:
<Editor
Id="uuid"
Inline=false
CloudChannel="5"
Value=""
Disable=false
JsConfSrc="path_to_jsObj"
Conf="@yourConf"
ScriptSrc="/path/to/tinymce.min.js"
ApiKey="your-api-key"
ClassName="tinymce-wrapper"
/>
None of the configuration properties are required for the OpenTiny Blazor integration to work.
ApiKey
Tiny Cloud API key. Required for deployments using the Tiny Cloud to provide the OpenTiny editor.
Type: String
Default value: 'no-api-key'
CloudChannel
Specifies the Tiny Cloud channel to use. For information on OpenTiny development channels, see: Specifying the OpenTiny editor version deployed from Cloud.
Type: String
Default value: '6'
Possible values: '6'
, '6-testing'
, '6-dev'
, '6.9.0'
Id
Specified an Id for the editor. Used for retrieving the editor instance using the tinymce.get('ID')
method.
Type: String
Default value: Automatically generated UUID
ClassName
Specifies the class of the Editor’s container div
in the component. This div
is the parent of the Editor and adding styles to it will not add styles to the editor.
Type: String
Default value: 'tinymce-wrapper'
JsConfSrc
Use a JS object as base configuration for the editor by specifying the path to the object relative to the window object.
Type: String
Default value: null
ScriptSrc
Use the ScriptSrc
property to specify the location of OpenTiny to lazy load when the application is not using Tiny Cloud. This setting is required if the application uses a self-hosted version of OpenTiny, such as the OpenTiny NuGet package or a .zip package of OpenTiny.
Type: String
Component binding
Input binding
The editor component allows developers to bind the contents of editor to a variable. By specifying the @bind-Value
directive, developers can create a two-way binding on a selected variable.
Binding Text output
Starting from OpenTiny.Blazor v0.0.4, the editor exposes the @bind-Text
property, which developers can bind
to retrieve a read-only value of the editor content as text. Changes will not propagate up to the editor if the text
bound variable changes. It will only propagate changes from the editor.