Improved Markdown Editor

This commit is contained in:
Mia Rose Winter 2024-03-26 13:43:06 +01:00
parent b4dc825961
commit 85464def08
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E
11 changed files with 553 additions and 241 deletions

View file

@ -2,10 +2,91 @@
@rendermode InteractiveServer @rendermode InteractiveServer
@using Wave.Utilities @using Wave.Utilities
@inject IStringLocalizer<AdvancedMarkdownEditor> Localizer
<section class="grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4"> <section class="grid grid-cols-1 lg:grid-cols-2 gap-x-8 gap-y-4">
<div class="flex"> <div class="flex">
@ChildContent <div class="join join-vertical min-h-96 h-full w-full">
</div> <Toolbar>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeSelection('# ', true);"
title="@Localizer["Tools_H1_Tooltip"]">
<strong>@Localizer["Tools_H1_Label"]</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('## ', true);"
title="@Localizer["Tools_H2_Tooltip"]">
<strong>@Localizer["Tools_H2_Label"]</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('### ', true);"
title="@Localizer["Tools_H3_Tooltip"]">
<strong>@Localizer["Tools_H3_Label"]</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('#### ', true);"
title="@Localizer["Tools_H4_Tooltip"]">
@Localizer["Tools_H4_Label"]
</ToolbarButton>
</ToolbarSection>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('**');"
title="@Localizer["Tools_Bold_Tooltip"]">
<strong>B</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('*')"
title="@Localizer["Tools_Italic_Tooltip"]">
<em>I</em>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('++')"
title="@Localizer["Tools_Underline_Tooltip"]">
<u>U</u>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('~~')"
title="@Localizer["Tools_StrikeThrough_Tooltip"]">
<del>@Localizer["Tools_StrikeThrough_Label"]</del>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('==')"
title="@Localizer["Tools_Mark_Tooltip"]">
<mark>@Localizer["Tools_Mark_Label"]</mark>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('> ', true)"
title="@Localizer["Tools_Cite_Tooltip"]">
| <em>@Localizer["Tools_Cite_Label"]</em>
</ToolbarButton>
</ToolbarSection>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeSelection('1. ', true)">
1.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('a. ', true)">
a.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('A. ', true)">
A.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('i. ', true)">
i.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('I. ', true)">
I.
</ToolbarButton>
</ToolbarSection>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('`')"
title="@Localizer["Tools_CodeLine_Tooltip"]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M14.447 3.026a.75.75 0 0 1 .527.921l-4.5 16.5a.75.75 0 0 1-1.448-.394l4.5-16.5a.75.75 0 0 1 .921-.527ZM16.72 6.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L21.44 12l-4.72-4.72a.75.75 0 0 1 0-1.06Zm-9.44 0a.75.75 0 0 1 0 1.06L2.56 12l4.72 4.72a.75.75 0 0 1-1.06 1.06L.97 12.53a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z" clip-rule="evenodd" />
</svg>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('\n```\n')"
title="@Localizer["Tools_CodeBlock_Tooltip"]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm14.25 6a.75.75 0 0 1-.22.53l-2.25 2.25a.75.75 0 1 1-1.06-1.06L15.44 12l-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.25 2.25c.141.14.22.331.22.53Zm-10.28-.53a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06L8.56 12l1.72-1.72a.75.75 0 1 0-1.06-1.06l-2.25 2.25Z" clip-rule="evenodd" />
</svg>
</ToolbarButton>
</ToolbarSection>
</Toolbar>
@ChildContent
</div>
</div>
<div class="bg-base-200 p-2"> <div class="bg-base-200 p-2">
@if (!string.IsNullOrWhiteSpace(Title)) { @if (!string.IsNullOrWhiteSpace(Title)) {
<h2 class="text-2xl lg:text-4xl font-bold mb-6 hyphens-auto">@Title</h2> <h2 class="text-2xl lg:text-4xl font-bold mb-6 hyphens-auto">@Title</h2>
@ -27,6 +108,55 @@
</div> </div>
</section> </section>
<SectionContent SectionName="scripts">
<script>
window.insertBeforeSelection = function(markdown, startOfLine = false) {
const target = document.getElementById("tool-target");
const start = target.selectionStart;
const end = target.selectionEnd;
const value = target.value;
let doStart = start;
if (startOfLine) {
doStart = value.lastIndexOf("\n", start) +1;
}
target.focus();
target.value = value.substring(0, doStart) + markdown + value.substring(doStart);
target.selectionStart = start + markdown.length;
target.selectionEnd = end + markdown.length;
target.focus();
target.dispatchEvent(new Event("input", { bubbles: true }));
}
window.insertBeforeAndAfterSelection = function (markdown) {
const target = document.getElementById("tool-target");
while (/\s/.test(target.value[target.selectionStart]) && target.selectionStart < target.value.length) {
target.selectionStart++;
}
while (/\s/.test(target.value[target.selectionEnd-1]) && target.selectionEnd > 0) {
target.selectionEnd--;
}
const start = target.selectionStart;
const end = target.selectionEnd;
const value = target.value;
target.focus();
target.value = value.substring(0, start) +
markdown + value.substring(start, end) + markdown +
value.substring(end);
target.selectionStart = start + markdown.length;
target.selectionEnd = end + markdown.length;
target.focus();
target.dispatchEvent(new Event("input", { bubbles: true }));
}
</script>
</SectionContent>
@code { @code {
[Parameter] [Parameter]
public required Func<string?> MarkdownCallback { get; set; } public required Func<string?> MarkdownCallback { get; set; }
@ -44,7 +174,7 @@
protected override void OnInitialized() { protected override void OnInitialized() {
Timer = new Timer(_ => { Timer = new Timer(_ => {
UpdateHtml(); UpdateHtml();
}, null, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(3)); }, null, TimeSpan.FromMilliseconds(250), TimeSpan.FromSeconds(1));
} }
private void UpdateHtml() { private void UpdateHtml() {

View file

@ -39,10 +39,10 @@
<body> <body>
<CascadingValue Value="UserTheme" Name="UserTheme"> <CascadingValue Value="UserTheme" Name="UserTheme">
<Routes /> <Routes />
</CascadingValue> </CascadingValue>
<script src="_framework/blazor.web.js" defer></script>
<SectionOutlet SectionName="scripts" /> <SectionOutlet SectionName="scripts" />
<script src="_framework/blazor.web.js" defer></script>
</body> </body>
</html> </html>

View file

@ -5,7 +5,7 @@
@using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.Identity
@using System.Security.Claims @using System.Security.Claims
@rendermode @(new InteractiveServerRenderMode(false)) @rendermode @(new InteractiveServerRenderMode(true))
@inject UserManager<ApplicationUser> UserManager @inject UserManager<ApplicationUser> UserManager
@inject IStringLocalizer<ArticleEditor> Localizer @inject IStringLocalizer<ArticleEditor> Localizer

View file

@ -63,88 +63,9 @@
</div> </div>
<AdvancedMarkdownEditor Title="@Model.Title" MarkdownCallback="() => Model.Body"> <AdvancedMarkdownEditor Title="@Model.Title" MarkdownCallback="() => Model.Body">
<div class="join join-vertical min-h-96 h-full w-full" aria-role="toolbar"> <textarea id="tool-target" class="textarea textarea-bordered outline-none w-full flex-1 join-item"
<Toolbar> required aria-required placeholder="@Localizer["Body_Placeholder"]"
<ToolbarSection> @bind="@Model.Body" @bind:event="oninput" autocomplete="off"></textarea>
<ToolbarButton onclick="window.insertBeforeSelection('# ', true);"
title="@Localizer["Tools_H1_Tooltip"]">
<strong>@Localizer["Tools_H1_Label"]</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('## ', true);"
title="@Localizer["Tools_H2_Tooltip"]">
<strong>@Localizer["Tools_H2_Label"]</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('### ', true);"
title="@Localizer["Tools_H3_Tooltip"]">
<strong>@Localizer["Tools_H3_Label"]</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('#### ', true);"
title="@Localizer["Tools_H4_Tooltip"]">
@Localizer["Tools_H4_Label"]
</ToolbarButton>
</ToolbarSection>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('**');"
title="@Localizer["Tools_Bold_Tooltip"]">
<strong>B</strong>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('*')"
title="@Localizer["Tools_Italic_Tooltip"]">
<em>I</em>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('++')"
title="@Localizer["Tools_Underline_Tooltip"]">
<u>U</u>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('~~')"
title="@Localizer["Tools_StrikeThrough_Tooltip"]">
<del>@Localizer["Tools_StrikeThrough_Label"]</del>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('==')"
title="@Localizer["Tools_Mark_Tooltip"]">
<mark>@Localizer["Tools_Mark_Label"]</mark>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('> ', true)"
title="@Localizer["Tools_Cite_Tooltip"]">
| <em>@Localizer["Tools_Cite_Label"]</em>
</ToolbarButton>
</ToolbarSection>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeSelection('1. ', true)">
1.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('a. ', true)">
a.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('A. ', true)">
A.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('i. ', true)">
i.
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeSelection('I. ', true)">
I.
</ToolbarButton>
</ToolbarSection>
<ToolbarSection>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('`')"
title="@Localizer["Tools_CodeLine_Tooltip"]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M14.447 3.026a.75.75 0 0 1 .527.921l-4.5 16.5a.75.75 0 0 1-1.448-.394l4.5-16.5a.75.75 0 0 1 .921-.527ZM16.72 6.22a.75.75 0 0 1 1.06 0l5.25 5.25a.75.75 0 0 1 0 1.06l-5.25 5.25a.75.75 0 1 1-1.06-1.06L21.44 12l-4.72-4.72a.75.75 0 0 1 0-1.06Zm-9.44 0a.75.75 0 0 1 0 1.06L2.56 12l4.72 4.72a.75.75 0 0 1-1.06 1.06L.97 12.53a.75.75 0 0 1 0-1.06l5.25-5.25a.75.75 0 0 1 1.06 0Z" clip-rule="evenodd"/>
</svg>
</ToolbarButton>
<ToolbarButton onclick="window.insertBeforeAndAfterSelection('\n```\n')"
title="@Localizer["Tools_CodeBlock_Tooltip"]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-4 h-4">
<path fill-rule="evenodd" d="M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm14.25 6a.75.75 0 0 1-.22.53l-2.25 2.25a.75.75 0 1 1-1.06-1.06L15.44 12l-1.72-1.72a.75.75 0 1 1 1.06-1.06l2.25 2.25c.141.14.22.331.22.53Zm-10.28-.53a.75.75 0 0 0 0 1.06l2.25 2.25a.75.75 0 1 0 1.06-1.06L8.56 12l1.72-1.72a.75.75 0 1 0-1.06-1.06l-2.25 2.25Z" clip-rule="evenodd"/>
</svg>
</ToolbarButton>
</ToolbarSection>
</Toolbar>
<textarea id="tool-target" class="textarea textarea-bordered outline-none w-full flex-1 join-item"
required aria-required placeholder="@Localizer["Body_Placeholder"]"
@bind="@Model.Body" @bind:event="oninput" autocomplete="off"></textarea>
</div>
</AdvancedMarkdownEditor> </AdvancedMarkdownEditor>
<div class="flex gap-2 flex-wrap mt-3"> <div class="flex gap-2 flex-wrap mt-3">
@ -183,48 +104,6 @@
<button type="button" class="btn" onclick="@(ImageModal).showModal()">@Localizer["Image_Add_Label"]</button> <button type="button" class="btn" onclick="@(ImageModal).showModal()">@Localizer["Image_Add_Label"]</button>
</div> </div>
<SectionContent SectionName="scripts">
<script>
window.insertBeforeSelection = function(markdown, startOfLine = false) {
const target = document.getElementById("tool-target");
const start = target.selectionStart;
const end = target.selectionEnd;
const value = target.value;
let doStart = start;
if (startOfLine) {
doStart = value.lastIndexOf("\n", start) +1;
}
target.focus();
target.value = value.substring(0, doStart) + markdown + value.substring(doStart);
target.selectionStart = start + markdown.length;
target.selectionEnd = end + markdown.length;
target.focus();
target.dispatchEvent(new Event("input", { bubbles: true }));
}
window.insertBeforeAndAfterSelection = function (markdown) {
const target = document.getElementById("tool-target");
const start = target.selectionStart;
const end = target.selectionEnd;
const value = target.value;
target.focus();
target.value = value.substring(0, start) +
markdown + value.substring(start, end) + markdown +
value.substring(end);
target.selectionStart = start + markdown.length;
target.selectionEnd = end + markdown.length;
target.focus();
target.dispatchEvent(new Event("input", { bubbles: true }));
}
</script>
</SectionContent>
@code { @code {
private const string ImageModal = "AddImage"; private const string ImageModal = "AddImage";

View file

@ -1,4 +1,4 @@
<div class="flex flex-wrap gap-1 p-2 bg-base-200 @(!Sticky ? string.Empty : "sticky top-0")" @attributes="AdditionalAttributes"> <div class="flex flex-wrap gap-1 p-2 z-50 bg-base-200 @(!Sticky ? string.Empty : "sticky top-0")" aria-role="toolbar" @attributes="AdditionalAttributes">
@ChildContent @ChildContent
</div> </div>

View file

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Tools_Bold_Tooltip" xml:space="preserve">
<value>Text hervorheben</value>
</data>
<data name="Tools_Cite_Label" xml:space="preserve">
<value>Zitat</value>
</data>
<data name="Tools_Cite_Tooltip" xml:space="preserve">
<value>Text als Zitat formattieren</value>
</data>
<data name="Tools_CodeBlock_Tooltip" xml:space="preserve">
<value>Programmierblock einfügen</value>
</data>
<data name="Tools_CodeLine_Tooltip" xml:space="preserve">
<value>Selektierten text als programmcode markieren</value>
</data>
<data name="Tools_H1_Label" xml:space="preserve">
<value>Ü1</value>
</data>
<data name="Tools_H1_Tooltip" xml:space="preserve">
<value>Primärüberschrift</value>
</data>
<data name="Tools_H2_Label" xml:space="preserve">
<value>Ü2</value>
</data>
<data name="Tools_H2_Tooltip" xml:space="preserve">
<value>Sekundärüberschrift</value>
</data>
<data name="Tools_H3_Label" xml:space="preserve">
<value>Ü3</value>
</data>
<data name="Tools_H3_Tooltip" xml:space="preserve">
<value>Level 3 Überschrift</value>
</data>
<data name="Tools_H4_Label" xml:space="preserve">
<value>Ü4</value>
</data>
<data name="Tools_H4_Tooltip" xml:space="preserve">
<value>Level 4 Überschrift</value>
</data>
<data name="Tools_Italic_Tooltip" xml:space="preserve">
<value>Text kursiv stellen</value>
</data>
<data name="Tools_Mark_Tooltip" xml:space="preserve">
<value>Den selektierten Text markieren</value>
</data>
<data name="Tools_StrikeThrough_Tooltip" xml:space="preserve">
<value>Text durchstreichen</value>
</data>
<data name="Tools_Underline_Tooltip" xml:space="preserve">
<value>Text unterstreichen</value>
</data>
</root>

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Tools_Bold_Tooltip" xml:space="preserve">
<value>Make text bold</value>
</data>
<data name="Tools_Cite_Label" xml:space="preserve">
<value>Cite</value>
</data>
<data name="Tools_Cite_Tooltip" xml:space="preserve">
<value>Make text a citation</value>
</data>
<data name="Tools_CodeBlock_Tooltip" xml:space="preserve">
<value>Insert program code block</value>
</data>
<data name="Tools_CodeLine_Tooltip" xml:space="preserve">
<value>Mark selected text as programming code</value>
</data>
<data name="Tools_H1_Label" xml:space="preserve">
<value>H1</value>
</data>
<data name="Tools_H1_Tooltip" xml:space="preserve">
<value>First level heading</value>
</data>
<data name="Tools_H2_Label" xml:space="preserve">
<value>H2</value>
</data>
<data name="Tools_H2_Tooltip" xml:space="preserve">
<value>Second level heading</value>
</data>
<data name="Tools_H3_Label" xml:space="preserve">
<value>H3</value>
</data>
<data name="Tools_H3_Tooltip" xml:space="preserve">
<value>Third level heading</value>
</data>
<data name="Tools_H4_Label" xml:space="preserve">
<value>H4</value>
</data>
<data name="Tools_H4_Tooltip" xml:space="preserve">
<value>Fourth level heading</value>
</data>
<data name="Tools_Italic_Tooltip" xml:space="preserve">
<value>Make text italic</value>
</data>
<data name="Tools_Mark_Label" xml:space="preserve">
<value>txt</value>
</data>
<data name="Tools_Mark_Tooltip" xml:space="preserve">
<value>Mark the selected text</value>
</data>
<data name="Tools_StrikeThrough_Label" xml:space="preserve">
<value>del</value>
</data>
<data name="Tools_StrikeThrough_Tooltip" xml:space="preserve">
<value>Strike through text</value>
</data>
<data name="Tools_Underline_Tooltip" xml:space="preserve">
<value>Underline text</value>
</data>
</root>

View file

@ -139,57 +139,6 @@
</data> </data>
<data name="ViewArticle_Label" xml:space="preserve"> <data name="ViewArticle_Label" xml:space="preserve">
<value>Öffnen</value> <value>Öffnen</value>
</data>
<data name="Tools_H1_Label" xml:space="preserve">
<value>Ü1</value>
</data>
<data name="Tools_H1_Tooltip" xml:space="preserve">
<value>Primärüberschrift</value>
</data>
<data name="Tools_H2_Label" xml:space="preserve">
<value>Ü2</value>
</data>
<data name="Tools_H2_Tooltip" xml:space="preserve">
<value>Sekundärüberschrift</value>
</data>
<data name="Tools_H3_Label" xml:space="preserve">
<value>Ü3</value>
</data>
<data name="Tools_H3_Tooltip" xml:space="preserve">
<value>Level 3 Überschrift</value>
</data>
<data name="Tools_H4_Label" xml:space="preserve">
<value>Ü4</value>
</data>
<data name="Tools_H4_Tooltip" xml:space="preserve">
<value>Level 4 Überschrift</value>
</data>
<data name="Tools_StrikeThrough_Tooltip" xml:space="preserve">
<value>Text durchstreichen</value>
</data>
<data name="Tools_Cite_Label" xml:space="preserve">
<value>Zitat</value>
</data>
<data name="Tools_Italic_Tooltip" xml:space="preserve">
<value>Text kursiv stellen</value>
</data>
<data name="Tools_Cite_Tooltip" xml:space="preserve">
<value>Text als Zitat formattieren</value>
</data>
<data name="Tools_Bold_Tooltip" xml:space="preserve">
<value>Text hervorheben</value>
</data>
<data name="Tools_CodeLine_Tooltip" xml:space="preserve">
<value>Selektierten text als programmcode markieren</value>
</data>
<data name="Tools_CodeBlock_Tooltip" xml:space="preserve">
<value>Programmierblock einfügen</value>
</data>
<data name="Tools_Underline_Tooltip" xml:space="preserve">
<value>Text unterstreichen</value>
</data>
<data name="Tools_Mark_Tooltip" xml:space="preserve">
<value>Den selektierten Text markieren</value>
</data> </data>
<data name="Categories_Label" xml:space="preserve"> <data name="Categories_Label" xml:space="preserve">
<value>Kategorie</value> <value>Kategorie</value>

View file

@ -139,63 +139,6 @@
</data> </data>
<data name="ViewArticle_Label" xml:space="preserve"> <data name="ViewArticle_Label" xml:space="preserve">
<value>Open</value> <value>Open</value>
</data>
<data name="Tools_H1_Tooltip" xml:space="preserve">
<value>First level heading</value>
</data>
<data name="Tools_H2_Tooltip" xml:space="preserve">
<value>Second level heading</value>
</data>
<data name="Tools_H3_Tooltip" xml:space="preserve">
<value>Third level heading</value>
</data>
<data name="Tools_H4_Tooltip" xml:space="preserve">
<value>Fourth level heading</value>
</data>
<data name="Tools_H1_Label" xml:space="preserve">
<value>H1</value>
</data>
<data name="Tools_H2_Label" xml:space="preserve">
<value>H2</value>
</data>
<data name="Tools_H3_Label" xml:space="preserve">
<value>H3</value>
</data>
<data name="Tools_H4_Label" xml:space="preserve">
<value>H4</value>
</data>
<data name="Tools_Bold_Tooltip" xml:space="preserve">
<value>Make text bold</value>
</data>
<data name="Tools_Italic_Tooltip" xml:space="preserve">
<value>Make text italic</value>
</data>
<data name="Tools_StrikeThrough_Tooltip" xml:space="preserve">
<value>Strike through text</value>
</data>
<data name="Tools_Cite_Tooltip" xml:space="preserve">
<value>Make text a citation</value>
</data>
<data name="Tools_StrikeThrough_Label" xml:space="preserve">
<value>del</value>
</data>
<data name="Tools_Cite_Label" xml:space="preserve">
<value>Cite</value>
</data>
<data name="Tools_CodeLine_Tooltip" xml:space="preserve">
<value>Mark selected text as programming code</value>
</data>
<data name="Tools_CodeBlock_Tooltip" xml:space="preserve">
<value>Insert program code block</value>
</data>
<data name="Tools_Underline_Tooltip" xml:space="preserve">
<value>Underline text</value>
</data>
<data name="Tools_Mark_Label" xml:space="preserve">
<value>txt</value>
</data>
<data name="Tools_Mark_Tooltip" xml:space="preserve">
<value>Mark the selected text</value>
</data> </data>
<data name="Categories_Label" xml:space="preserve"> <data name="Categories_Label" xml:space="preserve">
<value>Category</value> <value>Category</value>

File diff suppressed because one or more lines are too long