ckeditor set custom skinpath - get

I have a problem with the CKEDITOR. I installed it with bower and changed the basepath. So CKEDITOR works.
My problem now is to laod a custom skin, because i download it also with bower.
This is the code:
<textarea id="editor-<?= $block_count ?>" name="block[<?= $block_count ?>][text][]" rows="10" cols="80" class="form-control"></textarea>
<script>
CKEDITOR.replace('editor-<?= $block_count ?>',{
customConfig: '../../dist/scripts/ckeditor.js',
skin: 'office2013'
});
</script>
But if it want to laod the skin i get this error message:
ckeditor.js:76 GET
htttp://myurl.com/src/bower_components/ckeditor/skins/office2013/editor.css?t=G87D
Can i define a skinpath to load it from teh bower path like:
CKEDITOR.replace('editor-<?= $block_count ?>',{
customConfig: '../../dist/scripts/ckeditor.js',
skinpath: 'src/bower_componnts/ckeditor-office2013-skin/office2013/',
skin: 'office2013'
});

Yes you can. Check the documentation. Quoting docs:
It is possible to install skins outside the default skin folder in the editor installation. In that case, the absolute URL path to that folder should be provided, separated by a comma ('skin_name,skin_path').
config.skin = 'moono';
config.skin = 'myskin,/customstuff/myskin/';
So, something similar should do the trick:
skin: 'office2013,/src/bower_components/ckeditor-office2013-skin/office2013/'

Related

How to use remote theme in Jekyll project with Gitlab Pages repo?

I am using linux/firefox and I'm having an issue where a jekyll theme does not work when using remote_theme: inside the .config.yml of a Jekyll project kept in a GitLab pages repo. If I clone the theme just-the-docs (https://pmarsceill.github.io/just-the-docs/) locally, it works fine when theme: is used in the .config.yml. However, when using an example of a remote theme as written by the same author pmarsceill/jtd-remote, and adding remote_theme: instead of theme:, I get the same issue. The theme does not take effect.
I use jtd-remote as an example which gives the same error, though, my goal is to get just-the-docs working as a remote theme.
Clone 'https://github.com/pmarsceill/jtd-remote'
Add url to _config.yml.
Add index.md to top level.
Add to GitLab repo and configure pages.
Browse to repo url on 4000, theme does not take effect.
When using just-the-docs, my .config.yml appears as follows:
# Site settings
title: My site Test
description: "Testing"
baseurl: "/"
url: "https://mysite.gitlab.io"
color_scheme: "dark"
search_enabled: false
# Build settings
remote_theme: pmarsceill/just-the-docs
#remote_theme: "pmarsceill/just-the-docs#v0.3.3"
plugins:
- jekyll-feed
- jekyll-remote-theme
- jekyll-seo-tag
- jekyll-sitemap
- jekyll-mermaid
- jekyll-spaceship
Any help much appreciated.
GitLab doesn't support remote themes for Jekyll.

Image not rendering in md format file in Gitlab

I have a directory called "features" in the root and inside this directory has image "state_transitation.JPG" and document "myMdc_features.md"
I am trying to add an image "state_transitation.JPG" to the md extension document "myMdc_features.md" in my repository by using markdown below:
![alt text](./state_transitation.JPG)
![alt text](/state_transitation.JPG)
![alt text](state_transitation.JPG)
<p>
<img src="state_transitation.JPG" />
</p>
I tried all above options but this is giving page could not be found error. 404
Both myMdc_features.md and image file are in same path/directory.
What is the correct way to display an image in gitlab myMdc_features.md?
I think that the first option should work, assuming they are in the same folder. I made an example repostiory here that works.
Source of the file:
Hello World
![](./i-have-no-idea-what-im-doing.jpg)
Output in GitLab:

selenium.common.exceptions.WebDriverException: Message: File not found: /path/to/file

the html part looks like this:
...
<form action="/upload/select-single/" method="post" enctype="multipart/form-data">
<input type="hidden" name="csrfmiddlewaretoken" value="U3Uh3EAYWXaWEiNaWC3zcCQutQe8hGM53u4BTx810o08t1GwOfIJI2ayHCFQFySw">
<p>
<label for="id_file_field">File field:</label>
<input id="id_file_field" name="file_field" type="file" multiple="" required="">
</p>
<input id="submit" type="submit" value="submit">
</form>
...
the selenium test like this:
...
btn_choose_file = self.browser.find_element_by_id("id_file_field")
# write file path to field
# to check that I really selected the field, I tried btn_choose_file.click() -> and it works
btn_choose_file.send_keys('/path/to/file') # -> THIS is the line which seems to cause the problem
# click submit
self.browser.find_element_by_id("submit").click()
...
unfortunately when the test is executed this error is raised
selenium.common.exceptions.WebDriverException: Message: File not found: /path/to/file
this due to the part where the file path is send to the input element with btn_choose_file.send_keys('/path/to/file')
note: the real '/path/to/file' is the following
/Users/udos/development/trails/processfile/gpx_data/test_data/suite 001 - val poschiavo/Bernina - Le Prese.gpx (the file exists and I copied the path from the IDE)
very odd behaviour. this test was running before, somehow I managed to break it...
any suggestions what the cause could be?
UPDATE downgrading Firefox from version 55.0.2 to 54.0.1 "fixed" the issue.see -> https://stackoverflow.com/a/45753912/420953
One way to work around the issue is to replace all "/" occurances in the filename with "\" ("\\" in python).
This work at least on Windows.
After this bug i installed and used chromewebdriver. Worked like firefox driver and all my tests run smoothly. I suggest you try it at least it worked like a charm for me
this error was due to an update of Firefox to version 55.0.2 (which automatically happened 2 days ago because I have automatic updates configured)
the following geckodriver issue pointed me into this direction
https://github.com/mozilla/geckodriver/issues/659note: probably this issue was reintroduced in 55.0.x...
I then downgraded my Firefox version to 54.0.1 as described in article
https://support.mozilla.org/en-US/kb/install-older-version-of-firefoxnote: make sure to disable automatic updates as described in that article.
with this, the selenium tests are running again.

Orchard CMS: Resources getting a 404 (Not Found)

I'm creating a theme for Orchard CMS 1.10. I'm using a Bootstrap template as a basis. There are quite a number of CSS and JavaScript files that I'm including. All of them however are not being found.
I created a ResourceManifest class to define them:
manifest.DefineScript("ThemejQuery").SetUrl("~/Scripts/plugins/jquery-1.11.3.min.js");
manifest.DefineScript("Bootstrap").SetUrl("~/Scripts/plugins/bootstrap/js/bootstrap.min.js").SetDependencies("ThemejQuery");
manifest.DefineScript("jQueryScrollTo").SetUrl("~/Scripts/plugins/jquery-scrollTo/jquery.scrollTo.min.js").SetDependencies("ThemejQuery");
manifest.DefineScript("BackToTop").SetUrl("~/Scripts/plugins/back-to-top.js").SetDependencies("ThemejQuery");
and am calling them so in my Document.cshtml:
Script.Require("jQuery").AtFoot();
Script.Require("Bootstrap").AtFoot();
Script.Require("jQueryScrollTo").AtFoot();
Script.Require("BackToTop").AtFoot();
In each directory that these css and js files reside, I'm including a web.config file to allow access:
the web.config files all look like:
and yet none of these files are being served. I don't believe that the paths are an issue, e.g. using '~/Scripts'. The paths are correct (as far as I can see):
I've googled the hell out of this but cannot find a solution. I've tried running this within IIS Express in Visual Studio as well as full-blown IIS. Any ideas?
You need to change the addHandler of your web.config (inside Scripts or Styles) addHandler like:
<add name="StaticFileHandler" path="*" verb="*" modules="StaticFileModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
Drop the '~/Scripts', the resource manager looks for scripts in the modules 'Script' folder and for styles in the 'Styles' folder.

Windows Phone, loading resources from directory

I've got the following folder structure in the project:
Style
MainStyles.xaml
MainPage.xaml
Inside MainPage.xaml I try to load resources from MainStyles:
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Style\MainStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Page.Resources>
However, I get the following error message:
WinRT information: Failed to assign to property '%0'. [Line: 13 Position: 37]
Additional information: The text associated with this error code could not be found.
Line 13 and position 37 is the exact place of Source=".... If I move resources to the same directory as MainPage and remove the directory, everything works.
By the way, Visual Studio designer does not complain about lacking resources and use them correctly.
What am I doing wrong?
Try using a forward slash when setting the Source of a ResourceDictionary.
I.e. Style/MainStyles.xaml

Resources