富文本编辑的内容导出为word

1、集成富文本编辑器,博主,采用ckeditor

引入相关的jar包


            cn.afterturn
            easypoi-base
            3.2.0
        
        
            cn.afterturn
            easypoi-annotation
            3.2.0
        

2、封装工具类

package top.cfl.cflwork.util.excel;

import cn.afterturn.easypoi.word.WordExportUtil;
import cn.hutool.core.lang.Assert;
import org.apache.poi.poifs.filesystem.DirectoryEntry;
import org.apache.poi.poifs.filesystem.DocumentEntry;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.xwpf.usermodel.XWPFDocument;

import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet

你可能感兴趣的:(java后台,word,java导出word,ckeditor)