mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Allow to choose between the different fonts in CKEDITOR.
This commit is contained in:
parent
74b1b7acf5
commit
2768eb1745
15 changed files with 128 additions and 5 deletions
|
@ -22,6 +22,13 @@ fos_ck_editor:
|
|||
enterMode: 2
|
||||
toolbar: label_toolbar
|
||||
extraPlugins: "partdb_label"
|
||||
font_names: >
|
||||
DejaVu Sans Mono/DejaVu Sans Mono;
|
||||
DejaVu Sans/DejaVu Sans;
|
||||
DejaVu Serif/DejaVu Serif;
|
||||
Helvetica/Helvetica, Arial, sans-serif;
|
||||
Times New Roman/Times New Roman, Times, serif;
|
||||
Courier New/Courier New, Courier, monospace;
|
||||
|
||||
plugins:
|
||||
bbcode:
|
||||
|
@ -46,7 +53,7 @@ fos_ck_editor:
|
|||
- ["SpecialChar"]
|
||||
- ["Source"]
|
||||
- "/"
|
||||
- ['Format', 'FontSize']
|
||||
- ['Format', 'FontSize', 'Font']
|
||||
- ['Table', 'HorizontalRule']
|
||||
- ['Placeholders']
|
||||
description_toolbar:
|
||||
|
|
|
@ -87,14 +87,13 @@ CKEDITOR.plugins.add('partdb_label', {
|
|||
hidpi: true,
|
||||
icons: 'placeholder',
|
||||
lang: ['en', 'de'],
|
||||
onLoad: function() {
|
||||
// Register styles for placeholder widget frame.
|
||||
CKEDITOR.addCss( '.cke_placeholder{background-color:#ff0}' );
|
||||
},
|
||||
init: function (editor) {
|
||||
var config = editor.config,
|
||||
lang = editor.lang.partdb_label;
|
||||
|
||||
var pluginDirectory = this.path;
|
||||
editor.addContentsCss( pluginDirectory + 'styles/style.css' );
|
||||
|
||||
// Put ur init code here.
|
||||
editor.widgets.add( 'placeholder', {
|
||||
// Widget code.
|
||||
|
|
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSans-Bold.woff
Normal file
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSans-Bold.woff
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSans.woff
Normal file
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSans.woff
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSansMono.woff
Normal file
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSansMono.woff
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSerif.woff
Normal file
BIN
public/ckeditor/plugins/partdb_label/styles/DejaVuSerif.woff
Normal file
Binary file not shown.
117
public/ckeditor/plugins/partdb_label/styles/style.css
Normal file
117
public/ckeditor/plugins/partdb_label/styles/style.css
Normal file
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 - 2020 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans Mono";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: local(DejaVu Sans Mono), local(DejaVuSansMono),
|
||||
url(DejaVuSansMono.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans Mono";
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src: local(DejaVu Sans Mono Bold), local(DejaVuSansMono-Bold),
|
||||
url(DejaVuSansMono-Bold.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans Mono";
|
||||
font-style: oblique;
|
||||
font-weight: bold;
|
||||
src: local(DejaVu Sans Mono Bold Oblique), local(DejaVuSansMono-BoldOblique),
|
||||
url(DejaVuSansMono-BoldOblique.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans Mono";
|
||||
font-style: oblique;
|
||||
font-weight: normal;
|
||||
src: local(DejaVu Sans Mono Oblique), local(DejaVuSansMono-Oblique),
|
||||
url(DejaVuSansMono-Oblique.woff) format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: local(DejaVu Sans), local(DejaVuSans),
|
||||
url(DejaVuSans.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans";
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src: local(DejaVu Sans Bold), local(DejaVuSans-Bold),
|
||||
url(DejaVuSans-Bold.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans";
|
||||
font-style: oblique;
|
||||
font-weight: bold;
|
||||
src: local(DejaVu Sans Bold Oblique), local(DejaVuSans-BoldOblique),
|
||||
url(DejaVuSans-BoldOblique.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Sans";
|
||||
font-style: oblique;
|
||||
font-weight: normal;
|
||||
src: local(DejaVu Sans Oblique), local(DejaVuSans-Oblique),
|
||||
url(DejaVuSans-Oblique.woff) format("woff");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "DejaVu Serif";
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: local(DejaVu Serif), local(DejaVuSerif),
|
||||
url(DejaVuSerif.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Serif";
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src: local(DejaVu Serif Bold), local(DejaVuSerif-Bold),
|
||||
url(DejaVuSerif-Bold.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Serif";
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
src: local(DejaVu Serif Bold Italic), local(DejaVuSerif-BoldItalic),
|
||||
url(DejaVuSerif-BoldItalic.woff) format("woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: "DejaVu Serif";
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
src: local(DejaVu Serif Italic), local(DejaVuSerif-Italic),
|
||||
url(DejaVuSerif-Italic.woff) format("woff");
|
||||
}
|
||||
|
||||
|
||||
.cke_placeholder {
|
||||
background-color:#ff0
|
||||
}
|
||||
|
||||
.cke_editable {
|
||||
font-family: "DejaVu Sans Mono";
|
||||
font-size: 9pt;
|
||||
line-height: 1.5;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue