Comments (2)
这个问题你解决了吗?还发现重新编辑之前的markdown的时候样式变成html样式了
from jpress.
经过调试发现原因是:
数据库中保持的是markdown 编译之后的文本,重新从数据库中获取后得到的调整后的html片段,所以加了
标签。
解决方法之一是:
在数据库中加一个字段保持编译之前的文本,在编辑态展示这个文本,就没有问题了。
步骤:
1、jpress_context 加一个字段,如 marked
2、修改代码BaseContent.java
public java.lang.String getMarked() {
return get("marked");
}
public void setMarked(java.lang.String marked) {
set("marked", marked);
}
3、
1)修改页面:_edit_include.html
2)修改页面:edit.html
function initMarkdownEditor(){
if("" != $('#content_marked').attr('value'))
{
$('#textarea').text($('#content_marked').attr('value'));
}
simplemde = new SimpleMDE({ element: $("#textarea")[0] });
}
function save(){
$('#content_slug').attr('value',$("#slug_text").text());
if("tinymce" == _editor){
tinymce.activeEditor.uploadImages(function(success) {
tinymce.triggerSave();
$('#content_marked').attr('value',"");
doSubmit();
});
}else{
$("#textarea").text(simplemde.markdown(simplemde.value()));
$('#content_marked').attr('value',simplemde.value());
debugger;
doSubmit();
}
return false;
}
from jpress.
Related Issues (20)
- bug:关于tag的问题 HOT 1
- docker 安装问题 HOT 1
- There is a storage XSS vulnerability in the template module HOT 1
- background XML entity injection vulnerability HOT 1
- 商品能给不同会员组设置不同价格,不能设置为0,即指定会员组商品免费 HOT 1
- jpress后台存在命令执行漏洞-模板修改 HOT 1
- jpress后台存在命令执行漏洞-恶意插件 HOT 1
- jpress后台存在命令执行漏洞-模板安装 HOT 1
- jpress后台存在命令执行漏洞-模板上传 HOT 1
- jpress后台存在命令执行漏洞-邮件模板article HOT 1
- jpress后台存在命令执行漏洞-邮件模板page HOT 1
- jpress后台存在命令执行漏洞-邮件模板product HOT 1
- jpress前台存在任意文件上传漏洞 HOT 1
- 请问一下修复模板引擎注入造成的 RCE 的这个漏洞里面,是用了哪种修复方式呀 HOT 1
- 自定义域名时,从后台无法直接访问文章
- jpress后台模板-板块存在存储型XSS HOT 1
- jpress存在反射型XSS
- 使用Nginx反向代理到jpress服务无法自定义域名访问 HOT 1
- jpress 本地tomcat启动 文件无法正常上传 HOT 1
- docker部署问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpress.