File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed
Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 11/**
2- * Fix icon in October v2.
3- * TODO: there may be a cleaner way to do this if we figure out a way to hook into the "backend-component-richeditor-document-connector" Vue component.
2+ * "newspaper-o" icon is not in the octo-icon webfont yet, so let's use the legacy one
3+ * for this bogous auto-generated name that will probably not be taken by anyone else.
4+ * If we want to edit this name, in the JS it could be possible to replace the "mapIconName"
5+ * function in the "backend.vuecomponents.richeditordocumentconnector.utils" module that be
6+ * accessed using "$.oc.module.import('...')".
47 */
58 .octo-icon-icon-newspaper-o ::before {
69 content : "\f1ea" ;
Original file line number Diff line number Diff line change 1717
1818 // The dropdown HTML
1919 html : function ( ) {
20- if ( $ . oc . snippets ) {
21- var html = '<ul class="fr-dropdown-list">' ;
22- $ . each ( $ . oc . snippets , function ( i , snippet ) {
23- html += '<li><a class="fr-command" data-cmd="snippets" data-param1="' + snippet . snippet + '" title="' + snippet . name + '">' + snippet . name + '</a></li>' ;
24- } ) ;
25-
26- return html + '</ul>' ;
27- }
28- else {
20+ if ( ! $ . oc . snippets ) {
2921 return '<div style="padding:10px;">No snippets are currently defined.</div>' ;
3022 }
23+
24+ var html = '<ul class="fr-dropdown-list">' ;
25+
26+ $ . each ( $ . oc . snippets , function ( i , snippet ) {
27+ html += '<li><a class="fr-command" data-cmd="snippets" data-param1="' + snippet . snippet + '" title="' + snippet . name + '">' + snippet . name + '</a></li>' ;
28+ } ) ;
29+
30+ return html + '</ul>' ;
3131 } ,
3232
3333 // Save the dropdown action into undo stack.
122122 * that are displayed on page load (i.e. Rainlab Blog).
123123 */
124124 $ ( document ) . ready ( function ( ) {
125- var $editor = $ ( '[data-control="richeditor"]' ) ;
125+ var $editor = $ ( '[data-control="richeditor"]:not([data-richeditor-vue]) ' ) ;
126126
127127 if ( $ . oc . pagesPage && ! window . location . pathname . includes ( 'rainlab/pages' ) ) {
128128 $ . oc . pagesPage . snippetManager . initSnippets ( $editor ) ;
Original file line number Diff line number Diff line change 2222 - Fix error "Trying to access array offset on value of type null" that could happen under unknown circumstances
23232.1.6 :
2424 - Add composer.json to allow installation on OC2 - Thanks @rubenvanerk for pointing this out
25+ 2.1.7 :
26+ - Fix compatibility with OC2 when used in plugins other than RainLab.Pages
You can’t perform that action at this time.
0 commit comments