-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8acb17c
commit 2246e98
Showing
351 changed files
with
53,594 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# For more information about the properties used in | ||
# this file, please see the EditorConfig documentation: | ||
# http://editorconfig.org/ | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,js,json,css,scss,eslintrc,feature}] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
# Don't perform any clean-up on thirdparty files | ||
|
||
[client/tinymce_lang/**] | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
|
||
[client/src/tinymce/**] | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
|
||
[composer.json] | ||
indent_size = 4 |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Ignore dist files | ||
client/dist/ | ||
|
||
# Ignore vendor | ||
node_modules/ | ||
thirdparty/ | ||
|
||
# Ignore language files (auto-generated) | ||
client/lang/ | ||
client/tinymce_lang/ |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@silverstripe/eslint-config/.eslintrc'); |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.sass-cache | ||
/vendor/ | ||
/node_modules/ | ||
/**/*.js.map | ||
/**/*.css.map | ||
yarn-error.log | ||
composer.lock |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
client/src/tinymce/* |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@silverstripe/eslint-config/.stylelintrc'); |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
use SilverStripe\Core\Manifest\ModuleLoader; | ||
use SilverStripe\TinyMCE\TinyMCEConfig; | ||
|
||
// Avoid creating global variables | ||
call_user_func(function () { | ||
|
||
$editorConfig = TinyMCEConfig::get('cms'); | ||
$editorConfig->setOptions([ | ||
'friendly_name' => 'Default CMS', | ||
'priority' => '50', | ||
'skin' => 'silverstripe', | ||
// @TODO this came straight from admin but check if ssmedia and ssembed should be conditional or not | ||
'contextmenu' => "searchreplace | sslink anchor ssmedia ssembed inserttable | cell row column deletetable", | ||
'use_native_selects' => false, | ||
'extended_valid_elements' => "iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling]," | ||
. "object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]" | ||
]); | ||
$editorConfig->insertButtonsAfter('sslink', 'anchor'); | ||
|
||
// Prepare list of plugins to enable | ||
$moduleManifest = ModuleLoader::inst()->getManifest(); | ||
$module = $moduleManifest->getModule('silverstripe/htmleditor-tinymce'); | ||
$plugins = [ | ||
'image' => null, | ||
'anchor' => null, | ||
'sslink' => $module->getResource('client/dist/js/TinyMCE_sslink.js'), | ||
'sslinkexternal' => $module->getResource('client/dist/js/TinyMCE_sslink-external.js'), | ||
'sslinkemail' => $module->getResource('client/dist/js/TinyMCE_sslink-email.js'), | ||
]; | ||
|
||
// Add plugins for managing assets if silverstripe/asset-admin is installed | ||
if ($moduleManifest->moduleExists('silverstripe/asset-admin')) { | ||
$plugins += [ | ||
'ssmedia' => $module->getResource('client/dist/js/TinyMCE_ssmedia.js'), | ||
'ssembed' => $module->getResource('client/dist/js/TinyMCE_ssembed.js'), | ||
'sslinkfile' => $module->getResource('client/dist/js/TinyMCE_sslink-file.js'), | ||
]; | ||
$editorConfig->insertButtonsAfter('table', 'ssmedia'); | ||
$editorConfig->insertButtonsAfter('ssmedia', 'ssembed'); | ||
} | ||
|
||
// Add internal link plugins if silverstripe/cms is installed | ||
if ($moduleManifest->moduleExists('silverstripe/cms')) { | ||
TinyMCEConfig::get('cms')->enablePlugins([ | ||
'sslinkinternal' => $module->getResource('client/dist/js/TinyMCE_sslink-internal.js'), | ||
'sslinkanchor' => $module->getResource('client/dist/js/TinyMCE_sslink-anchor.js'), | ||
]); | ||
} | ||
|
||
$editorConfig->enablePlugins($plugins); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
Name: tinymce-config | ||
--- | ||
SilverStripe\TinyMCE\TinyMCEConfig: | ||
base_dir: 'silverstripe/htmleditor-tinymce:client/dist/tinymce' | ||
lang_dir: 'silverstripe/htmleditor-tinymce:thirdparty/tinymce_lang' | ||
editor_css: | ||
- 'silverstripe/htmleditor-tinymce:client/dist/styles/editor.css' | ||
image_size_presets: | ||
- width: 600 | ||
i18n: SilverStripe\TinyMCE\TinyMCEConfig.BEST_FIT | ||
text: Best fit | ||
name: bestfit | ||
default: true | ||
- i18n: SilverStripe\TinyMCE\TinyMCEConfig.ORIGINAL | ||
text: Original | ||
name: originalsize | ||
|
||
SilverStripe\Admin\FormSchemaController: | ||
extensions: | ||
TinyMceInit: 'SilverStripe\TinyMCE\Extension\AdminInitExtension' | ||
|
||
SilverStripe\Admin\LeftAndMain: | ||
extra_requirements_javascript: | ||
- 'silverstripe/htmleditor-tinymce: client/dist/js/bundle.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
Name: tinymce-injector | ||
--- | ||
SilverStripe\Core\Injector\Injector: | ||
SilverStripe\Forms\HTMLEditor\HTMLEditorConfig: | ||
class: SilverStripe\TinyMCE\TinyMCEConfig | ||
SilverStripe\TinyMCE\TinyMCEScriptGenerator: '%$SilverStripe\TinyMCE\TinyMCECombinedGenerator' | ||
SilverStripe\TinyMCE\TinyMCECombinedGenerator: | ||
class: SilverStripe\TinyMCE\TinyMCECombinedGenerator | ||
properties: | ||
AssetHandler: '%$SilverStripe\Assets\Storage\GeneratedAssetHandler' |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.