Comments (8)
Yes, this should definitely be possible.
The modular architecture will make this rather easy too.
from vue-wysiwyg.
I checked the sources but still unsure how to achieve that.
@chmln any pointers?
from vue-wysiwyg.
Some news about that ?
I would like to create my own modules (for toolbar buttons), but I dont see how to do it nicely.
from vue-wysiwyg.
@chmln cool. Can you please provide usage example?
from vue-wysiwyg.
@chmln why did you close the issue? Thinking a show HTML button would be very useful and was going to add as a custom element. Also wanted to add icons as a custom element. Any way to currently do this??
from vue-wysiwyg.
@mycarrysun look at e2c3d9b#diff-39e1dfe7260adc0ef53ec43cb1f8e58cR1
from vue-wysiwyg.
I dont understand how to set the method that will be called from the customModule. This is my code:
customModules: [{
title: "Fullscreen",
icon: "+",
customAction() {
console.log("customAction ")
}
}]
It does not work. Can you explain me how? I want to set the editor in fullscreen.
from vue-wysiwyg.
This is all I did to create a custom module:
Vue.use(wysiwyg, {
customModules: [{
title: 'moduleTitle',
icon: 'ICON', // an SVG will suffice
customAction(utils) {
return [['insertHTML', `<span class="custom-class">${utils.getHTMLOfSelection()}</span>`, true]]
}
}]
})
My only issue right now is having it remove the span
. Because it inserts HTML, it will probably need to be expanded upon to check if the highlighted selection already contains the element we're about to add, and remove it if necessary.
from vue-wysiwyg.
Related Issues (20)
- Localization: missing translations HOT 1
- wysiwig editor can't handle :value HOT 2
- Locales not working HOT 4
- Bug Fixes on The Master/Release HOT 1
- Add header token to request
- Using wysiwyg component locally HOT 1
- Clear format does not work HOT 3
- Open Link in new Tab HOT 2
- insert or edit raw html code HOT 1
- Compatibility with vuejs3 ?
- Moving the project forward HOT 2
- New table form rows and cols inputs doesn't work HOT 1
- How to test the build local
- I would like to be able to pass tabindex in
- Editor Doesn't Get Focus Back After Clicking Button
- Nuxt support HOT 1
- Cannot add a rows and cols table
- restrict tags
- Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c') HOT 2
- Disable/Readonly Textarea
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-wysiwyg.