zoukankan      html  css  js  c++  java
  • wp.editor.initialize 配置案例

    wp.editor.initialize ( 'EditorTextArea' , {
    
    tinymce: {
        wpautop: to true ,
        theme: 'modern' ,
        skin: 'lightgray' ,
        language: 'en' ,
        formats: {
            alignleft: [
                {selector: 'p, h1, h2, h3, h4, h5, h6, td, th, div, ul, ol, li' , styles: {textAlign: 'left' }},
                {selector: 'img, table, dl.wp-caption' , classes: 'alignleft' }
            ],
            aligncenter: [
                {selector: 'p, h1, h2, h3, h4, h5, h6, td, th, div, ul, ol, li' , styles: {textAlign: 'center' }},
                {selector: 'img, table, dl.wp-caption' , classes: 'aligncenter' }
            ],
            alignright: [
                {selector: 'p, h1, h2, h3, h4, h5, h6, td, th, div, ul, ol, li' , styles: {textAlign: 'right' }},
                {selector: 'img, table, dl.wp-caption' , classes: 'alignright' }
            ],
            strikethrough: {inline: 'del' }
        },
        relative_urls: false ,
        remove_script_host: false ,
        convert_urls: false ,
        browser_spellcheck: to true ,
        fix_list_elements: to true ,
        entities: '38, amp, 60, lt, 62, gt ' ,
        entity_encoding: 'raw' ,
        keep_styles: false ,
        paste_webkit_styles: 'font-weight font-style color' ,
        preview_styles: 'font-family font-size font-weight font-style text-decoration text-transform' ,
        tabfocus_elements: ': prev ,: next' ,
        plugins: 'charmap, hr, media, paste, tabfocus, textcolor, fullscreen, wordpress, wpeditimage, wpgallery, wplink, wpdialogs, wpview' ,
        resize: 'vertical' ,
        menubar: false ,
        indent: false ,
        toolbar1: 'bold, italic, strikethrough, bullist, numlist, blockquote, hr, alignleft, aligncenter, alignright, link, unlink, wp_more, spellchecker, fullscreen, wp_adv' ,
        toolbar2: 'formatselect, underline, alignjustify, forecolor, pastetext, removeformat, charmap, outdent, indent, undo, redo, wp_help' ,
        toolbar3: '' ,
        toolbar4: '' ,
        body_class: 'id post-type-post-status-publish post-format-standard' ,
        wpeditimage_disable_captions: false ,
        wpeditimage_html5_captions: true
    
    },
    Quicktags: true,
    mediaButtons: true
    })
  • 相关阅读:
    MySQL
    php抽象类和接口
    php面向对象三大特征
    php面向对象
    Git
    css3属性
    数据渲染
    ajax(2)
    ajax笔记
    作用域面试题
  • 原文地址:https://www.cnblogs.com/huangcong/p/11899312.html
Copyright © 2011-2022 走看看