Bold Minded

Wyvern

Requirements

  • ExpressionEngine 2.1.3 or greater
  • PHP 5
  • Pages, Structure, Taxonomy, or NavEE module to use the Pages Link feature
  • CKeditor package

Installing Wyvern

CKeditor is not packaged with Wyvern. There are 1450 reasons why. After installing and enabling the Fieldtype and Extension, you will need to install CKeditor itself:

  1. Go to http://ckeditor.com/download and download the latest .zip or tar.gz file.
  2. After unzipping the file you will have a folder ckeditor.
  3. Place the ckeditor folder into /themes/third_party/ (screenshot)

Adding 3rd Party Plugins (after version 1.2.7)

Place your CKeditor plugin inside the /themes/third_party/wyvern/plugins/ folder. In the ExpressionEngine control panel go to Add-ons » Fieldtypes » Wyvern and select your plugin in the multi-select menu to enable it.

Adding 3rd Party Plugins (prior to version 1.2.7)

Wyvern supports 3rd party plugins for CKeditor such as Channel Images and Flickr for ExpressionEngine. Installation can be done in a few easy steps.

  1. Edit the third_party/wyvern/config.php file, and at the bottom of the $config['toolbar_buttons'] array, add the name of the plugin with the value set to yes (Examples are included for ChannelImages and Flickr).
  2. Go to Add-Ons > Fieldtypes > Wyvern, and in the Extra Plugins field enter a comma separated list of the plugin names you are adding.
  3. On the same page, you should see new toolbar button options from the additions to the $config array. Edit and save your toolbars and add the plugin buttons as necessary.

Adding buttons to the toolbar

By default, Wyvern intentionally comes with a limited set of CKeditor buttons in the Fieldtype settings page. I have chosen to keep the default list to the essentials for simplicity. If a button you need is not found in the Toolbar list, open the system/expressionengine/third_party/wyvern/config.php file. You will see an array which defines the default list, as well as the rest of the available CKeditor buttons, which are commented out. To enable a button, simply remove the code comment prior to that button. Go back to the Add-ons > Fieldtypes > Wyvern page and the button will be available within the Toolbar list.

Google Fonts and Typekit

After entering your Google Font and/or Typekit ID insto the fieldtype settings you will need to add the styles to your wysiwyg.css file as indicated below.

Adding Custom Styles

The first 2 options in the Wyvern Fieldtype settings let you define the path to a custom JavaScript and CSS file. The paths are automatically filled in for you after installation and point to the wysiwyg.js and wysiwyg.css located within your /themes/third_party/wyvern/ folder. These files contain an example, and usable starting point for you to add custom styles.

The wysiwyg.css and .js files should contain the same styles. Whatever is defined in wysiwyg.js is what will appear in the Styles drop down menu in the Wyvern field.

wysiwyg.js

CKEDITOR.addStylesSet('wyvern', [
    { name: 'Paragraph', element: 'p' },
    { name: 'Heading', element: 'h4' },
    { name: 'Image on left', element: 'img', attributes: { 'class': 'float_left' }},
    { name: 'Image on right', element: 'img', attributes: { 'class': 'float_right' }},
]);

wysiwyg.css

img.float_left {
    float: left;
    margin: 0 1em 1em 0;
}

img.float_right {
    float: right;
    margin: 0 0 1em 1em;
}

If you use custom styles heavily it is recommended to move the wysiwyg.css and .js file to another location within your project, then change the fieldtype settings paths accordingly. Doing this will prevent the files from be overwritten when you upgrade Wyvern.

For more information see the CKeditor documentation on custom styles.


Change Log

Subscribe

Version 1.4.1

    • Fixed HTML encoding issue when used within a Matrix field.
    • Small display fix to the toolbar when used within a Matrix field.
    • Fixed bug where Wyvern tried to load the Wyvern Video plugin when Wyvern Video is not installed.

Version 1.4

    • Moved settings to module page.
    • Fixed link issue with NavEE pages in the link dialog.
    • Added support for Wyvern Video.

Version 1.3.4

    • Fixed a bug in the default link type setting.
    • Fixed a bug with the new EE 2.4 upload preferences.
    • Added unique body ID to each field's CKeditor iframe.

Version 1.3.3

    • Fixed possible issues with toolbar saving.
    • Fixed possible issues with .htaccess files and index.php removal.

Version 1.3.2

    • Fixed a bug with the new Extra Config option that caused CKeditor not to load. Highly recommended upgrade.

Version 1.3.1

    • Fixed a couple of IE related bugs.
    • Removed the following two options as defaults in config.js: "pasteFromWordPromptCleanup: true" and "forcePasteAsPlainText: true". Please move these to the Extra Config option in the Fieldtype Settings. New installations will default to these values.

Version 1.3

    • Added support for Google Fonts.
    • Added support for Typekit.
    • Added new setting to easily add and manage CKEditor configuration options.
    • Fixed IE 7 JavaScript error.

Version 1.2.7.2

    • Minor adjustment to fix a character encoding issue.

Version 1.2.7.1

    • Fixed a PHP notice error.

Version 1.2.7

    • Changing upload directory options to radios if the default File Manager is selected. It doesn't allow multiple specific directories right now, only Assets does.
    • Revised the UI a bit when used inside of a Matrix cell.
    • Removed option to use the default File Manager when Wyvern is not in the Publish page (specifically in Low Variables). The necessary JavaScript is not loaded, thus the File Manager can not work outside of the Publish page at all. It's suggested to not include the File Manager button in the toolbar at all if using the default File Manager. These changes do not apply if you are using the Assets module.
    • Fixed Low Variables configuration settings page. Wyvern settings now display properly.
    • Cleaned up the UI when used inside of Low Variables.

Version 1.2.6

    • Improved loading of 3rd party plugins for CKeditor. You no longer need to modify the config.php file or manually type in the plugin's name.
    • Fixed a bug where the addons library was not loading and throwing an error in the helper class.

Version 1.2.5.1

    • Fixing path issue when site_url did not have a trailing slash, which would prevent toolbar configurations from saving.

Version 1.2.5

    • No longer supporting the "Images inside p tags" feature. Find out why.
    • Moved all private methods in the ft.wyvern.php file to an external helper class.
    • All template and page (Structure, Taxonomy, NavEE) links now load via an ajax request after the CKeditor dialog window displays.
    • ** Please be sure to go to your Modules page and click

Version 1.2.4.2

    • Fixed PHP notices.
    • Fixed upload directory settings. Does not use last field's settings for all fields on the page.
    • Fixed new File Manager enhancements compatibility with Matrix.

Version 1.2.4

    • Added option for RTL text.
    • Added support for Taxonomy 2.0 (still supports 1.x).
    • Added support for Assets.
    • Added support for the new File Manager.
    • Added option to choose what the default link type is in the Link Dialog.
    • Added option to choose which file manager to use for the Wyvern instances.
    • Added option to restrict which upload directories are accessible in each Wyvern instance.
    • Removed duplicate queries.
    • Improved install process. Default settings are now set to avoid some common JavaScript errors.
    • Added support for code and pre tags with CKeditor. EE code within these tags will not be parsed. Deprecating the "Encode EE Tags" setting. Set "Encode EE Tags" to "No" when using code or pre tags.

Version 1.2.3

    • Added display border to span tags.
    • Added error checking to make sure your ckeditor folder is installed correctly.
    • Greatly improved toolbar configuration design and usability.
    • Improved "image outside of

      tag" handling.