V11: Update the rich text editor TinyMCE to v6 (#13013)
* update 'tinymce' from v4 to v6 * add/remove plugin & file changes * remove unsupported plugins * update changes to tinymce api * bump tinymce to 6.2.0 * reinstate fastdev task * update rte prevalues * fix styling of tinymce inline mode * document new files * update builtin allowed elements, plugins and styles * update upload_image_handler to new format * set correct startup plugins and config * remove old config for "Paste from Word" which is no longer supported * update naming in default toolbar * replace fire() with dispatch() * support resizing of other elements besides objects, e.g. tables * replace fire() with dispatch() * change classes for fullscreen styling * handle special parsing of AngularJS json response * remove deprecated tinymce options * use EditorOptions API to get settings * send in correct toolbar config * update icons to use tinymce's new icon pack * remove unused functions * configure custom styles * update docs * add initial toolbars to grid rte * change htmlId selector to support html id's with numbers * remove pintoolbar as it is not compatible with tiny 6 * register custom option maxImageSize through the OptionsManager * remove custom option * Revert "register custom option maxImageSize through the OptionsManager" This reverts commit 342354d6cdacea67349d9d6d97b944999f8cd136. * register custom option maxImageSize and fetch through EditorOptions * add rounding to forced image size * remove fullscreen plugin as it is not available in prod build anyway and it does not work * update API for uploadImages() function * update string extensions IsFullPath to support more filepaths with new built-in Path.IsPathFullyQualified * resolve TODO to switch to Path.IsPathFullyQualified supported from .NET Standard 2.1 * ensure that files are copied from the TEMP folder in the web root * add dragstart event to drag-events series * optimise isMediaPickerEnabled function with newer array function 'includes' * add TEMP folder to gitignore (fx fileuploads) * update selector for "Insert Macro" button in rte test * remove old documentation * Use content root instead of web root for uploaded images * test IsFullPath without tricky UNC paths that are not useful Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -8,14 +8,13 @@ namespace Umbraco.Cms.Core.Configuration.Models;
|
||||
public class RichTextEditorSettings
|
||||
{
|
||||
internal const string StaticValidElements =
|
||||
"+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*],figure,figcaption";
|
||||
"+a[id|style|rel|data-id|data-udi|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],-strong/-b[class|style],-em/-i[class|style],-strike[class|style],-u[class|style],#p[id|style|dir|class|align],-ol[class|reversed|start|style|type],-ul[class|style],-li[class|style],br[class],img[id|dir|lang|longdesc|usemap|style|class|src|onmouseover|onmouseout|border|alt=|title|hspace|vspace|width|height|align|umbracoorgwidth|umbracoorgheight|onresize|onresizestart|onresizeend|rel|data-id],-sub[style|class],-sup[style|class],-blockquote[dir|style|class],-table[border=0|cellspacing|cellpadding|width|height|class|align|summary|style|dir|id|lang|bgcolor|background|bordercolor],-tr[id|lang|dir|class|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor],tbody[id|class],thead[id|class],tfoot[id|class],#td[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|bgcolor|background|bordercolor|scope],-th[id|lang|dir|class|colspan|rowspan|width|height|align|valign|style|scope],caption[id|lang|dir|class|style],-div[id|dir|class|align|style],-span[class|align|style],-pre[class|align|style],address[class|align|style],-h1[id|dir|class|align|style],-h2[id|dir|class|align|style],-h3[id|dir|class|align|style],-h4[id|dir|class|align|style],-h5[id|dir|class|align|style],-h6[id|style|dir|class|align|style],hr[class|style],small[class|style],dd[id|class|title|style|dir|lang],dl[id|class|title|style|dir|lang],dt[id|class|title|style|dir|lang],object[class|id|width|height|codebase|*],param[name|value|_value|class],embed[type|width|height|src|class|*],map[name|class],area[shape|coords|href|alt|target|class],bdo[class],button[class],iframe[*],figure,figcaption,video[*],audio[*],picture[*],source[*],canvas[*]";
|
||||
|
||||
internal const string StaticInvalidElements = "font";
|
||||
|
||||
private static readonly string[] Default_plugins =
|
||||
{
|
||||
"paste", "anchor", "charmap", "table", "lists", "advlist", "hr", "autolink", "directionality", "tabfocus",
|
||||
"searchreplace",
|
||||
"anchor", "charmap", "table", "lists", "advlist", "autolink", "directionality", "searchreplace",
|
||||
};
|
||||
|
||||
private static readonly RichTextEditorCommand[] Default_commands =
|
||||
@@ -35,7 +34,7 @@ public class RichTextEditorSettings
|
||||
new RichTextEditorCommand { Alias = "paste", Name = "Paste", Mode = RichTextEditorCommandMode.All },
|
||||
new RichTextEditorCommand
|
||||
{
|
||||
Alias = "styleselect", Name = "Style select", Mode = RichTextEditorCommandMode.All,
|
||||
Alias = "styles", Name = "Style select", Mode = RichTextEditorCommandMode.All,
|
||||
},
|
||||
new RichTextEditorCommand { Alias = "bold", Name = "Bold", Mode = RichTextEditorCommandMode.Selection },
|
||||
new RichTextEditorCommand { Alias = "italic", Name = "Italic", Mode = RichTextEditorCommandMode.Selection },
|
||||
|
||||
Reference in New Issue
Block a user