first commit
This commit is contained in:
43
components/com_jce/editor/tiny_mce/plugins/code/config.php
vendored
Normal file
43
components/com_jce/editor/tiny_mce/plugins/code/config.php
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
class WFCodePluginConfig
|
||||
{
|
||||
public static function getConfig(&$settings)
|
||||
{
|
||||
$wf = WFApplication::getInstance();
|
||||
|
||||
if (!in_array('code', $settings['plugins'])) {
|
||||
$settings['plugins'][] = 'code';
|
||||
}
|
||||
|
||||
$settings['code_allow_php'] = $wf->getParam('editor.allow_php', 0, 0, 'boolean');
|
||||
$settings['code_allow_script'] = $wf->getParam('editor.allow_javascript', 0, 0, 'boolean');
|
||||
$settings['code_allow_style'] = $wf->getParam('editor.allow_css', 0, 0, 'boolean');
|
||||
|
||||
$settings['code_protect_shortcode'] = $wf->getParam('editor.protect_shortcode', 0, 0, 'boolean');
|
||||
$settings['code_allow_custom_xml'] = $wf->getParam('editor.allow_custom_xml', 0, 0, 'boolean');
|
||||
|
||||
$settings['code_use_blocks'] = $wf->getParam('editor.code_blocks', 1, 1, 'boolean');
|
||||
|
||||
$remove = array();
|
||||
|
||||
// remove as Invalid Elements
|
||||
if ($settings['code_allow_script']) {
|
||||
$remove[] = 'script';
|
||||
}
|
||||
|
||||
if ($settings['code_allow_style']) {
|
||||
$remove[] = 'style';
|
||||
}
|
||||
|
||||
$settings['invalid_elements'] = array_diff($settings['invalid_elements'], $remove);
|
||||
}
|
||||
}
|
||||
1
components/com_jce/editor/tiny_mce/plugins/code/css/content.css
vendored
Normal file
1
components/com_jce/editor/tiny_mce/plugins/code/css/content.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.mceContentBody span[data-mce-code=shortcode]:not([data-mce-type=placeholder]),.mceContentBody span[data-mce-code=php]:not([data-mce-type=placeholder]){font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:14px;color:#444;background-color:#fafafa;background-color:var(--mce-placeholder);margin:2px 0;padding:2px;border:1px dashed #787679;border-color:var(--mce-guidelines);line-height:1;vertical-align:middle;max-width:inherit}.mceContentBody span[data-mce-code=php]:not([data-mce-type=placeholder]){background-color:#E2E4EF;color:#4F5B93}.mceContentBody pre[data-mce-code]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;cursor:inherit;vertical-align:baseline;border-collapse:separate;text-align:left;box-sizing:border-box;float:none;outline:0;position:relative;-webkit-border-radius:0;-moz-border-radius:0;text-transform:inherit;font-style:normal;letter-spacing:normal;box-shadow:inherit;transition:inherit;border:1px solid #787679;border-color:var(--mce-guidelines);width:100%;min-height:2rem;border-radius:0;background-color:#fff;overflow-y:auto;padding:8px;white-space:pre-wrap;word-wrap:normal;word-break:normal;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:14px;color:#444}.mceContentBody.mceVisualBlocks pre[data-mce-code]{border:1px solid #787679;border-color:var(--mce-guidelines);padding:8px}.mceContentBody pre[data-mce-code]:before{display:block;position:inherit;content:attr(data-mce-code);background-color:#fafafa;background-color:var(--mce-placeholder);padding:4px;line-height:1;width:4rem;text-align:center;left:-8px;top:-8px;font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-size:10px;font-weight:700;color:#787679;color:var(--mce-guidelines)}.mceContentBody pre[data-mce-code=php]:before,.mceContentBody.mceVisualBlocks pre[data-mce-code=php]:before{color:#4F5B93;background-color:#E2E4EF}.mceContentBody img[data-mce-code]{display:block;position:inherit;background-color:#fafafa;background-color:var(--mce-placeholder);width:2.5rem;height:1.5rem;margin:1px 0;cursor:pointer;background-position:center;background-repeat:no-repeat;box-sizing:border-box}.mceContentBody img[data-mce-code][data-mce-selected]{border:1px solid #39f;border-color:var(--mce-control-selection)}.mceContentBody img[data-mce-code=php]{display:inline-block;background-image:url(../img/php.svg);background-color:#E2E4EF}.mceContentBody img[data-mce-code=style]{background-image:url(../img/style.svg)}.mceContentBody img[data-mce-code=script]{background-image:url(../img/script.svg)}.mceContentBody img[data-mce-code=xml]{background-image:url(../img/xml.svg)}.mceContentBody span[data-mce-code=shortcode],.mceContentBody span[data-mce-code=php]{display:inline-block}.mceContentBody span[data-mce-code=shortcode]:not([data-mce-type=placeholder]):before,.mceContentBody span[data-mce-code=php]:not([data-mce-type=placeholder]):before{content:"";display:none}.mceContentBody.mceVisualBlocks pre[data-mce-code]:before{content:attr(data-mce-code);width:6em;padding:4px;font-size:10px;line-height:1;text-align:center;margin:0}.mceContentBody.mceVisualBlocks pre[data-mce-label]:before{content:attr(data-mce-label)}
|
||||
1
components/com_jce/editor/tiny_mce/plugins/code/css/index.html
vendored
Normal file
1
components/com_jce/editor/tiny_mce/plugins/code/css/index.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
2
components/com_jce/editor/tiny_mce/plugins/code/editor_plugin.js
vendored
Normal file
2
components/com_jce/editor/tiny_mce/plugins/code/editor_plugin.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
components/com_jce/editor/tiny_mce/plugins/code/img/index.html
vendored
Normal file
1
components/com_jce/editor/tiny_mce/plugins/code/img/index.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
8
components/com_jce/editor/tiny_mce/plugins/code/img/php.svg
vendored
Normal file
8
components/com_jce/editor/tiny_mce/plugins/code/img/php.svg
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
|
||||
<title>PHP</title>
|
||||
<g>
|
||||
<text x="55" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#4F5B93;stroke:none;'>php</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 467 B |
8
components/com_jce/editor/tiny_mce/plugins/code/img/script.svg
vendored
Normal file
8
components/com_jce/editor/tiny_mce/plugins/code/img/script.svg
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
|
||||
<title>Script</title>
|
||||
<g>
|
||||
<text x="50" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#787679;stroke:none;'>script</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 473 B |
8
components/com_jce/editor/tiny_mce/plugins/code/img/style.svg
vendored
Normal file
8
components/com_jce/editor/tiny_mce/plugins/code/img/style.svg
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
|
||||
<title>Style</title>
|
||||
<g>
|
||||
<text x="53" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#787679;stroke:none;'>style</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 471 B |
8
components/com_jce/editor/tiny_mce/plugins/code/img/xml.svg
vendored
Normal file
8
components/com_jce/editor/tiny_mce/plugins/code/img/xml.svg
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 128 32" width="128" height="32">
|
||||
<title>XML</title>
|
||||
<g>
|
||||
<text x="55" y="20" style='font-family:-apple-systrem,BlinkMacSystremFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif;font-weight:bold;font-size:10px;fill:#787679;stroke:none;'>xml</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 467 B |
1
components/com_jce/editor/tiny_mce/plugins/code/index.html
vendored
Normal file
1
components/com_jce/editor/tiny_mce/plugins/code/index.html
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
Reference in New Issue
Block a user