Coder Social home page Coder Social logo

pkerspe / ckeditor-bootstrap-accordionlist Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 4.0 54 KB

A plugin for ckeditor to allow creation of bootstrap accordion list (grouped collapsible items)

License: GNU General Public License v3.0

JavaScript 100.00%

ckeditor-bootstrap-accordionlist's People

Contributors

nullisnot0 avatar peterhebert avatar pkerspe avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ckeditor-bootstrap-accordionlist's Issues

Allow 'a' and 'img' html tags in AccordionList

To allow a and img tags in AccordionList change Line 14 in plugin.js from:

allowedContent: 'div(!collapsible-item*,panel*,collapse)[*];h4(!collapsible-item*,panel*)[*];a(!collapsible-item*,panel*,collapsed,pull-right*)[*];p;br;ul;ol;li;strong;em;u;table[*];tbody;theader;tr;td;th;hr;a;a(!href,*)[*];span(*)[*]'

to:

allowedContent: 'div(!collapsible-item*,panel*,collapse)[*];h4(!collapsible-item*,panel*)[*];a(!collapsible-item*,panel*,collapsed,pull-right*)[*];p;br;ul;ol;li;strong;em;u;table[*];tbody;theader;tr;td;th;hr;a;a(*)[*];span(*)[*];img(*)[*]'

No button on CKEditor in Drupal

Hi.

I'm not in ckeditor API, but I found out that I need to add the following code in order to show the button on ckeditor cdn 4.7.3 under drupal module:

In plugin.js after this line:
init: function (editor) {
add
var lang = editor.lang.collapsibleItem; editor.ui.addButton('accordionList', { label: lang.buttonTitle, command: 'accordionList', icon: this.path + 'icons/accordionlist.png' });
sorry if this is not the way to do it, but here is the solution i found for my problem.

Allowed content issue

Hi. Some strange bug.
1- insert accordion widget + collapsable items save - it works good
2- open editor and save again and got unneeded html like this

<div class="accordion-list">
<div aria-multiselectable="true" class="accordion-list-group accordion-list-items panel-group" id="accordion1506542607046" role="tablist">
<div class="collapsible-item panel panel-default" id="Collapsible1506542661001">
<div class="collapsible-item-heading panel-heading" id="headingCollapsible1506542661001" role="tab">
<h4 class="collapsible-item-title panel-title">

/unneeded/
<a aria-controls="collapseCollapsible1506542661001" aria-expanded="false" class="collapsed collapsible-item-title-link-icon" data-parent="#accordion1506542607046" data-toggle="collapse" href="#collapseCollapsible1506542661001" role="button"><em>&nbsp;</em></a>
/unneeded/

<a aria-controls="collapseCollapsible1506542661001" aria-expanded="false" class="collapsed collapsible-item-title-link" data-parent="#accordion1506542607046" data-toggle="collapse" href="#collapseCollapsible1506542661001" role="button">Title Text</a></h4>
</div>



<div aria-labelledby="headingCollapsible1506542661001" class="collapse collapsible-item-collapse panel-collapse" id="collapseCollapsible1506542661001" role="tabpanel">
<div class="collapsible-item-body panel-body">
<p>Body Text</p>
</div>
</div>
</div>

Can't figure that wrong. Collapsable item out of accordion work fine.
Also I have more then one editor on the page.

Clickable Link for Phone

I'd like to generate a Link for Smartphone like.

Telefon: 08321 78 660 20

On CK Editor this is working. But AccordionList ist removing this Link by reopening. In AccordionList are only http, https, news and ftp possible.

Where is this possible to change?

accordionlist

On Cmsimple XH 1.6.10 (sourceforge - portable - no mysql-base) with ckeditor 4.62 it generates me
a div accordion-list and another div with aria-multiselectable="true" class="panel-group accordion-list-group accordion-list-items" id="accordion1500990966586" role="tablist">

after saving the code the site is unaccessible(bottstrap css and js are loaded. Bottstrap-grid and bootstrap-button work fine - bootstrap collapse doesnt either

https://codepen.io/rugor/pen/hwyzn functions

how to install

  1. CKE builder version is broken, no icons.
  2. How to install manually:
    a) plugin/accordianList (?) (directory name)
    b) config > extraplugins: accordianList (?)
    c) custom menu > what is a name fo button?

image

Answers:

  • github version is not working for me. Only version from CKEditor website named 0.4 version

a) accordionList
b) accordionList
c) AccordionList

Change allowedContent to allow links in Content

Allowed content should be:

allowedContent: "div(!collapsible-item*,panel*,collapse)[*];h4(!collapsible-item*,panel*)[*];a(!collapsible-item*,panel*,collapsed)[*];span(!glyphicon*)[*];p;br;span[*];ul;ol;li;strong;em;u;table[*];tbody;theader;tr;td;th;hr;a;a[*];"

filename of button icon doesn't match declaration in plugin.js

The plugin declares the icon name in lower case:
icons: 'accordionlist',
however, the filename of the main icon is in a camel case: icons/accordionList.png
This is causing a 404 error on the file and the icon does not appear on the button in the ckeditor
missing-button
Either the file should be renamed to 'accordionlist.png', or the icon declaration changed to 'accordionList' in plugin.js - line 3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.