engine/conversion/upcasthelpers
@ckeditor/ckeditor5-engine/src/conversion/upcasthelpers
Filtering
Classes
-
UpcastHelpers
module:engine/conversion/upcasthelpers~UpcastHelpers
Type Definitions
-
AttributeCreatorFunction
module:engine/conversion/upcasthelpers~AttributeCreatorFunction
-
ElementCreatorFunction
module:engine/conversion/upcasthelpers~ElementCreatorFunction
-
MarkerFromAttributeCreatorFunction
module:engine/conversion/upcasthelpers~MarkerFromAttributeCreatorFunction
-
MarkerFromElementCreatorFunction
module:engine/conversion/upcasthelpers~MarkerFromElementCreatorFunction
Functions
-
convertSelectionChange( model, mapper ) → ( EventInfo<string, unknown>, object ) => void
module:engine/conversion/upcasthelpers~convertSelectionChange
Function 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 ) );
Parameters
Returns
( EventInfo<string, unknown>, object ) => void
event-selectionChange callback function.
-
convertText() → ( EventInfo<string, unknown>, UpcastConversionData<Text>, UpcastConversionApi ) => void
module:engine/conversion/upcasthelpers~convertText
Function factory, creates a converter that converts
Text
toText
.Returns
( EventInfo<string, unknown>, UpcastConversionData<Text>, UpcastConversionApi ) => void
View text converter.
-
convertToModelFragment() → ( EventInfo<string, unknown>, UpcastConversionData<Element | DocumentFragment>, UpcastConversionApi ) => void
module:engine/conversion/upcasthelpers~convertToModelFragment
Function factory, creates a converter that converts view document fragment or all children of
Element
into 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
( EventInfo<string, unknown>, UpcastConversionData<Element | DocumentFragment>, UpcastConversionApi ) => void
Universal converter for view fragments and elements that returns model fragment with children of converted view item.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.