mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Merge branch 'tinymce' into development
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
@inject('headContent', 'BookStack\Theming\CustomHtmlHeadContentProvider')
|
||||
|
||||
@if(setting('app-custom-head') && \Route::currentRouteName() !== 'settings')
|
||||
<!-- Custom user content -->
|
||||
<!-- Start: custom user content -->
|
||||
{!! $headContent->forWeb() !!}
|
||||
<!-- End custom user content -->
|
||||
<!-- End: custom user content -->
|
||||
@endif
|
@ -1,22 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ config('app.lang') }}"
|
||||
dir="{{ config('app.rtl') ? 'rtl' : 'ltr' }}">
|
||||
<head>
|
||||
<title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}</title>
|
||||
@extends('layouts.plain')
|
||||
|
||||
<!-- Meta -->
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- Styles and Fonts -->
|
||||
<link rel="stylesheet" href="{{ versioned_asset('dist/styles.css') }}">
|
||||
<link rel="stylesheet" media="print" href="{{ versioned_asset('dist/print-styles.css') }}">
|
||||
|
||||
<!-- Custom Styles & Head Content -->
|
||||
@include('common.custom-styles')
|
||||
@include('common.custom-head')
|
||||
</head>
|
||||
<body>
|
||||
@section('content')
|
||||
<div id="content" class="block">
|
||||
<div class="container small mt-xl">
|
||||
<div class="card content-wrap auto-height">
|
||||
@ -25,5 +9,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@endsection
|
123
resources/views/help/wysiwyg.blade.php
Normal file
123
resources/views/help/wysiwyg.blade.php
Normal file
@ -0,0 +1,123 @@
|
||||
@extends('layouts.plain')
|
||||
@section('document-class', setting()->getForCurrentUser('dark-mode-enabled') ? 'dark-mode ' : '')
|
||||
|
||||
@section('content')
|
||||
<div class="px-l pb-m m-s card">
|
||||
|
||||
<h4>{{ trans('editor.editor_license') }}</h4>
|
||||
<p>
|
||||
{!! trans('editor.editor_tiny_license', ['tinyLink' => '<a href="https://www.tiny.cloud/" target="_blank" rel="noopener noreferrer">TinyMCE</a>']) !!}
|
||||
<br>
|
||||
<a href="{{ url('/libs/tinymce/license.txt') }}" target="_blank">{{ trans('editor.editor_tiny_license_link') }}</a>
|
||||
</p>
|
||||
|
||||
<h4>{{ trans('editor.shortcuts') }}</h4>
|
||||
|
||||
<p>{{ trans('editor.shortcuts_intro') }}</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('editor.shortcut') }} {{ trans('editor.windows_linux') }}</th>
|
||||
<th>{{ trans('editor.shortcut') }} {{ trans('editor.mac') }}</th>
|
||||
<th>{{ trans('editor.description') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>Ctrl</code>+<code>S</code></td>
|
||||
<td><code>Cmd</code>+<code>S</code></td>
|
||||
<td>{{ trans('entities.pages_edit_save_draft') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Ctrl</code>+<code>Enter</code></td>
|
||||
<td><code>Cmd</code>+<code>Enter</code></td>
|
||||
<td>{{ trans('editor.save_continue') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Ctrl</code>+<code>B</code></td>
|
||||
<td><code>Cmd</code>+<code>B</code></td>
|
||||
<td>{{ trans('editor.bold') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Ctrl</code>+<code>I</code></td>
|
||||
<td><code>Cmd</code>+<code>I</code></td>
|
||||
<td>{{ trans('editor.italic') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>Ctrl</code>+<code>1</code><br>
|
||||
<code>Ctrl</code>+<code>2</code><br>
|
||||
<code>Ctrl</code>+<code>3</code><br>
|
||||
<code>Ctrl</code>+<code>4</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>Cmd</code>+<code>1</code><br>
|
||||
<code>Cmd</code>+<code>2</code><br>
|
||||
<code>Cmd</code>+<code>3</code><br>
|
||||
<code>Cmd</code>+<code>4</code>
|
||||
</td>
|
||||
<td>
|
||||
{{ trans('editor.header_large') }} <br>
|
||||
{{ trans('editor.header_medium') }} <br>
|
||||
{{ trans('editor.header_small') }} <br>
|
||||
{{ trans('editor.header_tiny') }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>Ctrl</code>+<code>5</code><br>
|
||||
<code>Ctrl</code>+<code>D</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>Cmd</code>+<code>5</code><br>
|
||||
<code>Cmd</code>+<code>D</code>
|
||||
</td>
|
||||
<td>{{ trans('editor.paragraph') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>Ctrl</code>+<code>6</code><br>
|
||||
<code>Ctrl</code>+<code>Q</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>Cmd</code>+<code>6</code><br>
|
||||
<code>Cmd</code>+<code>Q</code>
|
||||
</td>
|
||||
<td>{{ trans('editor.blockquote') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>Ctrl</code>+<code>7</code><br>
|
||||
<code>Ctrl</code>+<code>E</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>Cmd</code>+<code>7</code><br>
|
||||
<code>Cmd</code>+<code>E</code>
|
||||
</td>
|
||||
<td>{{ trans('editor.insert_code_block') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>Ctrl</code>+<code>Shift</code>+<code>8</code><br>
|
||||
<code>Ctrl</code>+<code>Shift</code>+<code>E</code>
|
||||
</td>
|
||||
<td>
|
||||
<code>Cmd</code>+<code>Shift</code>+<code>8</code><br>
|
||||
<code>Cmd</code>+<code>Shift</code>+<code>E</code>
|
||||
</td>
|
||||
<td>{{ trans('editor.inline_code') }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Ctrl</code>+<code>9</code></td>
|
||||
<td><code>Cmd</code>+<code>9</code></td>
|
||||
<td>
|
||||
{{ trans('editor.callouts') }} <br>
|
||||
{{ trans('editor.callouts_cycle') }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
23
resources/views/layouts/plain.blade.php
Normal file
23
resources/views/layouts/plain.blade.php
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ config('app.lang') }}"
|
||||
dir="{{ config('app.rtl') ? 'rtl' : 'ltr' }}"
|
||||
class="@yield('document-class')">
|
||||
<head>
|
||||
<title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}</title>
|
||||
|
||||
<!-- Meta -->
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- Styles and Fonts -->
|
||||
<link rel="stylesheet" href="{{ versioned_asset('dist/styles.css') }}">
|
||||
<link rel="stylesheet" media="print" href="{{ versioned_asset('dist/print-styles.css') }}">
|
||||
|
||||
<!-- Custom Styles & Head Content -->
|
||||
@include('common.custom-styles')
|
||||
@include('common.custom-head')
|
||||
</head>
|
||||
<body>
|
||||
@yield('content')
|
||||
</body>
|
||||
</html>
|
11
resources/views/pages/parts/editor-translations.blade.php
Normal file
11
resources/views/pages/parts/editor-translations.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
@php
|
||||
$en = trans('editor', [], 'en');
|
||||
$lang = trans('editor');
|
||||
$mergedText = [];
|
||||
foreach ($en as $key => $value) {
|
||||
$mergedText[$value] = $lang[$key] ?? $value;
|
||||
}
|
||||
@endphp
|
||||
<script nonce="{{ $cspNonce }}">
|
||||
window.editor_translations = @json($mergedText);
|
||||
</script>
|
@ -1,4 +1,5 @@
|
||||
<div component="wysiwyg-editor"
|
||||
option:wysiwyg-editor:language="{{ config('app.lang') }}"
|
||||
option:wysiwyg-editor:page-id="{{ $model->id ?? 0 }}"
|
||||
option:wysiwyg-editor:text-direction="{{ config('app.rtl') ? 'rtl' : 'ltr' }}"
|
||||
option:wysiwyg-editor:image-upload-error-text="{{ trans('errors.image_upload_error') }}"
|
||||
@ -11,4 +12,6 @@
|
||||
|
||||
@if($errors->has('html'))
|
||||
<div class="text-neg text-small">{{ $errors->first('html') }}</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@include('pages.parts.editor-translations')
|
Reference in New Issue
Block a user