jquery 无法获取 Kindeditor 编辑器中当前 textarea 值的解决办法

Jquery+KindEditor文本编辑器 阅读详情

       使用了富文本编辑器 Kindeditor 之后,想用 jquery 来获取 textarea 的文本域的值,结果发现一直获取不到当前

输入在文本框内的内容,很是纳闷,百度了几种 jquery 获取文本域值的方法结果依旧不行,最后怀疑是编辑器的问

题,果然一百度就有空结果,关键得加上此句语句:afterBlur:function(){   this.sync();  },否则死活显示不了文本域

的值。如下所示:

            KindEditor.ready(function(K) {
                    window.editor = K.create('#blog',{
                       afterBlur:function(){
                          this.sync();
                       }
                    });
            });


this.sync()将编辑器的内容设置到原来的textarea控件里。参数: 无。返回: KEditor。
补充:在 KindEditor 4.x 版本中,KE.sync(); 要改成 this.sync();

jquery + kindEditor使用 jquery + kindEditor使用,html js jquery 实现文本编辑器的加载 显示 使用 立即下载

相关推荐

jQuery读取和设定KindEditor值的方法

主要介绍了jQuery读取和设定KindEditor值的方法,大家参考使用吧

jquery插件--kindeditor-在线富文本编辑器

使用非常方便: 1. 下载、引入文件; 2. 在需要使用的textarea上加上name="content",当然也可以自己定义; 3. 在自己的JS中加入代码,调用插件:如需增删插件,在对应的items里面进行增删;     resizeType 可以设置文本域尺寸是否可调整(2代表横纵可调,1代表只能纵向,0代表固定尺寸,不能调整); 4. 获取值: function Kind

又是再见? 669

电影台词预测类型:NLP小样本多标签分类实战

电影类型预测本质上是短文本语义建模问题,核心在于从高度碎片化、低语义密度的台词(平均仅12.7词)中挖掘隐含的类型学编码规则。其技术难点在于:需应对省略主语、倒装、拟声词等非规范表达;处理Drama与Comedy等类型强共现的多标签耦合;并克服领域迁移障碍——维基文本预训练模型在台词上性能骤降0.11。解决方案聚焦RoBERTa微调、类型感知注意力机制与标签平滑策略,兼顾小样本鲁棒性与业务可解释性,广泛适用于影视元数据标注、智能推荐系统及NLP教学实践。

weixin_33309048的博客 288

jquery无法获取到textarea中的值详解

问题描述: 今天在springboot中jquery读取前端的值通过jquery打包为json传入后端,发现其中textarea区域中的内容无法获取 解决办法: 首先看你的textarea中是否有 name属性和id属性 之后在对应的js文件中看看你的获取是否是.val()而不是.text() 验证 之后就可以刷新网页打开谷歌控制台,发现原来没有的Description出现了 ...

weixin_44575373的博客 2232

合宙Air780EP速连OneNET:AT+MQTT应用指南

本文详细讲解了合宙Air780EP使用AT指令通过MQTT接入OneNET的过程。

2401_82812461的博客 1388

K8s认证文件丢失的应急处理与恢复策略

本文详细介绍了Kubernetes(K8s)认证文件丢失时的应急处理与恢复策略。从快速诊断问题范围到不同场景的临时解决方案,再到深度恢复方案(无损重建、部分重置、完全重建),提供了全面的操作指南。同时强调了生产环境中的防丢失设计、高可用集群的特殊处理以及日常运维建议,帮助运维人员有效应对认证文件丢失的紧急情况。

weixin_33743248的博客 327

jQuery 获取不到 textarea,值为空问题

使用jQuery 的val(); 获取; 如: html: <textarea name="con" type="text" id="Rtest"></textarea> jq: var textarea = $("#Rtest").val();注意:一定要在html 中的textarea标签中加入 type="text" 这个属性,,不然就获取不到数据。 ...

罗小文 2341

哨兵1号回波数据(L0级)FDBAQ压缩算法详解

本文介绍哨兵1号用的FDBAQ算法,它实现非整数可变bit压缩,大部分数据仅需 3bit输出,少数高反射率数据需4bit输出,使得平均输出比特率刚超过3bit,比熵约束分块自适应量化 (ECBAQ)压缩算法所需的3.7bit更低。也就是说FDBAQ压缩完,除了要记录分块尺寸和各块的均值码(对应哨兵1号数据包里的THIDX)外,还需要记录霍夫曼码字的长度(对应哨兵1号数据包里的BRC)。唯一不同的就是量化后的编码规则使用了霍夫曼编码,相当于在传统的BAQ压缩流程的后面又加了一个步骤。

2302

使用kindeditor时,取不到textarea里面的值

认真找下原因。 首先描述下我这边KindEditor的错误现象: 1、在IE8/FF下均得不到值; 2、当点击KindEditor的全拼按钮切换到全屏模式输入时,再返回正常模式,可以得到值; 3、我用的是jQuery的点击事件提交表单的,提交,无法得到值; 4、直接用表单的提交按钮可以得到值。 下面以 KindEditor 4.x版本为例说明,先贴上正确的代码: KindEdit

iBenxiaohai123的博客 3826

【AI智能体】Spring AI Tool 从使用到实战详解

Spring AI Tool

congge 5864

适航规章、标准,书籍资料下载汇总(增加DO-160G中英文版)

很多读者之前问我有没有DO-160G的资源,现在终于找到啦!如果大家有其他想要的资源,可以在留言区告诉我,有空我会帮大家找找看~文末有下载链接:更新日志:2024-9-28:初版。2024-10-21:增加DO-330英文版PDF下载。2024-10-30:增加DO-160G中文版(非机翻)和英文版PDF下载。以下是一些收集到的适航相关的资料,分享给大家。(如果没有你想要的资料,请留言,等找到会及时更新!

qq_41854911的博客 2757

jquery无法获取kindeditor编辑器中textarea值的解决办法

jsp页面:    KindEditor.ready(function(K) {   K.create('textarea[id="content2"]', {    cssPath : '${pageContext.request.contextPath}/resources/kindeditor/plugins/code/prettify.css',    uploadJson : '${p

dzc__ze的专栏 2169

YOLOv8改进策略【卷积层】| TIP 2025 MFA 多阶段特征聚合 大核扩感受 + 多梯度融合,强效增强弱小目标特征

红外弱小目标尺寸极小、信噪比低,在特征传递中极易丢失信息;常规卷积感受野单一、梯度源不足,难以同时捕捉局部细节与全局上下文,导致小目标特征表达弱、检测漏检。因此提出多阶段特征聚合 MFA,用大核卷积+多分支+通道注意力强化小目标特征提取。

Limiiiing的博客 58

jquery取kindeditor插件的textarea的值

最近遇到的问题是使用kindeditor插件的时候用jquery取textarea的值用一般的   function xx(){ var content = $("#content").val();或者html(),Text() } 都是取不到textarea控件的值的  看了官网的使用方式,知道了怎么样的取值 var

对代码不满足,是任何真正有天才的程序员的根本特征。 2134

【第1章>第5节】SOM自组织映射网络的理论学习与MATLAB仿真

自组织映射网络(Self-Organizing Map,SOM)是一种无监督学习的人工神经网络,由芬兰学者Teuvo Kohonen于1981年提出,也被称为Kohonen网络。它的主要功能是将高维输入数据映射到低维(通常是二维)的离散网格上,同时保持输入数据的拓扑结构,即相邻的输入数据在映射后的网格上也相邻。

FPGA/MATLAB学习教程/源码/项目合作开发 401

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

获取 kindeditor 中textarea 的值

在使用kind Editor时,想要利用ajax传值,自动获取文章标签,发现文本编辑器在更新时可以用 $(“#editor”).html(); 获取文本内容,可是的创建时怎么也不能获取,利用FF的firebug查看到自己所写的内容在一个iframe中,于是想从iframe中获取文本,想要用 $(“ifame”).html();获取内容,可是依然不行,最终终于找到了解决

jacklong2的专栏 3629

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

jqury 如何获取 kindeditor 中textarea 的值

刚才看一屯。kindeditor 说的很清楚。是采用iframe 的编辑器 普通的jquery 获取肯定没有值 从网上找了一下JQ获取IFRMAE中的值才可以     在使用kind Editor时,想要利用ajax传值,自动获取文章标签,发现文本编辑器在更新时可以用 $(“#editor”).html(); 获取文本内容,可是的创建时怎么也不能获取,利用FF的firebug查看到自

Java18的专栏 1万+

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

KindEditor得不到textarea值的解决方法

首先描述下我这边KindEditor的错误现象: 1、在IE8/FF下均得不到值; 2、当点击KindEditor的全拼按钮切换到全屏模式输入时,再返回正常模式,可以得到值; 3、我用的是jQuery的点击事件提交表单的,提交,无法得到值; 4、直接用表单的提交按钮可以得到值。 下面以 KindEditor 4.x 版本为例说明,先贴上正确的代码:

为天空着色 2145

kindeditor 如何用jquery获取textarea 中的内容

<html> <head> <link rel="stylesheet" href="kindeditor/themes/default/default.css" /> <script charset="utf-8" src="kindeditor/kindeditor-min.js"></script> <script char...

qq_34297991的博客 362

kindeditor取不到textarea的值的解决办法

kindeditor取不到textarea的值的解决办法 在KindEditor的创建函数中添加 afterBlur : function() { this.sync(); return; } 例如: K.create('textarea[name="content"]', { themeType: 'simple', resizeType: 1, uploa

秋水之城 890

js提交表单kindeditor编辑器textarea为空解决办法

这个是kindeditor4.0以上版本的解决方法。 直接用表单的提交按钮&lt;input type=”submit” value=”提交” /&gt;可以得到值。 而通过js的 submit()提交则为空值,解决办法就是在初始化kindeditor时加入一行代码: afterBlur: function(){this.sync();} 这行代码的意思就是在textarea失去焦点...

meigus 419

kindeditor 一个页面多个编辑器

kindeditor 一个页面多个编辑器   你可以使用多个KE.show 那么代码可能会很多 下面用到了jquery 是不是简洁了很多呀。 {literal}        textarea { display: block; } function edit(text){      KE.show({ id : text, resizeMode

hhf1029的专栏 5530
上一篇: 将 Windows 的 thinkPHP 项目上传至 Linux 服务器遇到的问题及解决方法
下一篇: Unity 获取游戏对象详解
yibin94
博客等级 码龄11年 78粉丝 158原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值