-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
69 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
imports: | ||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Full.yaml" } | ||
- { resource: "EXT:rte_ckeditor_fontawesome/Configuration/RTE/PluginFA5.yaml" } | ||
- { resource: "EXT:rte_ckeditor_fontawesome/Configuration/RTE/PluginFA5Pro.yaml" } | ||
|
||
# Add configuration for the editor | ||
editor: | ||
config: | ||
# css definitions for the editor | ||
contentsCss: | ||
- "EXT:rte_ckeditor/Resources/Public/Css/contents.css" | ||
fontAwesome: | ||
- "https://use.fontawesome.com/releases/v5.14.0/css/all.css" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 36 additions & 15 deletions
51
Resources/Public/JavaScript/Plugins/ckeditor_fa5pro/plugin.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,47 @@ | ||
(function ($) { | ||
var CKEDITOR_FA = { | ||
version: '11.5.3' | ||
version: '11.5.4' | ||
}; | ||
|
||
CKEDITOR.dtd.$removeEmpty.span = 0; | ||
CKEDITOR.dtd.$removeEmpty.em = 0; | ||
CKEDITOR.dtd.$removeEmpty.i = 0; | ||
|
||
CKEDITOR.plugins.add('ckeditor_fa5pro', { | ||
icons: 'ckeditor-fa', | ||
init: function (editor) { | ||
editor.addCommand('ckeditor_fa5pro', new CKEDITOR.dialogCommand('ckeditorFaDialog', { | ||
allowedContent: 'i(!fa-*)', | ||
})); | ||
editor.ui.addButton('ckeditor_fa5pro', { | ||
label: 'Insert FontAwesome icon', | ||
command: 'ckeditor_fa5pro', | ||
toolbar: 'insert', | ||
icon: this.path + 'icons/ckeditor-fa.png', | ||
}); | ||
CKEDITOR.dialog.add('ckeditorFaDialog', this.path + 'dialogs/ckeditor-fa.js?v='+CKEDITOR_FA.version); | ||
CKEDITOR.document.appendStyleSheet(this.path + 'css/ckeditor-fa.css?v='+CKEDITOR_FA.version); | ||
icons: 'ckeditor-fa', | ||
init: function (editor) { | ||
editor.addCommand('ckeditor_fa5pro', new CKEDITOR.dialogCommand('ckeditorFaDialog', { | ||
allowedContent: 'i(!fa-*)', | ||
})); | ||
editor.ui.addButton('ckeditor_fa5pro', { | ||
label: 'Insert FontAwesome icon', | ||
command: 'ckeditor_fa5pro', | ||
toolbar: 'insert', | ||
icon: this.path + 'icons/ckeditor-fa.png', | ||
}); | ||
CKEDITOR.dialog.add('ckeditorFaDialog', this.path + 'dialogs/ckeditor-fa.js?v=' + CKEDITOR_FA.version); | ||
CKEDITOR.document.appendStyleSheet(this.path + 'css/ckeditor-fa.css?v=' + CKEDITOR_FA.version); | ||
// add styles | ||
if(typeof editor.config.fontAwesome != 'undefined'){ | ||
editor.config.fontAwesome.map(function (css_file) { | ||
editor.addContentsCss(css_file); | ||
loadCSS(css_file); | ||
}); | ||
} | ||
} | ||
}); | ||
|
||
/** | ||
* Load Fontawesome | ||
* @param href | ||
*/ | ||
function loadCSS(href) { | ||
var headID = document.getElementsByTagName('head')[0]; | ||
var cssLink = document.createElement("link"); | ||
cssLink.rel = "stylesheet"; | ||
cssLink.type = "text/css"; | ||
cssLink.href = href; | ||
// add to dom | ||
headID.appendChild(cssLink); | ||
} | ||
}); | ||
})(TYPO3.jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
'clearCacheOnLoad' => 0, | ||
'author' => 'Dirk Persky', | ||
'author_email' => '[email protected]', | ||
'version' => '11.5.3', | ||
'version' => '11.5.4', | ||
'constraints' => [ | ||
'depends' => [ | ||
'typo3' => '10.4.0-11.5.99', | ||
|