mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 04:51:31 +08:00 
			
		
		
		
	Merge pull request #2232 from TriliumNext/ckeditor5-alignment
feat(ckeditor): Add text alignment
This commit is contained in:
		
						commit
						db80ebe6dd
					
				| @ -97,6 +97,9 @@ export function buildConfig(): EditorConfig { | |||||||
|                 reversed: true |                 reversed: true | ||||||
|             } |             } | ||||||
|         }, |         }, | ||||||
|  |         alignment: { | ||||||
|  |             options: [ "left", "right", "center", "justify"] | ||||||
|  |         }, | ||||||
|         link: { |         link: { | ||||||
|             defaultProtocol: "https://", |             defaultProtocol: "https://", | ||||||
|             allowedProtocols: ALLOWED_PROTOCOLS |             allowedProtocols: ALLOWED_PROTOCOLS | ||||||
| @ -194,6 +197,7 @@ export function buildClassicToolbar(multilineToolbar: boolean) { | |||||||
|                     items: ["imageUpload", "|", "link", "bookmark", "internallink", "includeNote", "|", "specialCharacters", "emoji", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"] |                     items: ["imageUpload", "|", "link", "bookmark", "internallink", "includeNote", "|", "specialCharacters", "emoji", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"] | ||||||
|                 }, |                 }, | ||||||
|                 "|", |                 "|", | ||||||
|  |                 "alignment", | ||||||
|                 "outdent", |                 "outdent", | ||||||
|                 "indent", |                 "indent", | ||||||
|                 "|", |                 "|", | ||||||
| @ -249,6 +253,7 @@ export function buildFloatingToolbar() { | |||||||
|                 items: ["link", "bookmark", "internallink", "includeNote", "|", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"] |                 items: ["link", "bookmark", "internallink", "includeNote", "|", "math", "mermaid", "horizontalLine", "pageBreak", "dateTime"] | ||||||
|             }, |             }, | ||||||
|             "|", |             "|", | ||||||
|  |             "alignment", | ||||||
|             "outdent", |             "outdent", | ||||||
|             "indent", |             "indent", | ||||||
|             "|", |             "|", | ||||||
|  | |||||||
| @ -1,4 +1,4 @@ | |||||||
| import { Autoformat, AutoLink, BlockQuote, BlockToolbar, Bold, CKFinderUploadAdapter, Clipboard, Code, CodeBlock, Enter, FindAndReplace, Font, FontBackgroundColor, FontColor, GeneralHtmlSupport, Heading, HeadingButtonsUI, HorizontalLine, Image, ImageCaption, ImageInline, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, List, ListProperties, Mention, PageBreak, Paragraph, ParagraphButtonUI, PasteFromOffice, PictureEditing, RemoveFormat, SelectAll, ShiftEnter, SpecialCharacters, SpecialCharactersEssentials, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableSelection, TableToolbar, TextPartLanguage, TextTransformation, TodoList, Typing, Underline, Undo, Bookmark, Emoji } from "ckeditor5"; | import { Autoformat, AutoLink, BlockQuote, BlockToolbar, Bold, CKFinderUploadAdapter, Clipboard, Code, CodeBlock, Enter, FindAndReplace, Font, FontBackgroundColor, FontColor, GeneralHtmlSupport, Heading, HeadingButtonsUI, HorizontalLine, Image, ImageCaption, ImageInline, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Alignment, Indent, IndentBlock, Italic, Link, List, ListProperties, Mention, PageBreak, Paragraph, ParagraphButtonUI, PasteFromOffice, PictureEditing, RemoveFormat, SelectAll, ShiftEnter, SpecialCharacters, SpecialCharactersEssentials, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableSelection, TableToolbar, TextPartLanguage, TextTransformation, TodoList, Typing, Underline, Undo, Bookmark, Emoji } from "ckeditor5"; | ||||||
| import type { Plugin } from "ckeditor5"; | import type { Plugin } from "ckeditor5"; | ||||||
| import CutToNotePlugin from "./plugins/cuttonote.js"; | import CutToNotePlugin from "./plugins/cuttonote.js"; | ||||||
| import UploadimagePlugin from "./plugins/uploadimage.js"; | import UploadimagePlugin from "./plugins/uploadimage.js"; | ||||||
| @ -115,6 +115,7 @@ export const COMMON_PLUGINS: typeof Plugin[] = [ | |||||||
| 	TableSelection, | 	TableSelection, | ||||||
| 	TableCaption, | 	TableCaption, | ||||||
| 	TableColumnResize, | 	TableColumnResize, | ||||||
|  | 	Alignment, | ||||||
| 	Indent, | 	Indent, | ||||||
| 	IndentBlock, | 	IndentBlock, | ||||||
| 	ParagraphButtonUI, | 	ParagraphButtonUI, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran