ourHtagEditor 2.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ourHtagEditor --version 2.0.1
NuGet\Install-Package ourHtagEditor -Version 2.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ourHtagEditor" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ourHtagEditor --version 2.0.1
#r "nuget: ourHtagEditor, 2.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ourHtagEditor as a Cake Addin
#addin nuget:?package=ourHtagEditor&version=2.0.1

// Install ourHtagEditor as a Cake Tool
#tool nuget:?package=ourHtagEditor&version=2.0.1

ourHtagEditor

Nuget

H-tag editor is a simple property editor that lets the editor pick a desired heading size (H1 down to H6) and the text-alignment (left, center or right).

Prerequisites

Requires at least Umbraco 10.0.0.

How to use

Installation

Install ourHtagEditor via NuGet: Install-Package ourHtagEditor.

After restarting your site, you'll be able to create a new data type that uses the Headline property editor.

H-tag editor in action

Using the Tag Helper

Browse to /Views/_ViewImports.cshtml in your Umbraco project and add the following line at the bottom

@addTagHelper *, OurHtagEditor

This will make it possible to use the following in your views:

<headline htag="@Model.Headline" />

Depending on your chosen settings on the property editor, it could render:

<h2 style="text-align: left;">This is my nice headline</h2>

The tag helper accepts the attributes class and link. The link attribute accepts the model Link, coming from the Multi URL Picker.

Using both attributes could look like this:

<headline htag="@Model.Headline" class="css-class" link="@Model.Link" />

Which will render:

<a href="https://umbraco.com/" title="Visit Umbraco.com" target="_blank" rel="noopener">
    <h2 style="text-align: left;" class="css-class">This is my nice headline</h2>
</a>

Changelog

Latest changes

v2.0.1

  • Hiding the alignment selection on the property editor if only one option is allowed on the data type.

v2.0.0

  • Minimum required Umbraco version is 10.0.1.
  • Added Tag Helper that can be used to generate the H-tag in views.
    • The old extension methods has been removed in favor of the new Tag Helper.
  • Removed the grid functionality since it will be removed in Umbraco 13
  • Accessibility enhancements of buttons and icons
  • Renamed package from Our.Umbraco.HtagEditor to ourHtagEditor.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.1.0 416 8/8/2023
3.0.0 473 12/19/2022
2.0.1 2,798 11/11/2022
2.0.0 800 8/11/2022

Hiding the alignment selection on the property editor if only one option is allowed on the data type.