MDL-83268 core_h5p: Add editor lib changes after upgrading it
This commit is contained in:
@@ -1,107 +0,0 @@
|
||||
<!DOCTYPE html><!--
|
||||
Copyright (c) 2014-2023, CKSource Holding sp. z o.o. All rights reserved.
|
||||
This file is licensed under the terms of the MIT License (see LICENSE.md).
|
||||
-->
|
||||
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<title>CKEditor 5 ClassicEditor build</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="https://c.cksource.com/a/1/logos/ckeditor5.png">
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
</head>
|
||||
<body data-editor="ClassicEditor" data-collaboration="false" data-revision-history="false">
|
||||
<header>
|
||||
<div class="centered">
|
||||
<h1><a href="https://ckeditor.com/ckeditor-5/" target="_blank" rel="noopener noreferrer"><img src="https://c.cksource.com/a/1/logos/ckeditor5.svg" alt="CKEditor 5 logo">CKEditor 5</a></h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="https://ckeditor.com/docs/ckeditor5/" target="_blank" rel="noopener noreferrer">Documentation</a></li>
|
||||
<li><a href="https://ckeditor.com/" target="_blank" rel="noopener noreferrer">Website</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<div class="message">
|
||||
<div class="centered">
|
||||
<h2>CKEditor 5 online builder demo - ClassicEditor build</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="centered">
|
||||
<div class="row row-editor">
|
||||
<div class="editor-container">
|
||||
<div class="editor">
|
||||
<h2>Bilingual Personality Disorder</h2>
|
||||
<figure class="image image-style-side"><img src="https://c.cksource.com/a/1/img/docs/sample-image-bilingual-personality-disorder.jpg">
|
||||
<figcaption>One language, one person.</figcaption>
|
||||
</figure>
|
||||
<p>
|
||||
This may be the first time you hear about this made-up disorder but
|
||||
it actually isn’t so far from the truth. Even the studies that were conducted almost half a century show that
|
||||
<strong>the language you speak has more effects on you than you realize</strong>.
|
||||
</p>
|
||||
<p>
|
||||
One of the very first experiments conducted on this topic dates back to 1964.
|
||||
<a href="https://www.researchgate.net/publication/9440038_Language_and_TAT_content_in_bilinguals">In the experiment</a>
|
||||
designed by linguist Ervin-Tripp who is an authority expert in psycholinguistic and sociolinguistic studies,
|
||||
adults who are bilingual in English in French were showed series of pictures and were asked to create 3-minute stories.
|
||||
In the end participants emphasized drastically different dynamics for stories in English and French.
|
||||
</p>
|
||||
<p>
|
||||
Another ground-breaking experiment which included bilingual Japanese women married to American men in San Francisco were
|
||||
asked to complete sentences. The goal of the experiment was to investigate whether or not human feelings and thoughts
|
||||
are expressed differently in <strong>different language mindsets</strong>.
|
||||
Here is a sample from the the experiment:
|
||||
</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>English</th>
|
||||
<th>Japanese</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Real friends should</td>
|
||||
<td>Be very frank</td>
|
||||
<td>Help each other</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>I will probably become</td>
|
||||
<td>A teacher</td>
|
||||
<td>A housewife</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>When there is a conflict with family</td>
|
||||
<td>I do what I want</td>
|
||||
<td>It's a time of great unhappiness</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
More recent <a href="https://books.google.pl/books?id=1LMhWGHGkRUC">studies</a> show, the language a person speaks affects
|
||||
their cognition, behaviour, emotions and hence <strong>their personality</strong>.
|
||||
This shouldn’t come as a surprise
|
||||
<a href="https://en.wikipedia.org/wiki/Lateralization_of_brain_function">since we already know</a> that different regions
|
||||
of the brain become more active depending on the person’s activity at hand. Since structure, information and especially
|
||||
<strong>the culture</strong> of languages varies substantially and the language a person speaks is an essential element of daily life.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<p><a href="https://ckeditor.com/ckeditor-5/" target="_blank" rel="noopener">CKEditor 5</a>
|
||||
– Rich text editor of tomorrow, available today
|
||||
</p>
|
||||
<p>Copyright © 2003-2023,
|
||||
<a href="https://cksource.com/" target="_blank" rel="noopener">CKSource</a>
|
||||
Holding sp. z o.o. All rights reserved.
|
||||
</p>
|
||||
</footer>
|
||||
<script src="../build/ckeditor.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,20 +0,0 @@
|
||||
ClassicEditor
|
||||
.create( document.querySelector( '.editor' ), {
|
||||
// Editor configuration.
|
||||
} )
|
||||
.then( editor => {
|
||||
window.editor = editor;
|
||||
} )
|
||||
.catch( handleSampleError );
|
||||
|
||||
function handleSampleError( error ) {
|
||||
const issueUrl = 'https://github.com/ckeditor/ckeditor5/issues';
|
||||
|
||||
const message = [
|
||||
'Oops, something went wrong!',
|
||||
`Please, report the following error on ${ issueUrl } with the build id "9e9snf1zg4kp-d2cnyyo44cbm" and the error stack trace:`
|
||||
].join( '\n' );
|
||||
|
||||
console.error( message );
|
||||
console.error( error );
|
||||
}
|
||||
@@ -1,516 +0,0 @@
|
||||
/**
|
||||
* @license Copyright (c) 2014-2023, CKSource Holding sp. z o.o. All rights reserved.
|
||||
* This file is licensed under the terms of the MIT License (see LICENSE.md).
|
||||
*/
|
||||
|
||||
:root {
|
||||
--ck-sample-base-spacing: 2em;
|
||||
--ck-sample-color-white: #fff;
|
||||
--ck-sample-color-green: #279863;
|
||||
--ck-sample-color-blue: #1a9aef;
|
||||
--ck-sample-container-width: 1285px;
|
||||
--ck-sample-sidebar-width: 350px;
|
||||
--ck-sample-editor-min-height: 400px;
|
||||
--ck-sample-editor-z-index: 10;
|
||||
}
|
||||
|
||||
/* --------- EDITOR STYLES ---------------------------------------------------------------------------------------- */
|
||||
|
||||
.editor__editable,
|
||||
/* Classic build. */
|
||||
main .ck-editor[role='application'] .ck.ck-content,
|
||||
/* Decoupled document build. */
|
||||
.ck.editor__editable[role='textbox'],
|
||||
.ck.ck-editor__editable[role='textbox'],
|
||||
/* Inline & Balloon build. */
|
||||
.ck.editor[role='textbox'] {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
font-size: 1em;
|
||||
line-height: 1.6em;
|
||||
min-height: var(--ck-sample-editor-min-height);
|
||||
padding: 1.5em 2em;
|
||||
}
|
||||
|
||||
.ck.ck-editor__editable {
|
||||
background: #fff;
|
||||
border: 1px solid hsl(0, 0%, 70%);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Because of sidebar `position: relative`, Edge is overriding the outline of a focused editor. */
|
||||
.ck.ck-editor__editable {
|
||||
position: relative;
|
||||
z-index: var(--ck-sample-editor-z-index);
|
||||
}
|
||||
|
||||
.editor-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.editor-container--with-sidebar > .ck.ck-editor {
|
||||
width: calc( 100% - var(--ck-sample-sidebar-width) );
|
||||
}
|
||||
|
||||
/* --------- DECOUPLED (DOCUMENT) BUILD. ---------------------------------------------*/
|
||||
body[data-editor='DecoupledEditor'] .document-editor__toolbar {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body[data-editor='DecoupledEditor'] .collaboration-demo__editable,
|
||||
body[data-editor='DecoupledEditor'] .row-editor .editor {
|
||||
/* A pixel is added for each of the border. */
|
||||
width: calc(21cm + 2px);
|
||||
min-height: calc(29.7cm + 2px);
|
||||
/* To avoid having extra scrolls inside the editor container. */
|
||||
height: fit-content;
|
||||
padding: 2cm 1.2cm;
|
||||
margin: 2.5rem;
|
||||
border: 1px hsl( 0, 0%, 82.7% ) solid;
|
||||
background-color: var(--ck-sample-color-white);
|
||||
box-shadow: 0 0 5px hsla( 0, 0%, 0%, .1 );
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body[data-editor='DecoupledEditor'] .row-editor {
|
||||
display: flex;
|
||||
position: relative;
|
||||
justify-content: center;
|
||||
overflow-y: auto;
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid hsl(0, 0%, 77%);
|
||||
/* Limit the max-height of the editor to avoid scrolling from bottom to top to see the toolbar. */
|
||||
max-height: 700px;
|
||||
}
|
||||
|
||||
body[data-editor='DecoupledEditor'] .sidebar {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* --------- COMMENTS & TRACK CHANGES FEATURE ---------------------------------------------------------------------- */
|
||||
.sidebar {
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
min-width: var(--ck-sample-sidebar-width);
|
||||
max-width: var(--ck-sample-sidebar-width);
|
||||
font-size: 20px;
|
||||
border: 1px solid hsl(0, 0%, 77%);
|
||||
background: hsl(0, 0%, 98%);
|
||||
border-left: 0;
|
||||
overflow: hidden;
|
||||
min-height: 100%;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
/* Do not inherit styles related to the editable editor content. See line 25.*/
|
||||
.sidebar .ck-content[role='textbox'],
|
||||
.ck.ck-annotation-wrapper .ck-content[role='textbox'] {
|
||||
min-height: unset;
|
||||
width: unset;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.sidebar.narrow {
|
||||
min-width: 60px;
|
||||
flex-grow: 0;
|
||||
}
|
||||
|
||||
.sidebar.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#sidebar-display-toggle {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
left: 15px;
|
||||
top: 30px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
color: hsl( 0, 0%, 50% );
|
||||
transition: 250ms ease color;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#sidebar-display-toggle:hover {
|
||||
color: hsl( 0, 0%, 30% );
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#sidebar-display-toggle:focus,
|
||||
#sidebar-display-toggle:active {
|
||||
outline: none;
|
||||
border: 1px solid #a9d29d;
|
||||
}
|
||||
|
||||
#sidebar-display-toggle svg {
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* --------- COLLABORATION FEATURES (USERS) ------------------------------------------------------------------------ */
|
||||
.row-presence {
|
||||
width: 100%;
|
||||
border: 1px solid hsl(0, 0%, 77%);
|
||||
border-bottom: 0;
|
||||
background: hsl(0, 0%, 98%);
|
||||
padding: var(--ck-spacing-small);
|
||||
|
||||
/* Make `border-bottom` as `box-shadow` to not overlap with the editor border. */
|
||||
box-shadow: 0 1px 0 0 hsl(0, 0%, 77%);
|
||||
|
||||
/* Make `z-index` bigger than `.editor` to properly display tooltips. */
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.ck.ck-presence-list {
|
||||
flex: 1;
|
||||
padding: 1.25rem .75rem;
|
||||
}
|
||||
|
||||
.presence .ck.ck-presence-list__counter {
|
||||
order: 2;
|
||||
margin-left: var(--ck-spacing-large)
|
||||
}
|
||||
|
||||
/* --------- REAL TIME COLLABORATION FEATURES (SHARE TOPBAR CONTAINER) --------------------------------------------- */
|
||||
.collaboration-demo__row {
|
||||
display: flex;
|
||||
position: relative;
|
||||
justify-content: center;
|
||||
overflow-y: auto;
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid hsl(0, 0%, 77%);
|
||||
}
|
||||
|
||||
body[data-editor='InlineEditor'] .collaboration-demo__row {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.collaboration-demo__container {
|
||||
max-width: var(--ck-sample-container-width);
|
||||
margin: 0 auto;
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.presence, .collaboration-demo__row {
|
||||
transition: .2s opacity;
|
||||
}
|
||||
|
||||
.collaboration-demo__topbar {
|
||||
background: #fff;
|
||||
border: 1px solid var(--ck-color-toolbar-border);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 0;
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.collaboration-demo__topbar .btn {
|
||||
margin-right: 1em;
|
||||
outline-offset: 2px;
|
||||
outline-width: 2px;
|
||||
background-color: var( --ck-sample-color-blue );
|
||||
}
|
||||
|
||||
.collaboration-demo__topbar .btn:focus,
|
||||
.collaboration-demo__topbar .btn:hover {
|
||||
border-color: var( --ck-sample-color-blue );
|
||||
}
|
||||
|
||||
.collaboration-demo__share {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 1.25rem .75rem
|
||||
}
|
||||
|
||||
.collaboration-demo__share-description p {
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.collaboration-demo__share input {
|
||||
height: auto;
|
||||
font-size: 0.9em;
|
||||
min-width: 220px;
|
||||
margin: 0 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--ck-color-toolbar-border)
|
||||
}
|
||||
|
||||
.collaboration-demo__share button,
|
||||
.collaboration-demo__share input {
|
||||
height: 40px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.collaboration-demo__share button {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.collaboration-demo__share button:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.collaboration-demo__share button[data-tooltip]::before,
|
||||
.collaboration-demo__share button[data-tooltip]::after {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: all .15s cubic-bezier(.5,1,.25,1);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.collaboration-demo__share button[data-tooltip]::before {
|
||||
content: attr(data-tooltip);
|
||||
padding: 5px 15px;
|
||||
border-radius: 3px;
|
||||
background: #111;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
margin-top: 5px;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.collaboration-demo__share button[data-tooltip]::after {
|
||||
content: '';
|
||||
border: 5px solid transparent;
|
||||
width: 0;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-bottom: 5px solid #111;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.collaboration-demo__share button[data-tooltip]:hover:before,
|
||||
.collaboration-demo__share button[data-tooltip]:hover:after {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.collaboration-demo--ready {
|
||||
overflow: visible;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.collaboration-demo--ready .presence,
|
||||
.collaboration-demo--ready .collaboration-demo__row {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* --------- PAGINATION FEATURE ------------------------------------------------------------------------------------ */
|
||||
|
||||
/* Pagination view line must be stacked at least at the same level as the editor,
|
||||
otherwise it will be hidden underneath. */
|
||||
.ck.ck-pagination-view-line {
|
||||
z-index: var(--ck-sample-editor-z-index);
|
||||
}
|
||||
|
||||
/* --------- REVISION HISTORY FEATURE ------------------------------------------------------------------------------ */
|
||||
|
||||
.revision-viewer-container {
|
||||
display: none;
|
||||
max-width: 100%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.revision-viewer-sidebar {
|
||||
position: relative;
|
||||
min-width: 310px;
|
||||
overflow: hidden;
|
||||
background: var(--ck-color-toolbar-background);
|
||||
border: 1px solid var(--ck-color-toolbar-border);
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
/* A case when Pagination and Revision History features are enabled in the editor. */
|
||||
/* Move the square with page number from the Pagination plugin to the left side, so that it does not cover the RH sidebar. */
|
||||
body[data-revision-history='true'] .ck.ck-pagination-view-line::after {
|
||||
transform: translateX(-100%) !important;
|
||||
left: -1px !important;
|
||||
right: unset !important;
|
||||
}
|
||||
|
||||
/* --------- DOCUMENT OUTLINE FEATURE ------------------------------------------------------------------------------ */
|
||||
|
||||
.document-outline-container {
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.document-outline-container .ck.ck-document-outline {
|
||||
min-height: 100%;
|
||||
border: 1px solid var(--ck-color-base-border);
|
||||
background-color: hsl(0, 0%, 96%);
|
||||
}
|
||||
|
||||
/* --------- SAMPLE GENERIC STYLES (not related to CKEditor) ------------------------------------------------------- */
|
||||
body, html {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
font-family: sans-serif, Arial, Verdana, "Trebuchet MS", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
color: #2D3A4A;
|
||||
}
|
||||
|
||||
body * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #38A5EE;
|
||||
}
|
||||
|
||||
header .centered {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
min-height: 8em;
|
||||
}
|
||||
|
||||
header h1 a {
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #2D3A4A;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header h1 img {
|
||||
display: block;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
header nav ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
header nav ul li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
header nav ul li + li {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
header nav ul li a {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
color: #2D3A4A;
|
||||
}
|
||||
|
||||
header nav ul li a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
main .message {
|
||||
padding: 0 0 var(--ck-sample-base-spacing);
|
||||
background: var(--ck-sample-color-green);
|
||||
color: var(--ck-sample-color-white);
|
||||
}
|
||||
|
||||
main .message::after {
|
||||
content: "";
|
||||
z-index: -1;
|
||||
display: block;
|
||||
height: 10em;
|
||||
width: 100%;
|
||||
background: var(--ck-sample-color-green);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
main .message h2 {
|
||||
position: relative;
|
||||
padding-top: 1em;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.centered {
|
||||
/* Hide overlapping comments. */
|
||||
overflow: hidden;
|
||||
max-width: var(--ck-sample-container-width);
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--ck-sample-base-spacing);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
padding: 8px 16px;
|
||||
font-size: 1rem;
|
||||
user-select: none;
|
||||
border-radius: 4px;
|
||||
transition: color .2s ease-in-out,background-color .2s ease-in-out,border-color .2s ease-in-out,opacity .2s ease-in-out;
|
||||
background-color: var(--ck-sample-color-button-blue);
|
||||
border-color: var(--ck-sample-color-button-blue);
|
||||
color: var(--ck-sample-color-white);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btn--tiny {
|
||||
padding: 6px 12px;
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin: calc(2*var(--ck-sample-base-spacing)) var(--ck-sample-base-spacing);
|
||||
font-size: .8em;
|
||||
text-align: center;
|
||||
color: rgba(0,0,0,.4);
|
||||
}
|
||||
|
||||
/* --------- RWD --------------------------------------------------------------------------------------------------- */
|
||||
@media screen and ( max-width: 800px ) {
|
||||
:root {
|
||||
--ck-sample-base-spacing: 1em;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header h1 img {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
header nav ul {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
main .message h2 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Moodle;
|
||||
abstract class H5PEditorEndpoints {
|
||||
|
||||
/**
|
||||
@@ -64,17 +65,17 @@ abstract class H5PEditorEndpoints {
|
||||
class H5PEditorAjax {
|
||||
|
||||
/**
|
||||
* @var \H5PCore
|
||||
* @var H5PCore
|
||||
*/
|
||||
public $core;
|
||||
|
||||
/**
|
||||
* @var \H5peditor
|
||||
* @var H5peditor
|
||||
*/
|
||||
public $editor;
|
||||
|
||||
/**
|
||||
* @var \H5peditorStorage
|
||||
* @var H5peditorStorage
|
||||
*/
|
||||
public $storage;
|
||||
|
||||
@@ -261,7 +262,7 @@ class H5PEditorAjax {
|
||||
private function isValidEditorToken($token) {
|
||||
$isValidToken = $this->editor->ajaxInterface->validateEditorToken($token);
|
||||
if (!$isValidToken) {
|
||||
\H5PCore::ajaxError(
|
||||
H5PCore::ajaxError(
|
||||
$this->core->h5pF->t('Invalid security token.'),
|
||||
'INVALID_TOKEN'
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Moodle;
|
||||
|
||||
/**
|
||||
* Handles Ajax functionality that must be implemented separately for each of the
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Moodle;
|
||||
|
||||
use stdClass;
|
||||
|
||||
/**
|
||||
* Class
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Moodle;
|
||||
|
||||
/**
|
||||
* A defined interface for the editor to communicate with the database of the
|
||||
* web system.
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace Moodle;
|
||||
|
||||
use stdClass;
|
||||
|
||||
class H5peditor {
|
||||
|
||||
private static $hasWYSIWYGEditor = array(
|
||||
@@ -56,9 +60,9 @@ class H5peditor {
|
||||
/**
|
||||
* Constructor for the core editor library.
|
||||
*
|
||||
* @param \H5PCore $h5p Instance of core
|
||||
* @param \H5peditorStorage $storage Instance of h5peditor storage interface
|
||||
* @param \H5PEditorAjaxInterface $ajaxInterface Instance of h5peditor ajax
|
||||
* @param H5PCore $h5p Instance of core
|
||||
* @param H5peditorStorage $storage Instance of h5peditor storage interface
|
||||
* @param H5PEditorAjaxInterface $ajaxInterface Instance of h5peditor ajax
|
||||
* interface
|
||||
*/
|
||||
function __construct($h5p, $storage, $ajaxInterface) {
|
||||
|
||||
@@ -228,46 +228,6 @@ H5PEditor.language.core = {
|
||||
allNew: 'All New',
|
||||
filterBy: 'Filter by',
|
||||
filter: 'Filter',
|
||||
filters: {
|
||||
level: {
|
||||
dropdownLabel: 'Level',
|
||||
dialogHeader: 'Select level of education',
|
||||
dialogButtonLabel: 'Filter level of education'
|
||||
},
|
||||
language: {
|
||||
dropdownLabel: 'Language',
|
||||
dialogHeader: 'Select language(s)',
|
||||
dialogButtonLabel: 'Filter languages',
|
||||
searchPlaceholder: 'Type to search for languages'
|
||||
},
|
||||
reviewed: {
|
||||
dropdownLabel: 'Reviewed',
|
||||
dialogHeader: 'Reviewed Content',
|
||||
dialogButtonLabel: 'Filter',
|
||||
optionLabel: 'Show only reviewed content'
|
||||
},
|
||||
contentTypes: {
|
||||
dropdownLabel: 'Content types',
|
||||
dialogHeader: 'Select Content type(s)',
|
||||
dialogButtonLabel: 'Filter Content Types',
|
||||
searchPlaceholder: 'Type to search for content types'
|
||||
},
|
||||
disciplines: {
|
||||
dropdownLabel: 'Discipline',
|
||||
dialogHeader: 'Select Your Discipline',
|
||||
dialogButtonLabel: 'Filter Disciplines',
|
||||
searchPlaceholder: 'Type to search for disciplines'
|
||||
},
|
||||
licenses: {
|
||||
dropdownLabel: 'License',
|
||||
dialogHeader: 'Select preferred rights of use',
|
||||
dialogButtonLabel: 'Filter licenses',
|
||||
options: {
|
||||
modified: 'Can be modified',
|
||||
commercial: 'Allows commercial use'
|
||||
}
|
||||
}
|
||||
},
|
||||
clearFilters: 'Clear all filters',
|
||||
contentSearchFieldPlaceholder: 'Search for Content',
|
||||
loadingContentTitle: 'We are loading content for you...',
|
||||
|
||||
@@ -10,7 +10,7 @@ Import procedure:
|
||||
Removed:
|
||||
* composer.json
|
||||
* .gitignore
|
||||
* ckeditor/skins/bootstrapck/sample
|
||||
* ckeditor5/sample
|
||||
|
||||
Changed:
|
||||
* In the method ns.LibrarySelector.prototype.appendTo (scripts/h5peditor-library-selector.js),
|
||||
@@ -31,9 +31,3 @@ Changed:
|
||||
* Add "use stdClass;" in h5peditor.class.php and h5peditor-file.class.php (check that it's still used before replacing it when
|
||||
upgrading the library).
|
||||
* Edit language/en.js and remove the content for 'filters' (it's a JSON with several fields, such as level or language).
|
||||
* If https://github.com/h5p/h5p-editor-php-library/pull/148 hasn't been merged, a patch needs to be added in
|
||||
joubel/editor/h5peditor-file.class.php, to replace FILTER_SANITIZE_STRING to FILTER_SANITIZE_FULL_SPECIAL_CHARS.
|
||||
|
||||
Notes:
|
||||
* 2023-05-10 Applied patch https://github.com/h5p/h5p-editor-php-library/pull/169 to avoid PHP 8.2 deprecations.
|
||||
See MDL-78147 for more details.
|
||||
|
||||
@@ -30,16 +30,16 @@ ns.LibrarySelector = function (libraries, defaultLibrary, defaultParams) {
|
||||
|
||||
//Add tutorial and example link:
|
||||
this.$tutorialUrl = ns.$(
|
||||
'<a class="h5p-tutorial-url" target="_blank">' +
|
||||
'<span class="h5p-tutorial-url-label">' +
|
||||
ns.t('core', 'tutorial') +
|
||||
'<a class="h5p-tutorial-url" target="_blank">' +
|
||||
'<span class="h5p-tutorial-url-label">' +
|
||||
ns.t('core', 'tutorial') +
|
||||
'</span>' +
|
||||
'</a>'
|
||||
).hide();
|
||||
this.$exampleUrl = ns.$(
|
||||
'<a class="h5p-example-url" target="_blank">' +
|
||||
'<span class="h5p-example-url-label">' +
|
||||
ns.t('core', 'example') +
|
||||
'<a class="h5p-example-url" target="_blank">' +
|
||||
'<span class="h5p-example-url-label">' +
|
||||
ns.t('core', 'example') +
|
||||
'</span>' +
|
||||
'</a>'
|
||||
).hide();
|
||||
@@ -141,7 +141,13 @@ ns.LibrarySelector.prototype.appendTo = function ($element) {
|
||||
var self = this;
|
||||
this.$parent = $element;
|
||||
|
||||
this.$selector.appendTo($element);
|
||||
/*
|
||||
Start Moodle change
|
||||
This line is commented out to prevent display of the hub selector in Moodle.
|
||||
For more information see MDL-67814.
|
||||
*/
|
||||
// this.$selector.appendTo($element);
|
||||
/* End Moodle change */
|
||||
this.$tutorialUrl.appendTo($element);
|
||||
this.$exampleUrl.appendTo($element);
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ $string['editor:changelanguage'] = 'Change language to :language?';
|
||||
$string['editor:changelibrary'] = 'Change content type?';
|
||||
$string['editor:changelogdescription'] = 'Some licences require that changes made to the original work, or derivatives are logged and displayed. You may log your changes here for licensing reasons or just to allow yourself and others to keep track of the changes made to this content.';
|
||||
$string['editor:close'] = 'Close';
|
||||
$string['editor:collapseallcontent'] = 'Collapse all content';
|
||||
$string['editor:commonfields'] = 'Text overrides and translations';
|
||||
$string['editor:commonfieldsdescription'] = 'Here you can edit settings or translate texts used in this content.';
|
||||
$string['editor:confirmchangelibrary'] = 'By doing this you will lose all work done with the current content type. Are you sure you wish to change content type?';
|
||||
@@ -103,6 +104,7 @@ $string['editor:errortoohighversion'] = 'Parameters contain %used while only %su
|
||||
$string['editor:example'] = 'Example';
|
||||
$string['editor:exceedsmax'] = 'The :property value exceeds the maximum of :max.';
|
||||
$string['editor:exitfullscreenbuttonlabel'] = 'Exit fullscreen';
|
||||
$string['editor:expandallcontent'] = 'Expand all content';
|
||||
$string['editor:expandcollapse'] = 'Expand/Collapse';
|
||||
$string['editor:filetolarge'] = 'The file you are trying to upload might be too large.';
|
||||
$string['editor:fillinthefieldsbelow'] = 'Fill in the fields below';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<location>joubel/editor</location>
|
||||
<name>h5p-editor-php-library</name>
|
||||
<description>A general library that is supposed to be used in most PHP implementations of H5P.</description>
|
||||
<version>moodle-1.23</version>
|
||||
<version>moodle-1.27.0</version>
|
||||
<license>GPL</license>
|
||||
<licenseversion>3.0+</licenseversion>
|
||||
<repository>https://github.com/h5p/h5p-editor-php-library/</repository>
|
||||
|
||||
Reference in New Issue
Block a user