Initial Commit

This commit is contained in:
2019-11-21 12:25:31 +01:00
commit f4aabcb9b1
13959 changed files with 787761 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
/*
* Put here the styles that should be available in the TinyMCE editor
*/
h1 {
color: red;
}

View File

@@ -0,0 +1,106 @@
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl d='tinymce.bo.default' l="TinyMCE configuration"}
</div>
</div>
<div class="form-container">
<div class="row">
<div class="col-md-12">
{form name="tinymce.configure"}
<form action="{url path="/admin/tinymce/configure"}" method="post">
{include
file = "includes/inner-form-toolbar.html"
hide_submit_buttons = false
page_url = {url path="/admin/module/Tinymce"}
close_url = {url path="/admin/modules"}
}
{form_hidden_fields form=$form}
<div class="row">
<div class="col-md-12 general-block-decorator">
<table class="table">
<thead>
<tr>
<th></th>
<th>{intl l='Product' d='tinymce.bo.default'}</th>
<th>{intl l='Content' d='tinymce.bo.default'}</th>
<th>{intl l='Folder' d='tinymce.bo.default'}</th>
<th>{intl l='Brand' d='tinymce.bo.default'}</th>
<th>{intl l='Category' d='tinymce.bo.default'}</th>
</tr>
</thead>
<tbody>
<tr>
<th>{intl l='Summary' d='tinymce.bo.default'}</th>
<td>{render_form_field form=$form field="product_summary"}</td>
<td>{render_form_field form=$form field="content_summary"}</td>
<td>{render_form_field form=$form field="folder_summary"}</td>
<td>{render_form_field form=$form field="brand_summary"}</td>
<td>{render_form_field form=$form field="category_summary"}</td>
</tr>
<tr>
<th>{intl l='Conclusion' d='tinymce.bo.default'}</th>
<td>{render_form_field form=$form field="product_conclusion"}</td>
<td>{render_form_field form=$form field="content_conclusion"}</td>
<td>{render_form_field form=$form field="folder_conclusion"}</td>
<td>{render_form_field form=$form field="brand_conclusion"}</td>
<td>{render_form_field form=$form field="category_conclusion"}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="title">
{intl l='List of the text area where the wysiwyg editor will be used' d='tinymce.bo.default'}
</div>
<div class="alert alert-info">
<p>
{intl l='This is a <strong>critical</strong> data, to update it you have to inform the ids (#timymce_configuration-id-test_zone for example) or the classes (.wysiwyg for example) , <strong>separated with comas</strong>, of the text areas you want to have the wysiwyg editor <strong>directly in the data base</strong>.' d='tinymce.bo.default'}
</p>
</div>
<div id="available_text_areas">
{render_form_field form=$form field="available_text_areas"}
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 general-block-decorator">
{if $form_error}
<div class="alert alert-danger">{$form_error_message}</div>
{/if}
<div class="col-md-5">
{render_form_field form=$form field="editor_height"}
{render_form_field form=$form field="force_pasting_as_text"}
{render_form_field form=$form field="set_images_as_responsive"}
{render_form_field form=$form field="show_menu_bar"}
{render_form_field form=$form field="custom_css"}
</div>
<div class="col-md-7">
{render_form_field form=$form field="test_zone" extra_class="wysiwyg"}
</div>
</div>
</div>
</form>
{/form}
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,119 @@
<script src="{url file='/tinymce/tinymce.min.js'}"></script>
<script>
function build_fields_list() {
var fields_list = [];
{function name=get_config}
{foreach $datas as $config}
{foreach $datas_types as $type}
{loop type="module-config" name="dummy" module="tinymce" variable="$config"|cat:"_"|cat:"{$type}" default_value="0"}
{if $VALUE > 0}
fields_list.push(".edit-{$config} #{$type}_field");
{/if}
{/loop}
{/foreach}
{/foreach}
{loop type="module-config" name="dummy" module="tinymce" variable="available_text_areas" default_value="0"}
{if $VALUE !== ""}
fields_list.push("{$VALUE}");
{/if}
{/loop}
{/function}
{$configs=["product", "category", "folder", "content", "brand"]}
{$config_types = ["summary", "conclusion"]}
{get_config datas=$configs datas_types=$config_types}
return fields_list.join(",");
}
tinymce.init({
selector: build_fields_list(),
theme: "modern",
{loop type="module-config" name="dummy" module="tinymce" variable="editor_height" default_value="0"}
// height of the editor zone
{if $VALUE > 0}
height: {$VALUE},
{/if}
{/loop}
{loop type="module-config" name="dummy" module="tinymce" variable="show_menu_bar" default_value="0"}
{if $VALUE == 0}
menubar : false,
{/if}
{/loop}
{loop type="module-config" name="dummy" module="tinymce" variable="force_pasting_as_text" default_value="0"}
{if $VALUE != 0}
// Force pasting as text
paste_auto_cleanup_on_paste : true,
paste_remove_styles: true,
paste_remove_styles_if_webkit: true,
paste_strip_class_attributes: true,
paste_as_text: true,
{/if}
{/loop}
// Use our smarty plugin to guess the best available language
language: "{tinymce_lang}",
// See available plugins at http://www.tinymce.com/wiki.php/Plugins
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking",
"table contextmenu directionality emoticons paste textcolor responsivefilemanager",
"fullscreen code youtube importcss"
],
// See available controls at http://www.tinymce.com/wiki.php/Controls
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | hr | styleselect | filemanager | code | fullscreen",
toolbar2: "link unlink anchor | image responsivefilemanager media youtube | forecolor backcolor | charmap | print preview ",
image_advtab: true,
image_caption: true,
{loop type="module-config" name="dummy" module="tinymce" variable="set_images_as_responsive" default_value="1"}
{if $VALUE != 0}
// Set image as responsive
image_dimensions: false,
image_class_list: [
{
title: '{intl l='Responsive'}', value: 'img-responsive'
},
{
title: '{intl l='None'}', value: ''
}
],
{/if}
{/loop}
// File manager configuration
external_filemanager_path: "{url file='/tinymce/filemanager/'}",
filemanager_title: "{intl l='File manager' d='tinymce.bo.default'}" ,
external_plugins: { "filemanager" : "{url file='/tinymce/filemanager/plugin.min.js'}"},
// Styles (CSS or LESS) available in the editor could be defined in assets/css/editor.less file.
{$css = ''}
{stylesheets file='assets/css/editor.less' filters='less' source='Tinymce'}
{$css = $asset_url}
{/stylesheets}
{stylesheets file='assets/css/custom-css.less' failsafe=true filters='less' source='Tinymce' template='default'}
{if $asset_url != ''}
{$css = "`$css`,`$asset_url`"}
{/if}
{/stylesheets}
{if $css != ''}
content_css: "{$css}",
importcss_append: true,
{/if}
convert_urls: false,
relative_urls : false,
// Use file to get an url without index.php or index_dev.php
document_base_url : "{url file="/"}"
});
</script>