Re: Accordion glyphs

Apr 8, 2014 at 1:54 PM
Does this (or any) version of bootstrap come with provision for putting little glyphs on the handle bar of an accordion (i.e. side arrow when it's closed, down arrow when it's opened)?

Apr 9, 2014 at 8:03 PM

I am pretty sure that B2 had an accordion component but B3 does not. There are some glyph icons though build into B3 in case you are looking for icons to help.

How are you planning to create the accordion list? Content search WP, content Query WP? LIst view with js link? My general suggestion would be to use one of the many jquery libraries for this, or build your own custom library as accordions are very simple.

Apr 9, 2014 at 10:24 PM
Edited Apr 10, 2014 at 12:03 AM

The most appropriate situation is a custom action in the Embed Group of the Insert tab, with a js link. It's intended to work (so far) only on HTML fields in Publishing pages
Apr 15, 2014 at 1:17 AM
The magic js snippet turns out to be:
var range = RTE.Cursor.get_range();
var mystuff = build_a_div_with_my_markup_in_it();
Apr 15, 2014 at 6:17 PM
Hi Josh,

I am confused how the JS you provided helped with adding the glyphs. It looks to me as though you are adding so content right before where the cursor is in a rich text editor, or before the highlighted content? Could you provide any more insight as to what you were attempting to do and how this code helped? That may help others come up with other useful solutions for their own projects based on your code.


Apr 15, 2014 at 6:37 PM

Sorry, you're right. I haven't addressed the glyph parts yet.
But once I do, I'll make the entire thing public somewhere (suggestions welcome)

The RTE seemed to be very sparsely documented - the best docs turned out to be the Sharepoint scripts in _layouts