Skip to content

Commit afbb4a2

Browse files
committed
Remove some remaining We's
1 parent 3a3b2a2 commit afbb4a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

15/umbraco-cms/tutorials/migrating-macros.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The value holds JSON with:
155155
- An alias to find the correct render/update logic.
156156
- Two parameters with values entered by the user.
157157

158-
The first step in transforming the data is taking the JSON value and deserializing it into a `RichTextEditorValue`. This way we have a class to work with to store the updated data in.
158+
The first step in transforming the data is taking the JSON value and deserializing it into a `RichTextEditorValue`. This way you have a class to work with to store the updated data in.
159159

160160
You can deserialize it yourself, or you can use the `RichTextPropertyEditorHelper` to do the job for you. It will also try to catch non-JSON values that have not been migrated to the new format.
161161

@@ -225,9 +225,9 @@ Now that the relevant information has been extracted, it's time to decide what t
225225
Note that:
226226

227227
- The markup still contains a tag placeholder but this time with only the `data-content-key`.
228-
- That key references an item inside the blocks `contentData` that holds the values of the properties and a reference to the Element Type we setup earlier.
228+
- That key references an item inside the blocks `contentData` that holds the values of the properties and a reference to the Element Type set up earlier.
229229
- The same key is added to the `expose` collection and the Rich text `layout` collection.
230-
- This means that if we have multiple blocks in the same value, more `contentData` items will be added in the blocks collection. They will be referenced in the `expose and `Layout accordingly.
230+
- This means that if you have multiple blocks in the same value, more `contentData` items will be added in the blocks collection. They will be referenced in the `expose and `Layout accordingly.
231231

232232
The example below shows the full handling of an invariant macro to an invariant block.
233233

@@ -342,7 +342,7 @@ public class CtaButtonMacroMigrator : IMacroMigrator
342342
layoutList.Add(layoutItem);
343343
richTextEditorValue.Blocks.Layout[Constants.PropertyEditors.Aliases.RichText] = layoutList;
344344

345-
// now that we have converted the data into a block, replace the macro tag by a block tag
345+
// now that the data is converted into a block, replace the macro tag by a block tag
346346
richTextEditorValue.Markup = richTextEditorValue.Markup.ReplaceFirst(macroMatch.Value, $"<umb-rte-block-inline data-content-key=\"{blockKey}\"></umb-rte-block-inline>");
347347
}
348348

@@ -373,7 +373,7 @@ This example also only fetches the active (draft/current) version of the affecte
373373

374374
Once the data is transformed it needs to be stored. Custom SQL is used to perform this.
375375

376-
If you need to perform validation on the updated value, you either have to use a higher level services (`IContentValidationService`/`IContentEditingService`) or use the `RichTextPropertyValueEditor.Validate()` method. Because this example fetches the current data and overwrites it, the old value will not show up in the version history of the affected node. If you do need this to happen then we advise you to use the `IContentValidationService` or `IContentService` instead.
376+
If you need to perform validation on the updated value, you either have to use a higher level services (`IContentValidationService`/`IContentEditingService`) or use the `RichTextPropertyValueEditor.Validate()` method. Because this example fetches the current data and overwrites it, the old value will not show up in the version history of the affected node. If you do need this to happen then it is advised to use the `IContentValidationService` or `IContentService` instead.
377377

378378
Now that you have a converter you need a way to call the correct one depending on the macros found in an RTE value. For this, create a `MacroMigrationService` that holds the following method:
379379

@@ -598,7 +598,7 @@ public class CtaButtonMacroMigrator : IMacroMigrator
598598
layoutList.Add(layoutItem);
599599
richTextEditorValue.Blocks.Layout[Constants.PropertyEditors.Aliases.RichText] = layoutList;
600600

601-
// now that we have converted the data into a block, replace the macro tag by a block tag
601+
// now that the data is converted into a block, replace the macro tag by a block tag
602602
richTextEditorValue.Markup = richTextEditorValue.Markup.ReplaceFirst(macroMatch.Value, $"<umb-rte-block-inline data-content-key=\"{blockKey}\"></umb-rte-block-inline>");
603603
}
604604

0 commit comments

Comments
 (0)