CKeditor radio vertical - javascript

I am trying to make the radio button vertical using CKEditor's 4 api.
I saw this ticket from the official website, but in my version of CKEditor I don't have the Dialogui folder since it's an optimized version. I have then dowloaded a source version form the builder but when i use this version my custom plugins aren't working anymore. I get those kind of error for a piece of code which I know is correct.
TypeError: CKEDITOR.dialogCommand is not a constructor
editor.addCommand( 'lien' , new CKEDITOR.dialogCommand( 'lienDialog',{ allowedContent: 'a[title,!href,id,onclick,target]'
} ) );
so my question is how can I make my radio buttons vertical using the optimized version of CKEditor ?

ok well I found in the optimized code the line to change to make it work : it's at line 434 more or less depend of version I think i just change this
new CKEDITOR.ui.dialog.hbox(b,e,d,h);
by this
if(a.labelLayout=='vertical')new CKEDITOR.ui.dialog.vbox(b,e,d,h);else new CKEDITOR.ui.dialog.hbox(b,e,d,h);
hope it could help someone.

Related

'content' not Available for ui.Popup

Im using rappid for my current project.
Im trying to use ui.Popup for my element.
But for i don't know why, the 'content' option is not available for me.
In the docs, it said it need the content option for the contents.
https://resources.jointjs.com/docs/rappid/v3.4/ui.html#ui.Popup
But, when i press ctrl+space to see the available options, it doesnt have content. and if i add it manually, it just gives me error.
here's the picture, cant post picture coz its the first time i post a question:
[https://i.ibb.co/nf6Zz1h/error.png][1]
Do i need to use other options that listed in the option? is the doc not updated?
Thanks!
This was a TypeScript bug as the types were not provided for ui.Popup in version 3.4. It has been fixed in version 3.5, so you should not get the same error.
A temporary fix for version 3.4 is adding //#ts-ignore above the line where the TypeScript error is.

New JQuery 3 Not Working Correctly w/ Bootstrap?

I'm making this post as I've been having this issue, and I'd like to make light of it. Perhaps others are having it, or can say whether my situation is a unique case. I recently downloaded the new version of jQuery (3.0.0) and linked it to a current project I'm working on. My Bootstrap dropdown / collapsing navbar would NOT work until I switch to an older version of Jquery (1.12.4.)
Has anyone else noticed something like this or had a similar issue?
Bootstrap 3 is not compatible with jQuery 3. You can use the latest v2 jquery though.

Fullcalendar 2.0.2 change cells background

I am currently searching a solution to change cells background in fullcalendar depends on availability or holidays for example.
I found several solutions:
- elhigu/fullcalendar on github (+)
- lcrodriguez/fullcalendar on github (+)
But they are for older versions of fullcalendar.
I also found this solution, :
https://stackoverflow.com/a/24375088/3641008
I would like to know if someone have another solution or plugin for 2.0.2 version.
I tried using the file found at the end here : https://code.google.com/p/fullcalendar/issues/detail?id=144.. but no success..
I am pretty new to librairy or plungin use.
Thanks for your help.
(+) Sorry I cannot post more than 2 links
EDIT
I finally got fullcalendar annotations (link) working with fullcalendar 1.6.4.
But I really need that fullcalendar2.0.2 (or higher) works.
This is what I did on mine:
I set the eventRender
eventRender: function (event, element, icon) {
if (isHoliday) {//do your own validation
element.find('.fc-event-title').append("<span class='ultra-light'> is a holiday</span>");
}
},
Of course once you find the element.find('.fc-event-title') you can append css or do whatever else you want to do it.

Google Polymer with Rails menu not working

I'm trying to use Google Polymer in a Rails app. I'm using the gem emcee (https://github.com/ahuth/emcee) and I have the core installed.
I am trying to just setup the scaffolding element to see how it works. However, I can't get the menu to expand when the window is small (mobile). The button just doesn't work. Javascript is loading because without it nothing works. I tried removing everything I could think about that would be causing problems.
You can see the problem on EDIT: removed link (no longer valid)
Note that I've tried removing all other JS besides platform.js and even all css.
Besides the button not working, the page starts dark when scaled small.
I'm also using Rails 4.0.2 and Ruby 2.1.2.
Did you add the required 'custom' javascript?
document.addEventListener('polymer-ready', function() {
var navicon = document.getElementById('navicon');
var drawerPanel = document.getElementById('drawerPanel');
navicon.addEventListener('click', function() {
drawerPanel.togglePanel();
});
});
When I updated to the newest version, this problem went away. I'm not sure if it was a bug or something I did wrong the first time, but it works now.

"Code" button in CKEditor

I'm using CKEditor (currently using ver. 3.4.1 - I can upgrade if it's necessary) and I'm missing a possibility to use the <code> tag, either from the Format dropdown or via a button on the toolbar.
I couldn't find a plugin that would make this possible. I have also no experience or knowledge of how to write my own plugin for that.
Do you know of a plugin that might help me enable the "code" button/format (wrapping selected text into <code> tags)? If there is none, I would appreciate if you directed me to online resources about CKEditor plugin development (some sort of tutorial explaining the bare basics).
In case it's useful, my site's using Drupal 6.19, CKEditor module, CKEditor 3.4.1. As for plugin development tutorials, I have already found this, but most of it seems to beyond my grasp.
I solved with this ckeditor plugin:
http://code.google.com/p/ckeditor-syntaxhighlight/
It's also compatible with the jquery plugin SyntaxHighlighter
http://alexgorbatchev.com/SyntaxHighlighter/
Try https://ckeditor.com/cke4/addon/codeTag
config.extraPlugins = 'codeTag';
No additional dependencies.
Get wysiwyg
Browse configuration>wysiwyg
...
Enable the 'source' button.

Categories

Resources