Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/Haixing-Hu/vue-html-editor
A Vue.js component implementing the HTML editor with the jQuery summernote plugin.
The demo page is HERE.
^0.12.0
^0.6.16
$ npm install vue-html-editor
$ bower install vue-html-editor
The HTML snippets are as follows:
<div class="container" id="app">
<vue-html-editor name="html-editor" :model.sync="text"></vue-html-editor>
<div style="margin-top:40px">
<div> The HTML contents are as follows:</div>
<hr>
<div >{{{text}}}</div>
</div>
</div>
The Javascript snippets are as follows:
var Vue = require("vue");
var vm = new Vue({
el: "#app",
components: {
"vue-html-editor": require("vue-html-editor")
},
data: {
text: "Hello World!"
}
});
model
The model bind to the control, which must be a two way binding variable.
Note that the value of model could be set to null
, and in that case the
text content of the editor will be set to an empty string. While, if the text
content of the editor is set to empty, the value of the model will be set to
null
instead of an empty string.
language
The optional code of language used by the summernote plugin. Default value is 'en-US'
.
Note that the language code passed to this property must be a language code together
with a country code. This limitation is due to names of the i18n localizaiton files
of the summernote plugin.
height
The optional height of the HTML editor, in pixels. Default value is 160.
minHeight
The optional minimum height of the HTML editor, in pixels. Default value is 160.
maxHeight
The optional maximum height of the HTML editor, in pixels. Default value is 800.
name
The optional name of the textarea control.
toolbar
The optional configuration of toolbar of the HTML editor. This value will be passed to the constructor of the summernote directly. Default value is as follows
[
["font", ["bold", "italic", "underline", "clear"]],
["fontsize", ["fontsize"]],
["para", ["ul", "ol", "paragraph"]],
["color", ["color"]],
["insert", ["link", "picture", "hr"]]
]
control
This property is a reference to the JQuery selection of the base texearea
control. It could be used to call the APIs of summernote. For example,
editor.control.code(val)
will set the HTML content of the editor to the
specified value, where editor
is the reference to the vue-html-editor
component.
dev
: git branch my-new-topic origin/dev
git commit -am 'Add some topic'
git push origin my-new-topic
dev
branch of Haixing-Hu/vue-html-editor
repository !First you should install all depended NPM packages. The NPM packages are used for building and testing this package.
$ npm install
Then install all depended bower packages. The bower packages are depended by this packages.
$ bower install
Now you can build the project.
$ gulp build
The following command will test the project.
$ gulp test
The following command will perform the test and generate a coverage report.
$ gulp test:coverage
The following command will perform the test, generate a coverage report, and upload the coverage report to coveralls.io.
$ gulp test:coveralls
You can also run bower install
and gulp build
together with the following
command:
npm run build
Or run bower install
and gulp test:coveralls
together with the following
command:
npm run test
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.