Merge branch 'master' into unit-tests
@ -4,9 +4,9 @@
|
||||
|
||||
import infoIcon from './../theme/icons/info.svg';
|
||||
import insertMermaidIcon from './../theme/icons/insert.svg';
|
||||
import previewModeIcon from './../theme/icons/previewMode.svg';
|
||||
import splitModeIcon from './../theme/icons/splitMode.svg';
|
||||
import sourceModeIcon from './../theme/icons/sourceMode.svg';
|
||||
import previewModeIcon from './../theme/icons/preview-mode.svg';
|
||||
import splitModeIcon from './../theme/icons/split-mode.svg';
|
||||
import sourceModeIcon from './../theme/icons/source-mode.svg';
|
||||
|
||||
export { default as Mermaid } from './mermaid';
|
||||
|
||||
|
@ -6,9 +6,9 @@ import { Plugin } from 'ckeditor5/src/core';
|
||||
import { ButtonView } from 'ckeditor5/src/ui';
|
||||
|
||||
import insertMermaidIcon from '../theme/icons/insert.svg';
|
||||
import previewModeIcon from '../theme/icons/previewMode.svg';
|
||||
import splitModeIcon from '../theme/icons/splitMode.svg';
|
||||
import sourceModeIcon from '../theme/icons/sourceMode.svg';
|
||||
import previewModeIcon from '../theme/icons/preview-mode.svg';
|
||||
import splitModeIcon from '../theme/icons/split-mode.svg';
|
||||
import sourceModeIcon from '../theme/icons/source-mode.svg';
|
||||
import infoIcon from '../theme/icons/info.svg';
|
||||
|
||||
/* global window */
|
||||
@ -52,12 +52,12 @@ export default class MermaidUI extends Plugin {
|
||||
const editor = this.editor;
|
||||
const t = editor.t;
|
||||
|
||||
editor.ui.componentFactory.add( 'Mermaid', locale => {
|
||||
editor.ui.componentFactory.add( 'mermaid', locale => {
|
||||
const buttonView = new ButtonView( locale );
|
||||
const command = editor.commands.get( 'insertMermaidCommand' );
|
||||
|
||||
buttonView.set( {
|
||||
label: t( 'Insert Mermaid' ),
|
||||
label: t( 'Insert Mermaid diagram' ),
|
||||
icon: insertMermaidIcon,
|
||||
tooltip: true
|
||||
} );
|
||||
@ -89,7 +89,7 @@ export default class MermaidUI extends Plugin {
|
||||
const link = 'https://mermaid-js.github.io/mermaid/#/flowchart';
|
||||
|
||||
buttonView.set( {
|
||||
label: t( 'Mermaid info' ),
|
||||
label: t( 'Read more about Mermaid diagram syntax' ),
|
||||
icon: infoIcon,
|
||||
tooltip: true
|
||||
} );
|
||||
|
@ -3,9 +3,9 @@ import Mermaid from '../src/mermaid';
|
||||
|
||||
import infoIcon from './../theme/icons/info.svg';
|
||||
import insertMermaidIcon from './../theme/icons/insert.svg';
|
||||
import previewModeIcon from './../theme/icons/previewMode.svg';
|
||||
import splitModeIcon from './../theme/icons/splitMode.svg';
|
||||
import sourceModeIcon from './../theme/icons/sourceMode.svg';
|
||||
import previewModeIcon from './../theme/icons/preview-mode.svg';
|
||||
import splitModeIcon from './../theme/icons/split-mode.svg';
|
||||
import sourceModeIcon from './../theme/icons/source-mode.svg';
|
||||
|
||||
describe( 'CKEditor5 Mermaid DLL', () => {
|
||||
it( 'exports MermaidWidget', () => {
|
||||
|
@ -1 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.156 11.51a.549.549 0 0 1-.013.232c-.006.332.002.6.009.828l.005.186c.176-.06.36-.093.553-.093.635 0 1.179.354 1.635.86.364.406.64.508.827.508.186 0 .462-.102.827-.507.456-.507 1-.86 1.634-.86.635 0 1.179.353 1.635.86.19.21.162.526-.061.705a.552.552 0 0 1-.747-.058c-.364-.405-.64-.508-.827-.508-.186 0-.462.103-.827.508-.455.507-1 .86-1.634.86-.635 0-1.179-.353-1.635-.86-.364-.405-.64-.508-.827-.508-.186 0-.462.103-.827.508-.456.507-1 .86-1.634.86-.635 0-1.179-.353-1.635-.86-.364-.405-.64-.508-.827-.508-.186 0-.462.103-.827.508a.552.552 0 0 1-.746.058.48.48 0 0 1-.061-.705c.456-.507 1-.86 1.634-.86.315 0 .607.086.877.236.056-.392.227-.78.492-1.099a.917.917 0 0 1 .111-.169c.11-.203.23-.398.376-.568.416-.486.86-.947 1.305-1.407.4-.414.8-.828 1.178-1.26.12-.252.052-.46-.13-.63-.074-.07-.152-.136-.23-.201-.096-.082-.194-.165-.284-.255C5.43 6.258 5.074 4.94 5.242 3.443a5.939 5.939 0 0 1 .743-2.311.38.38 0 0 1 .04-.096L6.1.973a.109.109 0 0 1 .033-.004c.068 0 .077.056.086.11.004.023.007.046.015.065a.219.219 0 0 1 .004.066l.03.096c.021.075.043.15.07.222.092.268.238.512.43.716.053.055.138.142.205.03.118-.197.212-.117.307-.036l.031.027c.266.215.416.512.56.815a.94.94 0 0 1 .032.077c.03.081.062.165.151.207.027-.028.044-.066.06-.102.028-.064.054-.123.136-.12.11.004.146.094.18.177a2.284 2.284 0 0 1 .215.795.397.397 0 0 1 .029.235c.03.032.036.084.042.136.012.097.023.195.196.162.14-.166.218-.105.246.064.05.27.052.548.006.823.009.163-.027.321-.063.48-.015.067-.03.134-.042.202l-.004.022c-.01.054-.019.103.077.071a.5.5 0 0 1 .183-.147c.214-.198.465-.353.736-.455 0-.003.002-.006.004-.009a.022.022 0 0 1 .017-.009.02.02 0 0 1 .01.002.283.283 0 0 1 .201-.068c.166-.052.284-.061.248.179-.029.193.05.243.245.173.123-.044.246-.093.368-.142.129-.052.257-.103.386-.148.271-.095.548-.133.824-.068.192.045.217.114.068.244-.157.138-.096.196.054.244.126.039.257.04.388.041.08.001.16.002.24.011l.05-.002a.418.418 0 0 1 .236.001.34.34 0 0 1 .222.037c.092.006.183.033.192.132.006.066-.049.09-.103.115-.018.008-.036.016-.051.025a.752.752 0 0 0-.101.089c.12.139.283.147.447.155l.103.007c.111 0 .216-.034.321-.068.073-.023.146-.046.22-.058a.443.443 0 0 0 .122-.05c.08-.04.156-.08.206-.01.066.094-.003.191-.07.285a.964.964 0 0 0-.062.094.069.069 0 0 1-.017.015.023.023 0 0 1-.005.018.024.024 0 0 1-.018.01c-.23.348-.565.57-.919.772l-.007.016h-.018c-.258.199-.54.36-.84.482-.402.235-.834.382-1.276.501a.408.408 0 0 1-.206.042c-.575.154-1.153.175-1.733.15a5.84 5.84 0 0 1-.357-.028c-.344-.034-.688-.068-1.036.073l-.039.026a3.518 3.518 0 0 0-.477.454l-.137.197a.104.104 0 0 1-.055.088c-.189.364-.34.744-.449 1.135l-.091.643v.006Zm7.234-4.592.007.013-.002.002c-.009-.006-.012-.009-.005-.015ZM9.008 5.125l.003.012-.004.001-.002-.002.004.001v-.012Z"/></svg>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 11.5 3.004-3.004 3.003 3.004-3.003 3.004L8 11.5Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9.504 2.863v3h3v-3h-3Zm-1 4h5v-5h-5v5Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.004 14.504 8 11.5l2.504-2.504V6.07h1v2.926l2.503 2.504-3.003 3.004ZM9.414 11.5l1.59-1.59 1.59 1.59-1.59 1.59-1.59-1.59ZM6.837 4.999h2.625v-1h-2.57a2.5 2.5 0 1 0-2.974 2.814V9h-2v5h5V9h-2V6.813c.934-.19 1.68-.9 1.919-1.814Zm-3.919-.636a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 5.637v3h3v-3h-3Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 590 B |
1
theme/icons/preview-mode.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M13.8 11.609V13.4a.4.4 0 0 1-.4.4H2.6a.4.4 0 0 1-.4-.4v-1.791H1V13.4A1.6 1.6 0 0 0 2.6 15h10.8a1.6 1.6 0 0 0 1.6-1.6v-1.791h-1.2ZM13.8 4.997H15V2.6A1.6 1.6 0 0 0 13.4 1H2.6A1.6 1.6 0 0 0 1 2.6v2.397h1.2V2.6c0-.22.18-.4.4-.4h10.8c.22 0 .4.18.4.4v2.397Z"/><path d="M8 11.095c-1.92 0-3.837-.919-5.749-2.757L2 8.095l.251-.242c3.815-3.677 7.683-3.677 11.498 0l.251.242-.251.243C11.84 10.176 9.925 11.095 8 11.096Zm-5.02-3c3.375 3.1 6.665 3.1 10.04 0-3.375-3.1-6.665-3.095-10.04 0Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.514 8.095c-3.676 3.543-7.352 3.543-11.028 0 3.676-3.542 7.352-3.542 11.028 0Zm-3.586 0A1.926 1.926 0 0 1 8 10.02a1.926 1.926 0 0 1-1.928-1.924c0-1.062.863-1.924 1.928-1.924s1.928.862 1.928 1.924Z"/><path d="M8 8.861a.767.767 0 1 0 .002-1.533A.767.767 0 0 0 8 8.86Z"/></svg>
|
After Width: | Height: | Size: 897 B |
@ -1 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 11.5 3.004-3.004 3.003 3.004-3.003 3.004L8 11.5Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M9.504 2.863v3h3v-3h-3Zm-1 4h5v-5h-5v5Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11.004 14.504 8 11.5l2.504-2.504V6.07h1v2.926l2.503 2.504-3.003 3.004ZM9.414 11.5l1.59-1.59 1.59 1.59-1.59 1.59-1.59-1.59ZM6.837 4.999h2.625v-1h-2.57a2.5 2.5 0 1 0-2.974 2.814V9h-2v5h5V9h-2V6.813c.934-.19 1.68-.9 1.919-1.814Zm-3.919-.636a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 5.637v3h3v-3h-3Z"/></svg>
|
Before Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 790 B After Width: | Height: | Size: 790 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 348 B |