engine/conversion/upcasthelpers
Classes
module:engine/conversion/upcasthelpers~UpcastHelpers
Type Definitions
module:engine/conversion/upcasthelpers~UpcastAttributeCreatorFunctionmodule:engine/conversion/upcasthelpers~UpcastElementCreatorFunctionmodule:engine/conversion/upcasthelpers~UpcastMarkerFromAttributeCreatorFunctionmodule:engine/conversion/upcasthelpers~UpcastMarkerFromElementCreatorFunction
Functions
convertSelectionChange( model, mapper ) → ( evt: EventInfo, data: object ) => voidinternalmodule:engine/conversion/upcasthelpers~convertSelectionChangeFunction factory, creates a callback function which converts a view selection taken from the event-selectionChange event and sets in on the model.
Note: because there is no view selection change dispatcher nor any other advanced view selection to model conversion mechanism, the callback should be set directly on view document.
view.document.on( 'selectionChange', convertSelectionChange( modelDocument, mapper ) );Copy codeParameters
Returns
( evt: EventInfo, data: object ) => voidevent-selectionChange callback function.
convertText() → ( evt: EventInfo, data: UpcastConversionData<ViewText>, __namedParameters: UpcastConversionApi ) => voidinternalmodule:engine/conversion/upcasthelpers~convertTextFunction factory, creates a converter that converts
ViewTexttoModelText.Returns
( evt: EventInfo, data: UpcastConversionData<ViewText>, __namedParameters: UpcastConversionApi ) => voidView text converter.
convertToModelFragment() → ( evt: EventInfo, data: UpcastConversionData<ViewElement | ViewDocumentFragment>, conversionApi: UpcastConversionApi ) => voidinternalmodule:engine/conversion/upcasthelpers~convertToModelFragmentFunction factory, creates a converter that converts view document fragment or all children of
ViewElementinto model document fragment. This is the "entry-point" converter for upcast (view to model conversion). This converter starts the conversion of all children of passed view document fragment. Those children view nodes are then handled by other converters.This also a "default", last resort converter for all view elements that has not been converted by other converters. When a view element is being converted to the model but it does not have converter specified, that view element will be converted to model document fragment and returned.
Returns
( evt: EventInfo, data: UpcastConversionData<ViewElement | ViewDocumentFragment>, conversionApi: UpcastConversionApi ) => voidUniversal converter for view fragments and elements that returns model fragment with children of converted view item.