Comments (5)
@StefanNeuser could you please provide more details on the code you're using there?
from vue-froala-wysiwyg.
Hi, sure! I'm using your plugin example to get into. What i'm trying is this:
// Add an option for your plugin.
$.FroalaEditor.DEFAULTS = $.extend($.FroalaEditor.DEFAULTS, {
myOption: false
});
// Define the plugin.
// The editor parameter is the current instance.
$.FroalaEditor.PLUGINS.myPlugin = function (editor) {
// Private variable visible only inside the plugin scope.
var private_var = 'My awesome plugin';
// Private method that is visible only inside plugin scope.
function _privateMethod () {
console.log (private_var);
}
// Public method that is visible in the instance scope.
function publicMethod () {
console.log (_privateMethod());
}
// The start point for your plugin.
function _init () {
// You can access any option from documentation or your custom options.
console.log (editor)
// Call any method from documentation.
// editor.methodName(params);
// You can listen to any event from documentation.
editor.events.add('contentChanged', function (params) {});
}
// Expose public methods. If _init is not public then the plugin won't be initialized.
// Public method can be accessed through the editor API:
// $('.selector').froalaEditor('myPlugin.publicMethod');
return {
_init: _init,
publicMethod: publicMethod
}
}
This first console.log ist working.
from vue-froala-wysiwyg.
Could you put together a quick repo that we could fork and check it?
from vue-froala-wysiwyg.
@StefanNeuser have you managed to fix this?
from vue-froala-wysiwyg.
froala_editor v3.1.1
I had the same problem. Analyzing the events object I noticed that it has only 'on'. It must be because of the version. The documentation froala should make this clearer, informing the version of when the 'add' method was introduced.
editor.events.on('paste.before', function (params) {
console.log(params);
})
from vue-froala-wysiwyg.
Related Issues (20)
- Use Vue Froala directly in HTML without build tools?
- change color will trigger focus event
- Error in mounted hook: "TypeError: this._$element.froalaEditor is not a function" when testing using jest
- Style not applied when adding columns to tables pasted in MS OFFICE document editor
- Issue of not being able to change font-related attributes at once when specifying multiple cells in the table
- Get Error in callback for watcher "value": "TypeError when loading text/edit existing content HOT 1
- Unable to get Editor Instance on Focus Event HOT 1
- When attaching a video, there is an issue where the cursor does not move when clicking the bottom of the video.
- vue-froala-wysiwyg with Typescript HOT 2
- Uncaught TypeError: Cannot read properties of null (reading 'parentElement')
- Returning a string from the 'paste.beforeCleanup' event is being ignored
- Allow local registration of plugin to avoid bloating main.js file HOT 1
- Issue in vue3 typescript setup HOT 2
- nuxt2 third party plugins image_tui doesn't work
- can't install package normally
- Vue2 froala error when package vue2-google-map is instaled.
- corejs2 dependency is hopelessly outdated
- Problem not changing when setting language in config HOT 1
- Illegal invocation Nuxt 2
- Unexpected scroll by Enter in long text HOT 2
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 vue-froala-wysiwyg.