Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
422dae62
Commit
422dae62
authored
May 12, 2020
by
jerasmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable WYSIWYG editor for the static site editor
Removed the feature flag
parent
62b2360f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
18 deletions
+11
-18
app/assets/javascripts/static_site_editor/components/edit_area.vue
...s/javascripts/static_site_editor/components/edit_area.vue
+1
-8
app/controllers/projects/static_site_editor_controller.rb
app/controllers/projects/static_site_editor_controller.rb
+0
-4
changelogs/unreleased/215121-add-wysiwyg-documentation.yml
changelogs/unreleased/215121-add-wysiwyg-documentation.yml
+5
-0
doc/user/project/static_site_editor/img/static_site_editor_v12_10.png
...ject/static_site_editor/img/static_site_editor_v12_10.png
+0
-0
doc/user/project/static_site_editor/img/wysiwyg_editor_v13_0.png
...r/project/static_site_editor/img/wysiwyg_editor_v13_0.png
+0
-0
doc/user/project/static_site_editor/index.md
doc/user/project/static_site_editor/index.md
+5
-3
spec/frontend/static_site_editor/components/edit_area_spec.js
.../frontend/static_site_editor/components/edit_area_spec.js
+0
-3
No files found.
app/assets/javascripts/static_site_editor/components/edit_area.vue
View file @
422dae62
<
script
>
import
{
GlFormTextarea
}
from
'
@gitlab/ui
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
RichContentEditor
from
'
~/vue_shared/components/rich_content_editor/rich_content_editor.vue
'
;
import
PublishToolbar
from
'
../components/publish_toolbar.vue
'
;
import
EditHeader
from
'
../components/edit_header.vue
'
;
export
default
{
components
:
{
GlFormTextarea
,
RichContentEditor
,
PublishToolbar
,
EditHeader
,
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
title
:
{
type
:
String
,
...
...
@@ -55,8 +49,7 @@ export default {
<
template
>
<div
class=
"d-flex flex-grow-1 flex-column"
>
<edit-header
class=
"py-2"
:title=
"title"
/>
<rich-content-editor
v-if=
"glFeatures.richContentEditor"
v-model=
"editableContent"
/>
<gl-form-textarea
v-else
v-model=
"editableContent"
class=
"h-100 shadow-none"
/>
<rich-content-editor
v-model=
"editableContent"
class=
"mb-9"
/>
<publish-toolbar
class=
"gl-fixed gl-left-0 gl-bottom-0 gl-w-full"
:return-url=
"returnUrl"
...
...
app/controllers/projects/static_site_editor_controller.rb
View file @
422dae62
...
...
@@ -10,10 +10,6 @@ class Projects::StaticSiteEditorController < Projects::ApplicationController
before_action
:assign_ref_and_path
,
only:
[
:show
]
before_action
:authorize_edit_tree!
,
only:
[
:show
]
before_action
do
push_frontend_feature_flag
(
:rich_content_editor
)
end
def
show
@config
=
Gitlab
::
StaticSiteEditor
::
Config
.
new
(
@repository
,
@ref
,
@path
,
params
[
:return_url
])
end
...
...
changelogs/unreleased/215121-add-wysiwyg-documentation.yml
0 → 100644
View file @
422dae62
---
title
:
Add WYSIWYG editor to the Static Site Editor
merge_request
:
31099
author
:
type
:
added
doc/user/project/static_site_editor/img/static_site_editor_v12_10.png
deleted
100644 → 0
View file @
62b2360f
49.5 KB
doc/user/project/static_site_editor/img/wysiwyg_editor_v13_0.png
0 → 100644
View file @
422dae62
47.9 KB
doc/user/project/static_site_editor/index.md
View file @
422dae62
...
...
@@ -5,7 +5,8 @@ description: "The static site editor enables users to edit content on static web
# Static Site Editor
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28758) in GitLab 12.10.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28758) in GitLab 12.10.
> - WYSIWYG editor [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214559) in GitLab 13.0.
Static Site Editor enables users to edit content on static websites without
prior knowledge of the underlying templating language, site architecture, or
...
...
@@ -44,7 +45,7 @@ When clicking it, GitLab will open up an editor window from which the content
can be directly edited. When you're ready, you can submit your changes in a
click of a button:
![
Static Site Editor
](
img/
static_site_editor_v12_1
0.png
)
![
Static Site Editor
](
img/
wysiwyg_editor_v13_
0.png
)
When an editor submits their changes, in the background, GitLab automatically
creates a new branch, commits their changes, and opens a merge request. The
...
...
@@ -79,7 +80,8 @@ company and a new feature has been added to the company product.
1.
You are assigned the task of updating the documentation.
1.
You visit a page and see content that needs to be edited.
1.
Click the
**Edit this page**
button on the production site.
1.
The file is opened in the Static Site Editor.
1.
The file is opened in the Static Site Editor in
**WYSIWYG**
mode. If you wish to edit the raw Markdown
instead, you can toggle the
**Markdown**
mode in the bottom-right corner.
1.
You edit the file right there and click
**Submit changes**
.
1.
A new merge request is automatically created and you assign it to your colleague for review.
...
...
spec/frontend/static_site_editor/components/edit_area_spec.js
View file @
422dae62
...
...
@@ -15,9 +15,6 @@ describe('~/static_site_editor/components/edit_area.vue', () => {
const
buildWrapper
=
(
propsData
=
{})
=>
{
wrapper
=
shallowMount
(
EditArea
,
{
provide
:
{
glFeatures
:
{
richContentEditor
:
true
},
},
propsData
:
{
title
,
content
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment