-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow ability to hide/disable specific button actions #3
Comments
I am not clear with the issue. Please go through the plugin usage in the documentation to understand how to setup and use the plugin. |
I have read the documentation before setup but it still does not work. I need only disable emojis and export. Html file only with editor (copied from readme) <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css">
<link href="css/markdown-editor.min.css" media="all" rel="stylesheet" type="text/css"/>
<link href="plugins/highlight/highlight.min.css" media="all" rel="stylesheet" type="text/css"/>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="http://twemoji.maxcdn.com/2/twemoji.min.js?11.0"></script>
<script src="plugins/purify/purify.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-deflist.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-footnote.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-abbr.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-sub.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-sup.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-ins.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-mark.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-smartarrows.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-checkbox.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-cjk-breaks.min.js" type="text/javascript"></script>
<script src="plugins/markdown-it/markdown-it-emoji.min.js" type="text/javascript"></script>
<script src="plugins/highlight/highlight.min.js" type="text/javascript"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.bundle.min.js" type="text/javascript"></script>
<script src="js/markdown-editor.min.js" type="text/javascript"></script>
<script src="js/locales/en.js" type="text/javascript"></script>
<script type="text/javascript">$(function () {
$("#textarea-id").markdownEditor({
enableEmojies: false,
dropUp: {
export: false
}
});
});</script>
</head>
<body>
<textarea id="textarea-id"></textarea>
</body>
</html> |
Initialize the plugin on |
Already is initialized and all is loaded <script type="text/javascript">$(function () {
$("#textarea-id").markdownEditor({
enableEmojies: false,
dropUp: {
export: false
}
});
});</script> |
Am not able to reproduce any issues with this - could you please create a JS Fiddle for this and share? That may help you narrow down to the problem. |
Is it fixed? |
Sorry - not got a time to check this. Will check and update. |
The recommended method to hide or show only your own toolbar buttons is to actually override However I will record an enhancement to see if this can be done better. |
Ok I added in an enhancement. You can hide specific button actions in the toolbar via new property $(function () {
$("#textarea-id").markdownEditor({
hiddenActions: ['emoji', 'export']
});
}); |
Thanks |
How disable plugins?
jQuery v2.2.4 Also tested with latest jQuery but no changes
This doesn't work
The text was updated successfully, but these errors were encountered: