Home Web Front-end HTML Tutorial Rich text editor kindeditor configuration_html/css_WEB-ITnose

Rich text editor kindeditor configuration_html/css_WEB-ITnose

Jun 24, 2016 pm 12:05 PM
kindeditor text editor Configuration

<!--富文本编辑器kindeditor配置↓ --><link type="text/css" rel="stylesheet" href="kindeditor/themes/default/default.css" /><link rel="stylesheet" href="kindeditor/plugins/code/prettify.css" /><script type="text/javascript" charset="utf-8" src="kindeditor/kindeditor-min.js"></script><script type="text/javascript" charset="utf-8" src="kindeditor/lang/zh_CN.js"></script><script type="text/javascript" charset="utf-8" src="kindeditor/plugins/code/prettify.js"></script><script type="text/javascript">    KindEditor.ready(function (K) {        var editor1 = K.create('#content1', {            items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','removeformat', 'strikethrough', 'lineheight', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist','insertunorderedlist', '|', 'emoticons', 'link', 'insertfile', 'media', '|', 'image', 'multiimage', 'map', 'baidumap', '|', 'preview', 'fullscreen',],            cssPath: 'kindeditor/plugins/code/prettify.css',            uploadJson: 'kindeditor/asp.net/upload_json.ashx',            fileManagerJson: 'kindeditor/asp.net/file_manager_json.ashx',            allowFileManager: true,               afterChange : function() {      $('.word_count1').html(this.count()); //字数统计包含HTML代码      $('.word_count2').html(this.count('text'));  //字数统计包含纯文本、IMG、EMBED,不包含换行符,IMG和EMBED算一个文字      //////////      //限制字数      var limitNum = 40000;  //设定限制字数      var pattern = '还可以输入' + limitNum + '字';      $('.word_surplus').html(pattern); //输入显示      if(this.count('text') > limitNum) {       pattern = ('字数超过限制,请适当删除部分内容');       //超过字数限制自动截取       var strValue = editor.text();       strValue = strValue.substring(0,limitNum);       editor.text(strValue);             } else {       //计算剩余字数       var result = limitNum - this.count('text');       pattern = '还可以输入' +  result + '字';       }       $('.word_surplus').html(pattern); //输入显示      ////////     } ,            pasteType: 1,            afterCreate: function () {                var self = this;                K.ctrl(document, 13, function () {                    self.sync();                    K('form[name=form1]')[0].submit();                });                K.ctrl(self.edit.doc, 13, function () {                    self.sync();                    K('form[name=form1]')[0].submit();                });            }        });        prettyPrint();    });</script><!--富文本编辑器kindeditor配置↑--> 
Copy after login

            <dt><span class="red">*</span> 职位描述:</dt>            <dd >            您当前输入了 <span class="word_count1">0</span> 个文字。(字数统计包含HTML代码。)<span class="word_surplus"></span>                              </dd>            <dd >                         <textarea id="content1" name="content1" style="width:700px;height:300px;visibility:hidden;"></textarea>                                                </dd>
Copy after login

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

The working principle and configuration method of GDM in Linux system The working principle and configuration method of GDM in Linux system Mar 01, 2024 pm 06:36 PM

Title: The working principle and configuration method of GDM in Linux systems In Linux operating systems, GDM (GNOMEDisplayManager) is a common display manager used to control graphical user interface (GUI) login and user session management. This article will introduce the working principle and configuration method of GDM, as well as provide specific code examples. 1. Working principle of GDM GDM is the display manager in the GNOME desktop environment. It is responsible for starting the X server and providing the login interface. The user enters

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

How to configure workgroup in win11 system How to configure workgroup in win11 system Feb 22, 2024 pm 09:50 PM

How to configure a workgroup in Win11 A workgroup is a way to connect multiple computers in a local area network, which allows files, printers, and other resources to be shared between computers. In Win11 system, configuring a workgroup is very simple, just follow the steps below. Step 1: Open the "Settings" application. First, click the "Start" button of the Win11 system, and then select the "Settings" application in the pop-up menu. You can also use the shortcut "Win+I" to open "Settings". Step 2: Select "System" In the Settings app, you will see multiple options. Please click the "System" option to enter the system settings page. Step 3: Select "About" In the "System" settings page, you will see multiple sub-options. Please click

Introduction to Go language development tools: a list of essential tools Introduction to Go language development tools: a list of essential tools Mar 29, 2024 pm 01:06 PM

Title: Introduction to Go language development tools: List of essential tools In the development process of Go language, using appropriate development tools can improve development efficiency and code quality. This article will introduce several essential tools commonly used in Go language development, and attach specific code examples to allow readers to understand their usage and functions more intuitively. 1.VisualStudioCodeVisualStudioCode is a lightweight and powerful cross-platform development tool with rich plug-ins and functions.

How to configure and install FTPS in Linux system How to configure and install FTPS in Linux system Mar 20, 2024 pm 02:03 PM

Title: How to configure and install FTPS in Linux system, specific code examples are required. In Linux system, FTPS is a secure file transfer protocol. Compared with FTP, FTPS encrypts the transmitted data through TLS/SSL protocol, which improves Security of data transmission. In this article, we will introduce how to configure and install FTPS in a Linux system and provide specific code examples. Step 1: Install vsftpd Open the terminal and enter the following command to install vsftpd: sudo

MyBatis Generator configuration parameter interpretation and best practices MyBatis Generator configuration parameter interpretation and best practices Feb 23, 2024 am 09:51 AM

MyBatisGenerator is a code generation tool officially provided by MyBatis, which can help developers quickly generate JavaBeans, Mapper interfaces and XML mapping files that conform to the database table structure. In the process of using MyBatisGenerator for code generation, the setting of configuration parameters is crucial. This article will start from the perspective of configuration parameters and deeply explore the functions of MyBatisGenerator.

How to install and configure DRBD on CentOS7 system? Tutorial on implementing high availability and data redundancy! How to install and configure DRBD on CentOS7 system? Tutorial on implementing high availability and data redundancy! Feb 22, 2024 pm 02:13 PM

DRBD (DistributedReplicatedBlockDevice) is an open source solution for achieving data redundancy and high availability. Here is the tutorial to install and configure DRBD on CentOS7 system: Install DRBD: Open a terminal and log in to the CentOS7 system as administrator. Run the following command to install the DRBD package: sudoyuminstalldrbd Configure DRBD: Edit the DRBD configuration file (usually located in the /etc/drbd.d directory) to configure the settings for DRBD resources. For example, you can define the IP addresses, ports, and devices of the primary node and backup node. Make sure there is a network connection between the primary node and the backup node.

Detailed explanation of VSCode functions: How does it help you improve work efficiency? Detailed explanation of VSCode functions: How does it help you improve work efficiency? Mar 25, 2024 pm 05:27 PM

Detailed explanation of VSCode functions: How does it help you improve work efficiency? With the continuous development of the software development industry, developers' pursuit of work efficiency and code quality have become important goals in their work. In this process, the choice of code editor becomes a key decision. Among many editors, Visual Studio Code (VSCode for short) is loved by the majority of developers for its powerful functions and flexible scalability. This article will introduce some functions of VSCode in detail and discuss

See all articles