Jump to content
ryan

Module: CKEditor

Recommended Posts

On 10/9/2016 at 9:26 AM, cappuccino said:

Is there a possibility to add a definition list?

I don't think ckeditor natively supports definition lists, and they would be hard to implement because of the structure.

If I needed to support definition list for PW, these would be the options i would consider:

1) have somewhere on the editor where users can define the definition lists, for example a repeater with a text area and a field for the reference name of the list. Then they would title their list and in the textarea would add term/description pairs with some delimiter like a pipe. then in the editor they would put in a token to represent the definition list, like {{definition-list-1}}.

Then on output of the body field you would need to setup search/replace array for each defined list in the repeater and then do your string replacement of the body field.

2) Similar to above but using ProFields table within your repeater, allowing you to have separate inputs for the term and description.

3) If you were doing complex definition lists with multiple terms or descriptions for each list item, you might be able to use the structured data or yaml modules for more complex structures...

 

 

Share this post


Link to post
Share on other sites
8 hours ago, Macrura said:

I don't think ckeditor natively supports definition lists, and they would be hard to implement because of the structure.

Definition lists have been a "confirmed new feature" for 9 years now. I wouldn't hold my breath ;)

Anyway, just wanted to stress that if you need definition lists, those alternative approaches provided by @Macrura above are worth considering.

Share this post


Link to post
Share on other sites

Thanks a lot for your help!

The plugin works great but unfortunately I have in my defintionlist a bullet list. Like this:

<dl>
<dt>Begriff</dt>
 <dd>
      <ul>
        <li>Stickwort 1</li>
	<li>Stichwort 2</li>
      </ul>
  </dd>
</dl>

... and this doesn't work and I have no idea how I should adapt the plugin. So I think I have to try Macrura's solution :).

Share this post


Link to post
Share on other sites

What should be the output?

Maybe like this:

<dl>
<dt>Begriff</dt>
 <dd>
    Stickwort 1<br />
	Stichwort 2
  </dd>
</dl>

or

<dl>
<dt>Begriff</dt>
 <dd>
    Stickwort 1
	Stichwort 2
  </dd>
</dl>

You can manipulate the output with a textformatter (hooking into the render function).

Share this post


Link to post
Share on other sites

When adding a caption to an image, the image width and the caption itself get as small as possible in the editor. In the frontend everything looks ok.

Is it a known bug? Where do I have to look for an answer?

Edit_Page__Waarom_marketeers_meer_risico_lopen_op_stress_en_burn-out_•_huskymarketingplanner_com.png

Share this post


Link to post
Share on other sites

little Problem...
i want use a Global config.js for my site.
I make the file: /site/modules/InputfieldCKEditor/config.js but this takes no effekt.

my content of the file:

CKEDITOR.editorConfig = function( config ) {
	config.justifyClasses = [ 'left', 'center', 'right', 'justify' ];
};

If I make a File only for my body-field with the same Content like the config.js it works 

why does the config.js fails ?
why does the config-body.js workss ?
what can i do to work with the config.js

Sorry for my Bad English

Share this post


Link to post
Share on other sites
1 hour ago, mr.mc.mauser said:

I make the file: /site/modules/InputfieldCKEditor/config.js but this takes no effekt.

A file config-body.js is included by default to demonstrate how you can create config files that target individual fields. If you want the global config.js to affect the body field you must delete (or rename) config-body.js

  • Like 1

Share this post


Link to post
Share on other sites

Hi,

since I have installed PW 3.0.88 with new CKEditor the Toolbarbuttons Paste from Word/PlainText don´t work anymore. It says "Your browser does not allow you to paste plain text this way. Press Ctrl+Shift+V to paste.". This seems to be a problem since CK Version 4.7/4.8.

Is there any solution to that?

Thanks for help!

Share this post


Link to post
Share on other sites
On 1.2.2017 at 2:01 PM, mds said:

When adding a caption to an image, the image width and the caption itself get as small as possible in the editor. In the frontend everything looks ok.

Is it a known bug? Where do I have to look for an answer?

 

Hi @mds,

it´s a little bit tricky, I had that too in the front- and backend - for the editor you will find a css in: /wire/modules/Inputfield/InputfieldCKEditor/contents.css.  My solution was to comment out the width:

figure {
    display: table;
    /*width: 1px; */
    margin: 1em 0;
}

But note, if you make an update, this change may be gone! So check, if you can define this css for figure on a custom css file or directly in the site-source.

best regards

Share this post


Link to post
Share on other sites

Processwire 3.0.98 with Form Builder 0.3.4 trying to add CKEditor 4.8.0 to form...

When pwlink and pwimage are enabled, there are 404 "File Not Found" errors when displaying the CKEditor:

404 /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.8.0/plugins/pwimage/plugin.js
404 /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.8.0/plugins/pwlink/plugin.js
error on line 98 of /wire/modules/Inputfield/InputfieldCKEditor/ckeditor-4.8.0/ckeditor.js

Moving the directories works, or manually commenting out the settings.
Looks like the InputfieldCKEditor.module is conditionally removing the two configs...

if($this->hasFieldtype === false) {
            // not applicable when no page attached
            unset($settings['pwlink'], $settings['pwimage']); 
            unset($settings['plugins']['pwlink'], $settings['plugins']['pwimage']);
        }

...but there are errors when using pwlink and pwimage buttons.

CKEditor pwimage and pwlink use a modal that works in admin/ but not on front-end

Share this post


Link to post
Share on other sites

Whenever I try to modify the Multilanguage textarea fields to a multilanguage CKEditor field or create a new multilanguage CKEditor field in a Table field, I cannot use the field because it gives me the following error:

14b6811326a873a672c417ff73d83ed5.png

844b6c95fe433df8b5b9a81c8d34e9e0.png

Settings are all set (see image above) and I don't know where to look else. Also, when I modified the original field (which goes flawless for other field somewhere else) I lost all the data that was in there. How can I fix this and use the field?

Share this post


Link to post
Share on other sites

Unless you do not have a CKEditor field named "1" you'll have to specify the name of an existing textarea field (using CKEditor) at settingsField. If your reference field is named bodytext, it would be:

settingsField=bodytext

 

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, Autofahrn said:

Unless you do not have a CKEditor field named "1" you'll have to specify the name of an existing textarea field (using CKEditor) at settingsField. If your reference field is named bodytext, it would be:


settingsField=bodytext

 

Thanks, that did the job. It's not clear though, also could not find anything about it

Share this post


Link to post
Share on other sites
1 minute ago, Harmen said:

It's not clear though, also could not find anything about it

TextArea fields using the CKEditor require a comprehensive configuration. I order to not duplicate this configuration for any CKEditor used in compound fields like tables, they require to reference an existing field (the settingsField) from where this configuration is taken.

What version of PW/ProFields are you running? Normally the description is right beneath the settings field:

CkeditorSettings.thumb.jpg.4bd609b5d0476fd66b5263ef22201162.jpg

Share this post


Link to post
Share on other sites
3 minutes ago, Autofahrn said:

What version of PW/ProFields are you running?

PW: 3.0.39 Should probably update this soon

ProField Table: 0.1.4

Share this post


Link to post
Share on other sites
3 minutes ago, Harmen said:

PW: 3.0.39 Should probably update this soon

can't agree more... 😉

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...