Ajour.EditorLib 1.7.2

dotnet add package Ajour.EditorLib --version 1.7.2
                    
NuGet\Install-Package Ajour.EditorLib -Version 1.7.2
                    
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="Ajour.EditorLib" Version="1.7.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ajour.EditorLib" Version="1.7.2" />
                    
Directory.Packages.props
<PackageReference Include="Ajour.EditorLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ajour.EditorLib --version 1.7.2
                    
#r "nuget: Ajour.EditorLib, 1.7.2"
                    
#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.
#:package Ajour.EditorLib@1.7.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ajour.EditorLib&version=1.7.2
                    
Install as a Cake Addin
#tool nuget:?package=Ajour.EditorLib&version=1.7.2
                    
Install as a Cake Tool

Ajour Media Maui Cross platform Editor-library<br/>for HTML, XML and RTF.[^1]

Editorial tool to produce articles and reportage for use in newspapers, online newspapers, TV or radio.

Supported platforms: Windows, MacOS, iOS and Android. Default languages: Norwegian, English y Español.

Module 1: Write articles, using paragraph stylesheets and character styles. Save as rtf and html. Publish your stories via epost, your favorite social media platforms or create your own favorite smtp, ftp and https/rest destination channels.
Module 2: Texts, images and videos are linked to the article from here.
Module 3: Choosing the image section, correct resolution, light and contrast.
Module 4: Format/design and finalize the article with text and images to the desired layout for print, web and mobile. The finished product is saved as a pdf file. (The pdf module requires a separate license if the product is to be used commercially)

TODO:

v1.7.2, Apple issue (iOS): Select Parastyles and Textstyles from the popup window needs LongPress to select, 2-3 seconds. v1.7.0, implemented features (Windows, Mac, iOS, Android): New Document, Open Document, Save as Rtf, Change character styles Bold/Italic/Underline, Formatting document using paragraph stylesheets and textstyles.

Limitations: Can only change bold/italic/underline within the selected paragraph. Save as Html is not yet operational. Drag and drop is not implemented yet. Create header file to load your custom paragraph styles and text styles from your available storage. Create header file to load customer's custom paragraph styles and text styles from a rest server. In addition to your local email client, define your own email channels using SMTP. Print your documents to the installed printer.

Windows Desktop Android Mobile

MacOS Desktop iPhone Mobile

PROJECT: TESTE AJOUR EDITOR Library

  1. Create a new MAUI Application
  2. Add Nuget package Ajour.EditorLib.1.4.xx.nupkg<br/> 2a. copy to your offline packages folder, then add to your project.
  3. Open MauiProgram.cs<br/> 3a. Add using Ajour.EditorLib;<br/> 3b. Add builder.UseAjourEditor();
  4. Open MainPage.xaml<br/> 4a. Add xmlns:ajourlib="clr-namespace:Ajour.EditorLib;assembly=Ajour.EditorLib"<br/> 4b. Replace sample content with <ajourlib:AjourEditor />
  5. Open MainPage.xaml.cs<br/> 5.a remove sample source
  6. Build and run

Customize your own appearance:

<Color x:Key="editor_background">#C8C8C8</Color>
<Color x:Key="editor_background_dark">#ACACAC</Color>
<Color x:Key="editor_background_selected">#E1E1E1</Color>
<Color x:Key="editor_forground">#141414</Color>
<Color x:Key="Greenish">#339933</Color>

[^1]: Copyright © 1991 - 2025 Ajour Media AS.

using Microsoft.Extensions.Logging;
using CommunityToolkit.Maui;
using Ajour.EditorLib;
namespace TestAjourEditor
{
    public static class MauiProgram
    {
        public static MauiApp CreateMauiApp()
        {
            var builder = MauiApp.CreateBuilder();
            builder
                .UseMauiApp<App>()
                .UseMauiCommunityToolkit()
                .ConfigureFonts(fonts =>
                {
                    fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                    fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
                })
                .UseAjourEditor();

            #if DEBUG
            builder.Logging.AddDebug();
            #endif

            builder.Services.AddSingleton<DesktopWindow>();

            return builder.Build();
        }
    }
}
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage 
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="TestAjourEditor.MainPage"
    xmlns:ajourlib="clr-namespace:Ajour.EditorLib;assembly=Ajour.EditorLib"
    >
    
    <ajourlib:AjourEditor />
</ContentPage>

Android Required:

XML
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="34" />

<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />

<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />

iOS/Mac Catalyst Required:

Info.plist
<key>com.apple.security.assets.movies.read-only</key>
<true/>
<key>com.apple.security.assets.music.read-only</key>
<true/>
<key>com.apple.security.assets.pictures.read-only</key>
<true/>
<key>com.apple.security.files.downloads.read-only</key>
<true/>
<key>com.apple.security.personal-information.photos-library</key>
<true/>

Mac Catalyst Crashes at Apple:

<key>UIDeviceFamily</key>
<array>
<integer>6</integer>
</array>

Mac Catalyst Alternative:

<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
</array>

Mac Catalyst Required:

Entitlements.plist
<key>com.apple.security.files.user-selected.read-write</key>
<true/>

Windows Required:

SDK-version 10.0.22621.0
- No setup is required.

Optional: MacCatalyst and Windows

#if MACCATALYST
builder.Services.AddSingleton<AppTitleCatalyst>();
#endif
#if WINDOWS10_0_22621_0_OR_GREATER
builder.Services.AddSingleton<AppTitleWinUI>();
#endif
builder.Services.AddSingleton<ReporterPage, ReporterViewModel>();

private readonly IServiceProvider? services;
public App(IServiceProvider services)
{
    InitializeComponent();
	this.services = services.GetService<IServiceProvider>();
}

protected override Window CreateWindow(IActivationState? activationState)
{
	if (DeviceInfo.Current.Platform == DevicePlatform.WinUI ||
		DeviceInfo.Current.Platform == DevicePlatform.MacCatalyst)
	{
		Window? window = null;
		if (DeviceInfo.Current.Platform == DevicePlatform.WinUI)
		{
			window = services?.GetService<AppTitleWinUI>()!;
			window.Page = new StartupWinUI();
		}
		else
		{
			window = services?.GetService<AppTitleCatalyst>()!;
			window.Page = new StartupCatalyst();
		}
		window.Created += (sender, args) =>
		{
			Window? window = sender as Window;
			if (window != null)
			{
				string? position = Microsoft.Maui.Storage.Preferences.Get("Position", null);
				if (position != null)
				{
					string[] array = position.Split(";".ToCharArray());
					var bounds = new Rect(
						new Point(Convert.ToDouble(array[0]), Convert.ToDouble(array[1])),
						new Size(Convert.ToDouble(array[2]), Convert.ToDouble(array[3])));
					if (bounds.Width > 0 && bounds.Height > 0)
					{
						window.X = bounds.Left;
						window.Y = bounds.Top;
						window.Width = bounds.Width;
						window.Height = bounds.Height;
					}
				}
			}
		};
		window.Destroying += (sender, args) =>
		{
			Window? window = sender as Window;
			if (window != null)
			{
				string position = String.Format("{0};{1};{2};{3}",
					Convert.ToInt32(window.X),
					Convert.ToInt32(window.Y),
					Convert.ToInt32(window.Width),
					Convert.ToInt32(window.Height));
				Microsoft.Maui.Storage.Preferences.Set("Position", position);
			}
		};
		return window;
	}
	else
	{
		return new Window(new StartupMobile());
	}
}
Product Compatible and additional computed target framework versions.
.NET net9.0-android35.0 is compatible.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst18.0 is compatible.  net9.0-windows10.0.22621 is compatible.  net10.0-android was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.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
1.7.2 72 7/4/2025

New Document, Open Document, Save as Rtf, Change character styles Bold/Italic/Underline, Formatting document using paragraph stylesheets and textstyles.
Apple issue (iOS): Select Parastyles and Textstyles from the popup window needs LongPress to select, 2-3 seconds.