html-support/utils
@ckeditor/ckeditor5-html-support/src/utils
Filtering
Interfaces
-
GHSViewAttributes
module:html-support/utils~GHSViewAttributes
Functions
-
getHtmlAttributeName( viewElementName ) → string
module:html-support/utils~getHtmlAttributeName
Returns the attribute name of the model element that holds raw HTML attributes.
Parameters
viewElementName : string
Returns
string
-
mergeViewElementAttributes( target, source ) → GHSViewAttributes
module:html-support/utils~mergeViewElementAttributes
Merges view element attribute objects.
Parameters
target : GHSViewAttributes
source : GHSViewAttributes
Returns
-
modifyGhsAttribute( writer, item, ghsAttributeName, subject, callback ) → void
module:html-support/utils~modifyGhsAttribute
Updates a GHS attribute on a specified item.
Parameters
writer : Writer
item : DocumentSelection | Item
ghsAttributeName : string
subject : 'attributes'
callback : ModifyGhsAttributesCallback
That receives a map as an argument and should modify it (add or remove entries).
Returns
void
-
modifyGhsAttribute( writer, item, ghsAttributeName, subject, callback ) → void
module:html-support/utils~modifyGhsAttribute
Updates a GHS attribute on a specified item.
Parameters
writer : Writer
item : DocumentSelection | Item
ghsAttributeName : string
subject : 'styles'
callback : ModifyGhsStylesCallback
That receives a map as an argument and should modify it (add or remove entries).
Returns
void
-
modifyGhsAttribute( writer, item, ghsAttributeName, subject, callback ) → void
module:html-support/utils~modifyGhsAttribute
Updates a GHS attribute on a specified item.
Parameters
writer : Writer
item : DocumentSelection | Item
ghsAttributeName : string
subject : 'classes'
callback : ModifyGhsClassesCallback
That receives a set as an argument and should modify it (add or remove entries).
Returns
void
-
removeViewAttributes( writer, viewAttributes, viewElement ) → void
module:html-support/utils~removeViewAttributes
Helper function for the downcast converter. Removes attributes on the given view element.
Parameters
writer : DowncastWriter
The view writer.
viewAttributes : GHSViewAttributes
The GHS attribute value.
viewElement : Element
The view element to update.
Returns
void
-
setViewAttributes( writer, viewAttributes, viewElement ) → void
module:html-support/utils~setViewAttributes
Helper function for the downcast converter. Sets attributes on the given view element.
Parameters
writer : DowncastWriter
The view writer.
viewAttributes : GHSViewAttributes
The GHS attribute value.
viewElement : Element
The view element to update.
Returns
void
-
toPascalCase( data ) → string
module:html-support/utils~toPascalCase
Transforms passed string to PascalCase format. Examples:
div
=>Div
h1
=>H1
table
=>Table
Parameters
data : string
Returns
string
-
updateViewAttributes( writer, oldViewAttributes, newViewAttributes, viewElement ) → void
module:html-support/utils~updateViewAttributes
Helper function for the downcast converter. Updates attributes on the given view element.
Parameters
writer : DowncastWriter
The view writer.
oldViewAttributes : GHSViewAttributes
The previous GHS attribute value.
newViewAttributes : GHSViewAttributes
The current GHS attribute value.
viewElement : Element
The view element to update.
Returns
void
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.