B-Arts DocumentationIndice generale

BEditor

Editor HTML B-Arts con toolbar, cronologia, visualizzazione sorgente, modalità a schermo intero, immagini, collegamenti, tabelle, stili e campi applicativi.

Contenuto e binding

  • Text/TextChanged: contenuto HTML con binding.

  • GetHtmlAsync(): HTML corrente.

  • GetOnlyTextAsync(): solo testo.

  • SetTextAsync(html): sostituisce il contenuto.

  • ReadOnly/ReadOnlyChanged e SetReadOnly(...).

Configurazione

I gruppi della toolbar si controllano tramite le proprietà ShowGroup*. ShowToggleSourceView e ShowToggleFullScreen abilitano le modalità avanzate. MaxHistorySizeMB limita la cronologia.

BFonts, BInterlines e BStyles ricevono rispettivamente BEditorFont, BEditorInterline e BEditorStyle. Fields contiene BItem inseribili nel testo e GetValueField ne risolve il valore.

Per immagini usare Images (BDictionary<string, byte[]>) e OnLoadImage; il callback può fornire URL o contenuto mediante BEditorImageEventArgs.

Esempio

<BEditor @ref="editor"
         Width="100%"
         Height="500px"
         ShowToggleSourceView="true"
         ShowToggleFullScreen="true"
         @bind-Text="modello.Html">
  <BFonts>
    <BEditorFont Nome="Arial" FontFamily="Arial, sans-serif" />
  </BFonts>
  <BInterlines>
    <BEditorInterline Nome="Normale" Valore="1.0" />
  </BInterlines>
</BEditor>

Non manipolare direttamente il DOM dell'editor dal codice applicativo: usare i metodi pubblici e lasciare l'interop agli asset del framework.

Altri casi: BEditor.Examples.md.

<!-- BEGIN GENERATED API -->

Riferimento API completo

Identità

  • Namespace: B.BWeb.BControls

  • Assembly: BFrameworkWebControls

  • Tipo: class

  • Classe base: BBaseJSControl

  • Interfacce: IAsyncDisposable, IComponent, IHandleAfterRender, IHandleEvent

  • Sorgente API: versione 5.0.1

Dichiarazione

public class BEditor : BBaseJSControl, IComponent, IHandleEvent, IHandleAfterRender, IAsyncDisposable

Costruttori

  • BEditor()

Campi pubblici

Nessun campo pubblico dichiarato.

Proprietà

Proprietà Tipo Accesso
BFonts RenderFragment get/set
BInterlines RenderFragment get/set
BStyles RenderFragment get/set
ClientIdDlgImage string get
ClientIdDlgLink string get
ClientIdDlgTable string get
ClientIdDlgTableOption string get
Connection BConnection get/set
CssClassBody string get/set
CssClassButton string get/set
CssClassButtonPrimary string get/set
CssClassColorBox string get/set
CssClassColorInput string get/set
CssClassColorLabel string get/set
CssClassContainer string get/set
CssClassContent string get/set
CssClassFieldDescription string get/set
CssClassFieldInsert string get/set
CssClassFieldItem string get/set
CssClassFieldPreview string get/set
CssClassFieldsEmpty string get/set
CssClassFieldsHeader string get/set
CssClassFieldsPanel string get/set
CssClassGroup string get/set
CssClassHidden string get/set
CssClassSelect string get/set
CssClassSelectNarrow string get/set
CssClassSeparator string get/set
CssClassSource string get/set
CssClassStatusBar string get/set
CssClassStatusItem string get/set
CssClassStatusLeft string get/set
CssClassStatusRight string get/set
CssClassSurface string get/set
CssClassTableOption string get/set
CssClassTableResizeLayer string get/set
CssClassToolbar string get/set
CssClassToolbarRow string get/set
DialogImageWidth string get/set
DialogLinkWidth string get/set
DialogTableOptionWidth string get/set
DialogTableWidth string get/set
Fields List<BItem> get/set
FieldsPanelWidth string get/set
FontSize List<int> get/set
GetValueField Func<string, Task<string>> get/set
Height string get/set
Images BDictionary<string, byte[]> get/set
Log BLogText get
MaxHistorySizeMB int get/set
OnLoadImage EventCallback<BEditorImageEventArgs> get/set
ReadOnly bool get/set
ReadOnlyChanged EventCallback<bool> get/set
ShowFieldsPanel bool get/set
ShowGroupClipboard bool get/set
ShowGroupEditing bool get/set
ShowGroupFields bool get/set
ShowGroupFont bool get/set
ShowGroupInsert bool get/set
ShowGroupLists bool get/set
ShowGroupParagraph bool get/set
ShowGroupStyles bool get/set
ShowGroupView bool get/set
ShowToggleFullScreen bool get/set
ShowToggleSourceView bool get/set
Text string get/set
TextAlignCenter string get/set
TextAlignLeft string get/set
TextAlignRight string get/set
TextBold string get/set
TextBulletedList string get/set
TextChanged EventCallback<string> get/set
TextClearFormatting string get/set
TextColorLabel string get/set
TextCopy string get/set
TextCopyStyle string get/set
TextCut string get/set
TextFieldsHeader string get/set
TextFind string get/set
TextFullscreen string get/set
TextHighlightLabel string get/set
TextIndentDecrease string get/set
TextIndentIncrease string get/set
TextInsertField string get/set
TextInsertFieldItem string get/set
TextInsertHr string get/set
TextInsertImage string get/set
TextInsertLink string get/set
TextInsertTable string get/set
TextItalic string get/set
TextJustify string get/set
TextMultilevelList string get/set
TextNoFields string get/set
TextNumberedList string get/set
TextPaste string get/set
TextPastePlain string get/set
TextPasteStyle string get/set
TextRedo string get/set
TextRemoveLink string get/set
TextReplace string get/set
TextRestartNumbering string get/set
TextSelectAll string get/set
TextShowInvisibles string get/set
TextSpecialChars string get/set
TextStatusChars string get/set
TextStatusMode string get/set
TextStatusSelection string get/set
TextStatusWords string get/set
TextStrike string get/set
TextSubscript string get/set
TextSuperscript string get/set
TextToggleFieldPreview string get/set
TextToggleSource string get/set
TextUnderline string get/set
TextUndo string get/set
Width string get/set

Callback Blazor

  • OnLoadImage: EventCallback<BEditorImageEventArgs>

  • ReadOnlyChanged: EventCallback<bool>

  • TextChanged: EventCallback<string>

Eventi CLR

Nessun evento CLR pubblico dichiarato.

Metodi

  • void AddFont(BEditorFont font)

  • void AddInterline(BEditorInterline interline)

  • void AddStyle(BEditorStyle style)

  • Task BEditorTextChanged()

  • void DeleteImage(string KeyImage)

  • void DlgImageShow(string KeyImage, string RenderMode, string RendedrPosition, int Width, int Height)

  • void DlgLinkShow(string Testo, string Url)

  • void DlgTableOptionShow(string Target, string style)

  • void DlgTableShow()

  • Task<Dictionary<string, string>> GetFieldValues(string[] FieldKeys)

  • Task<string> GetHtmlAsync()

  • Task<string> GetOnlyTextAsync()

  • Task<string> GetTextAsync()

  • Task<object> ImportImage(string Base64)

  • Task<object> ReceiveImageChunk(string base64Chunk, bool isLastChunk)

  • Task SetDisabled(bool disabled)

  • Task SetReadOnly(bool readOnly)

  • Task SetTextAsync(string NewText)

  • Task SyncToolbarColors(string TextColor, string HighlightColor)

  • Task SyncToolbarCombos(string FontSizeValue, string LineSpacingValue)

Tipi annidati pubblici

BEditorCommand

  • Bold = 0

  • Italic = 1

  • Underline = 2

  • Strikethrough = 3

  • Superscript = 4

  • Subscript = 5

  • FontFamily = 6

  • FontSize = 7

  • TextColor = 8

  • HighlightColor = 9

  • AlignLeft = 10

  • AlignCenter = 11

  • AlignRight = 12

  • AlignJustify = 13

  • IncreaseIndent = 14

  • DecreaseIndent = 15

  • LineSpacing = 16

  • Style = 17

  • BulletedList = 18

  • NumberedList = 19

  • Cut = 20

  • Copy = 21

  • Paste = 22

  • PastePlainText = 23

  • CopyStyle = 24

  • PasteStyle = 25

  • ClearFormatting = 26

  • InsertLink = 27

  • RemoveLink = 28

  • InsertImage = 29

  • InsertHorizontalRule = 30

  • InsertTable = 31

  • Undo = 32

  • Redo = 33

  • ToggleSourceView = 34

  • Fullscreen = 35

  • ShowInvisibles = 36

  • InsertField = 37

  • ToggleFieldPreview = 38

Membri B-Arts ereditati

  • Proprietà da BBaseControl: string ClientId { get; }

  • Proprietà da BBaseControl: string CssClass { get; set; }

  • Proprietà da BBaseControl: bool Disabled { get; set; }

  • Proprietà da BBaseControl: EventCallback<bool> DisabledChanged { get; set; }

  • Proprietà da BBaseControl: string Id { get; set; }

  • Proprietà da BBaseControl: string Style { get; set; }

  • Proprietà da BBaseControl: int TabIndex { get; set; }

  • Proprietà da BBaseControl: bool Visible { get; set; }

  • Proprietà da BBaseControl: EventCallback<bool> VisibleChanged { get; set; }

  • Metodo da BBaseControl: Task SetVisible(bool visible)

  • Metodo da BBaseJSControl: void BJSControlIsInitialized()

  • Metodo da BBaseJSControl: ValueTask DisposeAsync()

Firme pubbliche estratte dal sorgente

B.BWeb.BControls.BEditor
B.BWeb.BControls.BEditor.BEditorCommand
B.BWeb.BControls.BEditor.OnLoadImage
B.BWeb.BControls.BEditor.ReadOnlyChanged
B.BWeb.BControls.BEditor.GetValueField
B.BWeb.BControls.BEditor.ClientIdDlgLink
B.BWeb.BControls.BEditor.ClientIdDlgImage
B.BWeb.BControls.BEditor.ClientIdDlgTable
B.BWeb.BControls.BEditor.ClientIdDlgTableOption
B.BWeb.BControls.BEditor.Log
B.BWeb.BControls.BEditor.Connection
B.BWeb.BControls.BEditor.Images
B.BWeb.BControls.BEditor.Text
B.BWeb.BControls.BEditor.TextChanged
B.BWeb.BControls.BEditor.ReadOnly
B.BWeb.BControls.BEditor.Width
B.BWeb.BControls.BEditor.Height
B.BWeb.BControls.BEditor.MaxHistorySizeMB
B.BWeb.BControls.BEditor.FontSize
B.BWeb.BControls.BEditor.Fields
B.BWeb.BControls.BEditor.BStyles
B.BWeb.BControls.BEditor.BFonts
B.BWeb.BControls.BEditor.BInterlines
B.BWeb.BControls.BEditor.CssClassContainer
B.BWeb.BControls.BEditor.CssClassToolbar
B.BWeb.BControls.BEditor.CssClassToolbarRow
B.BWeb.BControls.BEditor.CssClassGroup
B.BWeb.BControls.BEditor.CssClassSeparator
B.BWeb.BControls.BEditor.CssClassButton
B.BWeb.BControls.BEditor.CssClassButtonPrimary
B.BWeb.BControls.BEditor.CssClassSelect
B.BWeb.BControls.BEditor.CssClassSelectNarrow
B.BWeb.BControls.BEditor.CssClassColorBox
B.BWeb.BControls.BEditor.CssClassColorLabel
B.BWeb.BControls.BEditor.CssClassColorInput
B.BWeb.BControls.BEditor.CssClassBody
B.BWeb.BControls.BEditor.CssClassSurface
B.BWeb.BControls.BEditor.CssClassContent
B.BWeb.BControls.BEditor.CssClassSource
B.BWeb.BControls.BEditor.CssClassTableOption
B.BWeb.BControls.BEditor.CssClassTableResizeLayer
B.BWeb.BControls.BEditor.CssClassStatusBar
B.BWeb.BControls.BEditor.CssClassStatusLeft
B.BWeb.BControls.BEditor.CssClassStatusRight
B.BWeb.BControls.BEditor.CssClassStatusItem
B.BWeb.BControls.BEditor.CssClassHidden
B.BWeb.BControls.BEditor.CssClassFieldsPanel
B.BWeb.BControls.BEditor.CssClassFieldsHeader
B.BWeb.BControls.BEditor.CssClassFieldPreview
B.BWeb.BControls.BEditor.CssClassFieldItem
B.BWeb.BControls.BEditor.CssClassFieldDescription
B.BWeb.BControls.BEditor.CssClassFieldInsert
B.BWeb.BControls.BEditor.CssClassFieldsEmpty
B.BWeb.BControls.BEditor.TextCut
B.BWeb.BControls.BEditor.TextCopy
B.BWeb.BControls.BEditor.TextPaste
B.BWeb.BControls.BEditor.TextPastePlain
B.BWeb.BControls.BEditor.TextCopyStyle
B.BWeb.BControls.BEditor.TextPasteStyle
B.BWeb.BControls.BEditor.TextClearFormatting
B.BWeb.BControls.BEditor.TextBold
B.BWeb.BControls.BEditor.TextItalic
B.BWeb.BControls.BEditor.TextUnderline
B.BWeb.BControls.BEditor.TextStrike
B.BWeb.BControls.BEditor.TextSuperscript
B.BWeb.BControls.BEditor.TextSubscript
B.BWeb.BControls.BEditor.TextAlignLeft
B.BWeb.BControls.BEditor.TextAlignCenter
B.BWeb.BControls.BEditor.TextAlignRight
B.BWeb.BControls.BEditor.TextJustify
B.BWeb.BControls.BEditor.TextIndentDecrease
B.BWeb.BControls.BEditor.TextIndentIncrease
B.BWeb.BControls.BEditor.TextBulletedList
B.BWeb.BControls.BEditor.TextNumberedList
B.BWeb.BControls.BEditor.TextMultilevelList
B.BWeb.BControls.BEditor.TextRestartNumbering
B.BWeb.BControls.BEditor.TextInsertLink
B.BWeb.BControls.BEditor.TextRemoveLink
B.BWeb.BControls.BEditor.TextInsertImage
B.BWeb.BControls.BEditor.TextInsertHr
B.BWeb.BControls.BEditor.TextInsertTable
B.BWeb.BControls.BEditor.TextSpecialChars
B.BWeb.BControls.BEditor.TextUndo
B.BWeb.BControls.BEditor.TextRedo
B.BWeb.BControls.BEditor.TextSelectAll
B.BWeb.BControls.BEditor.TextFullscreen
B.BWeb.BControls.BEditor.TextColorLabel
B.BWeb.BControls.BEditor.TextHighlightLabel
B.BWeb.BControls.BEditor.TextFind
B.BWeb.BControls.BEditor.TextReplace
B.BWeb.BControls.BEditor.TextToggleSource
B.BWeb.BControls.BEditor.TextShowInvisibles
B.BWeb.BControls.BEditor.TextInsertField
B.BWeb.BControls.BEditor.TextToggleFieldPreview
B.BWeb.BControls.BEditor.TextInsertFieldItem
B.BWeb.BControls.BEditor.TextFieldsHeader
B.BWeb.BControls.BEditor.TextNoFields
B.BWeb.BControls.BEditor.FieldsPanelWidth
B.BWeb.BControls.BEditor.TextStatusMode
B.BWeb.BControls.BEditor.TextStatusSelection
B.BWeb.BControls.BEditor.TextStatusWords
B.BWeb.BControls.BEditor.TextStatusChars
B.BWeb.BControls.BEditor.DialogLinkWidth
B.BWeb.BControls.BEditor.DialogImageWidth
B.BWeb.BControls.BEditor.DialogTableWidth
B.BWeb.BControls.BEditor.DialogTableOptionWidth
B.BWeb.BControls.BEditor.ShowGroupFont
B.BWeb.BControls.BEditor.ShowGroupStyles
B.BWeb.BControls.BEditor.ShowGroupLists
B.BWeb.BControls.BEditor.ShowGroupParagraph
B.BWeb.BControls.BEditor.ShowGroupClipboard
B.BWeb.BControls.BEditor.ShowGroupInsert
B.BWeb.BControls.BEditor.ShowGroupEditing
B.BWeb.BControls.BEditor.ShowGroupView
B.BWeb.BControls.BEditor.ShowGroupFields
B.BWeb.BControls.BEditor.ShowFieldsPanel
B.BWeb.BControls.BEditor.ShowToggleSourceView
B.BWeb.BControls.BEditor.ShowToggleFullScreen
B.BWeb.BControls.BEditor.BEditorTextChanged()
B.BWeb.BControls.BEditor.SyncToolbarColors(string, string)
B.BWeb.BControls.BEditor.SyncToolbarCombos(string, string)
B.BWeb.BControls.BEditor.DlgLinkShow(string, string)
B.BWeb.BControls.BEditor.DlgImageShow(string, string, string, int, int)
B.BWeb.BControls.BEditor.DeleteImage(string)
B.BWeb.BControls.BEditor.ImportImage(string)
B.BWeb.BControls.BEditor.DlgTableShow()
B.BWeb.BControls.BEditor.DlgTableOptionShow(string, string)
B.BWeb.BControls.BEditor.ReceiveImageChunk(string, bool)
B.BWeb.BControls.BEditor.GetFieldValues(string[])
B.BWeb.BControls.BEditor.AddStyle(B.BWeb.BControls.BEditorStyle)
B.BWeb.BControls.BEditor.AddFont(B.BWeb.BControls.BEditorFont)
B.BWeb.BControls.BEditor.AddInterline(B.BWeb.BControls.BEditorInterline)
B.BWeb.BControls.BEditor.GetHtmlAsync()
B.BWeb.BControls.BEditor.GetTextAsync()
B.BWeb.BControls.BEditor.GetOnlyTextAsync()
B.BWeb.BControls.BEditor.SetTextAsync(string)
B.BWeb.BControls.BEditor.SetReadOnly(bool)
B.BWeb.BControls.BEditor.SetDisabled(bool)
B.BWeb.BControls.BEditor.SetFocus()
B.BWeb.BControls.BEditor.SetFocus(B.BWeb.BClasses.BFocusArgs)

<!-- BAIDocs:API:fine -->