Вход Регистрация
Файл: public/assets/js/markitup-set.js
Строк: 266
<?php
// ----------------------------------------------------------------------------
// markItUp bb-code setting!
// ----------------------------------------------------------------------------
var currentLang = $('html').attr('lang');
var 
translate window['translate_' currentLang];

mySettings = {
    
previewParserPath'/ajax/bbcode'// path to your BBCode parser
    
previewAutoRefreshfalse,
    
onTab: {keepDefaultfalseopenWith'    '},
    
markupSet: [
        {
titletranslate.editor.boldname'<i class="fa fa-bold"></i>'className'bb-bold'key'B'openWith'[b]'closeWith'[/b]'},
        {
titletranslate.editor.italicname'<i class="fa fa-italic"></i>'className'bb-italic'key'I'openWith'[i]'closeWith'[/i]'},
        {
titletranslate.editor.underlinename'<i class="fa fa-underline"></i>'className'bb-underline'key'U'openWith'[u]'closeWith'[/u]'},
        {
titletranslate.editor.strikename'<i class="fa fa-strikethrough"></i>'className'bb-strike'key'S'openWith'[s]'closeWith'[/s]'},

        {
separator'---------------'},
        {
titletranslate.editor.linkname'<i class="fa fa-link"></i>'className'bb-link'key'L'openWith'[url=[![' translate.editor.link ':!:https://]!]]'closeWith'[/url]'placeHoldertranslate.editor.link_text},

        {
titletranslate.editor.imagename'<i class="fa fa-image"></i>'className'bb-image'openWith'[img][![' translate.editor.image_text ':!:https://]!]'closeWith'[/img]'},

        {
titletranslate.editor.videoname'<i class="fab fa-youtube"></i>'className'bb-video'openWith'[video][![' translate.editor.video_link ']!]'closeWith'[/video]'},

        {
titletranslate.editor.audioname'<i class="fa-solid fa-music"></i>'className'bb-audio'openWith'[audio][![' translate.editor.audio_link ':!:https://]!]'closeWith'[/audio]'},

        {
titletranslate.editor.colorname'<i class="fa fa-th"></i>'className'bb-color'openWith'[color=[![' translate.editor.color_code ']!]]'closeWith'[/color]',
        
dropMenu: [
            {
name'Yellow'openWith'[color=#ffd700]'closeWith'[/color]'className'col1-1'},
            {
name'Orange'openWith'[color=#ffa500]'closeWith'[/color]'className'col1-2'},
            {
name'Red'openWith'[color=#ff0000]'closeWith'[/color]'className'col1-3'},

            {
name'Blue'openWith'[color=#0000ff]'closeWith'[/color]'className'col2-1'},
            {
name'Purple'openWith'[color=#800080]'closeWith'[/color]'className'col2-2'},
            {
name'Green'openWith'[color=#00cc00]'closeWith'[/color]'className'col2-3'},

            {
name'Magenta'openWith'[color=#ff00ff]'closeWith'[/color]'className'col3-1'},
            {
name'Gray'openWith'[color=#808080]'closeWith'[/color]'className'col3-2'},
            {
name'Cyan'openWith'[color=#00ffff]'closeWith'[/color]'className'col3-3'}
        ]},

        {
separator'---------------'},
        {
titletranslate.editor.font_sizename'<i class="fa fa-font"></i>'className'bb-size'openWith'[size=[![' translate.editor.font_text ']!]]'closeWith'[/size]',
        
dropMenu :[
            {
name'x-small'openWith'[size=1]'closeWith'[/size]'},
            {
name'small'openWith'[size=2]'closeWith'[/size]'},
            {
name'medium'openWith'[size=3]'closeWith'[/size]'},
            {
name'large'openWith'[size=4]'closeWith'[/size]'},
            {
name'x-large'openWith'[size=5]'closeWith'[/size]'}
        ]},

        {
titletranslate.editor.centername'<i class="fa fa-align-center"></i>'className'bb-center'openWith'[center]'closeWith'[/center]'},
        {
titletranslate.editor.spoilername'<i class="fa fa-plus-square"></i>'className'bb-spoiler'openWith'[spoiler=[![' translate.editor.spoiler_title ']!]]'closeWith'[/spoiler]'placeHoldertranslate.editor.spoiler_text},
        {
            
titletranslate.editor.sticker,
            
name'<i class="fa fa-smile"></i>',
            
className'bb-sticker',
            
beforeInsert: function () {
                const 
stikerModal = $('#stickersModal');

                if (
stikerModal.length) {
                    
stikerModal.modal('show');

                    return 
false;
                }

                $.
ajax({
                    
dataType'json'type'get'url'/ajax/getstickers',
                    
success: function (data) {
                        if (
data.success) {
                            $(
'body').append(data.stickers);
                        }

                        $(
'#stickersModal').modal('show')
                    }
                });
            }
        },

        {
separator'---------------'},
        {
titletranslate.editor.hidename'<i class="fa fa-eye-slash"></i>'className'bb-hide'openWith'[hide]'closeWith'[/hide]'},
        {
titletranslate.editor.quotename'<i class="fa fa-quote-right"></i>'className'bb-quote'openWith'[quote]'closeWith'[/quote]'},
        {
titletranslate.editor.codename'<i class="fa fa-code"></i>'className'bb-code'openWith'[code]'closeWith'[/code]'},

        {
separator'---------------'},
        {
titletranslate.editor.unorderedlistname'<i class="fa fa-list-ul"></i>'className'bb-unorderedlist'multiline:trueopenBlockWith'[list]n'closeBlockWith'n[/list]'placeHoldertranslate.editor.list_text},
        {
titletranslate.editor.orderedlistname'<i class="fa fa-list-ol"></i>'className'bb-orderedlist'multiline:trueopenBlockWith'[list=1]n'closeBlockWith'n[/list]'placeHoldertranslate.editor.list_text},

        {
separator'---------------'},
        {
titletranslate.editor.cleanname'<i class="fa fa-eraser"></i>'className'bb-clean'replaceWith:function(markitup) { return markitup.selection.replace(/[(.*?)]/g"") } },
        {
titletranslate.editor.cutpagename'<i class="fa fa-cut"></i>'className'bb-cutpage'openWith'[cut]'},
        {
titletranslate.editor.previewname'<i class="fa fa-check-square"></i>'classname'bb-preview',  call'preview'}
    ]
};

// ----------------------------------------------------------------------------
// markItUp Html setting!
// ----------------------------------------------------------------------------
myHtmlSettings = {
    
onCtrlEnter: {keepDefaultfalsereplaceWith'<br />r'},
    
onTab: {keepDefaultfalseopenWith'    '},
    
markupSet: [
        {
title'Div'name'<i class="fa fa-list-alt"></i>'className'bb-div'openWith'<div(!( class="[![Class]!]")!)>'closeWith'</div>n'},
        {
title'Span'name'<i class="fa fa-columns"></i>'className'bb-span'openWith'<span(!( class="[![Class]!]")!)>'closeWith'</span>n'},
        {
title'Paragraph'name'<i class="fa fa-paragraph"></i>'className'bb-paragraph'openWith'<p(!( class="[![Class]!]")!)>'closeWith'</p>n'},
        {
title'Paragraph'name'<i class="fa fa-table"></i>'className'bb-table'openWith'<table(!( class="[![Class]!]")!)>n    <tr>n        <td>'closeWith'</td>n    </tr>n</table>'},
        {
separator'---------------'},
        {
title'Heading 1'name'<i class="fa fa-heading">1</i>'className'bb-heading1'key'1'openWith'<h1(!( class="[![Class]!]")!)>'closeWith'</h1>'placeHoldertranslate.editor.enter_title},
        {
title'Heading 2'name'<i class="fa fa-heading">2</i>'className'bb-heading2'key'2'openWith'<h2(!( class="[![Class]!]")!)>'closeWith'</h2>'placeHoldertranslate.editor.enter_title},
        {
title'Heading 3'name'<i class="fa fa-heading">3</i>'className'bb-heading3'key'3'openWith'<h3(!( class="[![Class]!]")!)>'closeWith'</h3>'placeHoldertranslate.editor.enter_title},
        {
separator'---------------'},
        {
titletranslate.editor.boldname'<i class="fa fa-bold"></i>'className'bb-bold'key'B'openWith'(!(<strong>|!|<b>)!)'closeWith'(!(</strong>|!|</b>)!)'},
        {
titletranslate.editor.italicname'<i class="fa fa-italic"></i>'className'bb-italic'key'I'openWith'(!(<em>|!|<i>)!)'closeWith'(!(</em>|!|</i>)!)'},
        {
titletranslate.editor.underlinename'<i class="fa fa-underline"></i>'className'bb-underline'key'U'openWith'<u>'closeWith'</u>'},
        {
titletranslate.editor.strikename'<i class="fa fa-strikethrough"></i>'className'bb-strike'key'S'openWith'<del>'closeWith'</del>'},
        {
separator'---------------'},
        {
title'Ul'name'<i class="fa fa-list-ul"></i>'className'bb-ul'openWith'<ul>n'closeWith'</ul>n'},
        {
title'Ol'name'<i class="fa fa-list-ol"></i>'className'bb-ol'openWith'<ol>n'closeWith'</ol>n'},
        {
title'Li'name'<i class="fa fa-minus"></i>'className'bb-li'openWith'<li>'closeWith'</li>'},
        {
separator'---------------'},
        {
titletranslate.editor.imagename'<i class="fa fa-image"></i>'className'bb-picture'key'P'replaceWith'<img src="[![' translate.editor.image_text ':!:https://]!]" alt="[![' translate.editor.alt ']!]" />'},
        {
titletranslate.editor.linkname'<i class="fa fa-link"></i>'className'bb-link'key'L'openWith'<a href="[![' translate.editor.link ':!:https://]!]"(!( title="[![Title]!]")!)>'closeWith'</a>'placeHoldertranslate.editor.link_text},
        {
separator'---------------'},
        {
titletranslate.editor.cleanname'<i class="fa fa-eraser"></i>'classname'bb-clean'replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g"") } }
    ]
};
?>
Онлайн: 3
Реклама