Git Product home page Git Product logo

Comments (5)

marx828 avatar marx828 commented on June 15, 2024

我这个就是想做校验,但是没办法取到文本框的内容,急急急!!!

from vue-wangeditor-simple.

Weeken avatar Weeken commented on June 15, 2024

你想怎么取?取哪部分的内容?包括HTML标签吗?可以贴贴代码看看吗?

from vue-wangeditor-simple.

marx828 avatar marx828 commented on June 15, 2024

就是只取文本框中的text,不包含html。我看wangeditor的官网文档中是支持获取的,他是这么获取的:

var E = window.wangEditor
var editor = new E('#div1')
editor.create()

document.getElementById('btn1').addEventListener('click', function () {
    // 读取 html
    alert(editor.txt.html())
}, false)

document.getElementById('btn2').addEventListener('click', function () {
    // 读取 text
    alert(editor.txt.text())
}, false)

from vue-wangeditor-simple.

Weeken avatar Weeken commented on June 15, 2024

好了,你下载最新的包吧,已经添加了这个功能

from vue-wangeditor-simple.

marx828 avatar marx828 commented on June 15, 2024

好的,非常感谢

from vue-wangeditor-simple.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.