Problem/Motivation

The ckeditor CodeSnippet plugin forces code blocks (doesn't allow simple inline code tags.

Adding simple code tags in the content requires editing the source.

The CKEditor Code tag plugin alleviates this by providing a simple button to wrap text in code tags.

Proposed resolution

Add support for the ckeditor Code tag plugin. Though perhaps not within the original scope of this module, it seems fitting to add Code tag as another way of marking up code, and a separate module is unnecessary.

User interface changes

Would make a new editor button available on the text formats configuration pages.

CommentFileSizeAuthor
#12 error.png27.85 KBkevinquillen
#3 2765899-code-tag-plugin-0.patch3.67 KBkentr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kentr created an issue. See original summary.

kentr’s picture

Issue summary: View changes
kentr’s picture

kentr’s picture

Status: Active » Needs review
kevinquillen’s picture

Version: 8.x-1.4 » 8.x-1.x-dev
Assigned: kentr » kevinquillen

  • kevinquillen committed 8a93301 on 8.x-1.x authored by kentr
    Issue #2765899 by kentr, kevinquillen: Add support for Code tag plugin
    
kevinquillen’s picture

I think it should be its own module.. that way people who just want inline code don't need the rest of it, and vice versa. But since it has 0 configuration, it is fairly innocuous and can be included here for the time being.

kevinquillen’s picture

Tested, and working. A follow up issue will be posted about amending the install file.

kevinquillen’s picture

Status: Needs review » Fixed
kevinquillen’s picture

kevinquillen’s picture

This now creates a concrete dependency on both plugins, because enabling CodeSnippet triggers the code tag plugin as well, and without the JS files, the format page can break.

Even though it is very small, I think it is best to encapsulate it to it's own module.

kevinquillen’s picture

FileSize
27.85 KB

Attaching pic of error if code tag was not downloaded.

kevinquillen’s picture

Ok, I just extracted and created it as a separate module as to not burden people who just want one and not the other. I can make you a maintainer if you like.

https://www.drupal.org/project/codetag

kentr’s picture

Oh... It didn't occur to me that Drupal would try to load the js. That's in the editor admin page, right?

Sure, I'll be a maintainer of the other one.

kevinquillen’s picture

Added you to CodeTag.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.