Skip to content
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

Add tooltip to Custom Insert button #782

Merged
merged 3 commits into from
Jan 11, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/modules/PublicLab.CustomInsert.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ module.exports = function CustomInsert(_module, wysiwyg) {
}
});
const builder = require("./PublicLab.CustomInsert.Template.js");
$('.wk-commands').append('<a class="woofmark-command-insert btn btn-outline-secondary" data-toggle="Insert" title="Custom Insert"><i class="fa fa-tags"></i></a>');

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, just a little change here, line 70 shouldn't be a blank line. That's where the code additions should start.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Is the new commit better?

Copy link
Collaborator

@NARUDESIGNS NARUDESIGNS Jan 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Well done 🥳
cc @TildaDares

$('.wk-commands').append('<button class="woofmark-command-insert btn btn-outline-secondary" data-toggle="insert" title="Custom Insert"><i class="fa fa-tags"></i></button>');

$(document).ready(function() {
$('[data-toggle="insert"]').tooltip();
});

var Option1 = "Notes";
var Option2 = "List";
$('.woofmark-command-insert').attr('data-content', builder);
Expand Down