Comments (10)
A basic idea behind why it's not incorporated yet is that if you want to deactivate the plugin, better would be not to include the plugin's JS file at all
from medium-editor-insert-plugin.
The reason I need it is so I can toggle editing programmatically. Not sure how I would do that with the present code. Any suggestions?
from medium-editor-insert-plugin.
You can try to extend $.fn.mediumInsert.insert.init() function to delete previously created placeholders. And then toggling the plugin would look like setting $.fn.mediumInsert.settings.images and $.fn.mediumInsert.settings.maps to false and then rerunning $.fn.mediumInsert.insert.init().
I don't know. I didn't try to program it. It's only my suggestion from looking on the code.
from medium-editor-insert-plugin.
I'm running into this problem as well. This plugin doesn't work well if you can't toggle between edit mode.
There needs to be a simple .deactivate() method like medium-editor has.
from medium-editor-insert-plugin.
@orthes Wish I could tackle this but I don't think my JS chops are up to it.
Would it make sense to have a function that delegates to all other functions if the plugin is enabled and is a noon if it's not? Then you wouldn't need to bind/rebind events.
from medium-editor-insert-plugin.
I'm working now on a way to disable the plugin. Expect the first solution soon.
from medium-editor-insert-plugin.
So here it is, added disable/enable methods: fcaa216
You can call them like this:
$(element).mediumInsert('disable');
Another nice feature is, that they are both connected to Medium Editor's own activate/deactivate functions. So if you deactivate the editor, the plugin is deactivated too. This also applies for activation.
from medium-editor-insert-plugin.
Awesome! Thanks a lot! 👍
from medium-editor-insert-plugin.
fantastic, thanks.
from medium-editor-insert-plugin.
Is there a way we can disable just the adding of more images, but retain the functionality to keep editing existing images? Thanks! :) (Sorry, I know this is insanely old, but seemed the most appropriate place to ask.)
from medium-editor-insert-plugin.
Related Issues (20)
- Cannot choose order of image styles buttons
- Don't work when MediumEditor is not defined globally HOT 1
- Trigger image upload with custom button HOT 1
- insert plus at wrong position after page is scrolled (V2) HOT 1
- Are there any way to add more field beside caption when we click the embedded image ? HOT 1
- Package vulnerability warnings HOT 3
- How i can use with nuxt ?
- The + button position break when apply to bootstrap column.
- net::ERR_CERT_COMMON_NAME_INVALID HOT 2
- Youtube video import no longer works HOT 2
- Delete text action (backspace button) on empty field broken HOT 1
- base64 issue ?
- i am getting one problem that is i am not able to configure npm package medium-editor-insert plugin into Angular 8. can you please help me in this HOT 1
- Base64 image content's "+" plus get replaced by space
- About MediumInsert cannot init
- How can i parse link when paste in editor without parseOnPaste option
- adding image to the medium Editor
- I want some help
- Upload function override
- Addon not working other than youtube
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 medium-editor-insert-plugin.