|
|
@@ -710,8 +710,8 @@ export function clearAttributes() {
|
|
|
* The converter automatically consumes the corresponding value from the consumables list and stops the event (see
|
|
|
* {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).
|
|
|
*
|
|
|
- * modelDispatcher.on( 'attribute:bold', wrap( ( modelAttributeValue, viewWriter ) => {
|
|
|
- * return viewWriter.createAttributeElement( 'strong' );
|
|
|
+ * modelDispatcher.on( 'attribute:bold', wrap( ( modelAttributeValue, { writer } ) => {
|
|
|
+ * return writer.createAttributeElement( 'strong' );
|
|
|
* } );
|
|
|
*
|
|
|
* @protected
|
|
|
@@ -769,9 +769,9 @@ export function wrap( elementCreator ) {
|
|
|
*
|
|
|
* downcastDispatcher.on(
|
|
|
* 'insert:myElem',
|
|
|
- * insertElement( ( modelItem, viewWriter ) => {
|
|
|
- * const text = viewWriter.createText( 'myText' );
|
|
|
- * const myElem = viewWriter.createElement( 'myElem', { myAttr: 'my-' + modelItem.getAttribute( 'myAttr' ) }, text );
|
|
|
+ * insertElement( ( modelItem, { writer } ) => {
|
|
|
+ * const text = writer.createText( 'myText' );
|
|
|
+ * const myElem = writer.createElement( 'myElem', { myAttr: 'my-' + modelItem.getAttribute( 'myAttr' ) }, text );
|
|
|
*
|
|
|
* // Do something fancy with `myElem` using `modelItem` or other parameters.
|
|
|
*
|
|
|
@@ -1098,7 +1098,7 @@ function changeAttribute( attributeCreator ) {
|
|
|
* key: 'attribute-name',
|
|
|
* name: '$text'
|
|
|
* },
|
|
|
- * view: ( value, writer ) => {
|
|
|
+ * view: ( value, { writer } ) => {
|
|
|
* return writer.createAttributeElement( 'span', { 'attribute-name': value } );
|
|
|
* },
|
|
|
* converterPriority: 'high'
|