We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Great little plugin! Worked like a charm for me.
Quick note, I'm not sure the purpose of line 66: if (0 === (e = this.$modal.find("#redactor-link-styles")).length)
if (0 === (e = this.$modal.find("#redactor-link-styles")).length)
Is that line checking for a different installed plugin?
Also, your label and select classes should be updated to: modal-link-text
modal-link-text
Otherwise, I have modified your init function to include injecting CSS:
// inject CSS, if classes set if(this.opts.linkClasses.length) { const style = document.createElement('style'); var classes = []; this.opts.linkClasses.forEach( function(e) { if(e.style !== undefined) { classes.push('.redactor-styles a.' + e.class + '{' + e.style + '}'); } }); // combine and remove comma in output style.textContent = classes.join(""); document.head.append(style); }
Which looks for an extra JSON element, such as: { "label": "Button (regular)", "class": "button", "style": "color: blue;" }
{ "label": "Button (regular)", "class": "button", "style": "color: blue;" }
Of course, the main style on the frontend is still needed (without the .redactor-styles portion).
.redactor-styles
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Great little plugin! Worked like a charm for me.
Quick note, I'm not sure the purpose of line 66:
if (0 === (e = this.$modal.find("#redactor-link-styles")).length)
Is that line checking for a different installed plugin?
Also, your label and select classes should be updated to:
modal-link-text
Otherwise, I have modified your init function to include injecting CSS:
Which looks for an extra JSON element, such as:
{ "label": "Button (regular)", "class": "button", "style": "color: blue;" }
Of course, the main style on the frontend is still needed (without the
.redactor-styles
portion).The text was updated successfully, but these errors were encountered: