This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
The following commit(s) were added to refs/heads/master by this push:
new 7328849 Updating to use wysihtml instead of summernote
7328849 is described below
commit 7328849b66921803b2f3a3757141800242326798
Author: Dan Klco <[email protected]>
AuthorDate: Mon Oct 22 14:59:36 2018 -0400
Updating to use wysihtml instead of summernote
---
ui/src/main/frontend/gulpfile.js | 6 +-
ui/src/main/frontend/package.json | 2 +-
ui/src/main/frontend/src/js/cms.fields.js | 26 +--
ui/src/main/frontend/src/js/cms.form.js | 2 +-
ui/src/main/frontend/src/js/cms.js | 27 ---
ui/src/main/frontend/src/scss/cms.scss | 26 +++
.../components/editor/fields/richtext/field.jsp | 23 ++-
.../fields/richtext/toolbar/button/button.jsp | 45 +++++
.../{field.jsp => toolbar/buttonbar/buttonbar.jsp} | 20 +-
.../buttongroup/buttongroup.jsp} | 16 +-
.../richtext/toolbar/createlink/createlink.jsp | 48 +++++
.../editor/fields/richtext/toolbar/default.json | 203 +++++++++++++++++++++
.../richtext/toolbar/insertimage/insertimage.jsp | 45 +++++
.../optionbutton/optionbutton.jsp} | 14 +-
.../textoptions/textoptions.jsp} | 24 ++-
.../richtext/{field.jsp => toolbar/toolbar.jsp} | 16 +-
.../viewsource/viewsource.jsp} | 14 +-
17 files changed, 435 insertions(+), 122 deletions(-)
diff --git a/ui/src/main/frontend/gulpfile.js b/ui/src/main/frontend/gulpfile.js
index f41636e..3095e74 100755
--- a/ui/src/main/frontend/gulpfile.js
+++ b/ui/src/main/frontend/gulpfile.js
@@ -85,7 +85,11 @@ gulp.task('cms-js', function() {
'./node_modules/datatables/media/js/jquery.dataTables.js',
'./node_modules/datatables-bulma/js/dataTables.bulma.js',
'./node_modules/handlebars/dist/handlebars.js',
- './node_modules/summernote/dist/summernote-lite.js',
+ './node_modules/wysihtml/dist/minified/wysihtml.min.js',
+
'./node_modules/wysihtml/dist/minified/wysihtml.all-commands.min.js',
+
'./node_modules/wysihtml/dist/minified/wysihtml.table_editing.min.js',
+ './node_modules/wysihtml/dist/minified/wysihtml.toolbar.min.js',
+ './node_modules/wysihtml/parser_rules/advanced_and_extended.js',
'./node_modules/js-autocomplete/auto-complete.js',
'./src/js/nomnom.js',
'./src/js/cms.js',
diff --git a/ui/src/main/frontend/package.json
b/ui/src/main/frontend/package.json
index d6290c8..d2744af 100644
--- a/ui/src/main/frontend/package.json
+++ b/ui/src/main/frontend/package.json
@@ -9,7 +9,7 @@
"dependencies": {
"jquery": "^3.3.1",
"handlebars": "^4.0.11",
- "summernote": "^0.8.9",
+ "wysihtml": "^0.6.0-beta1",
"jam-icons": "^2.0.0",
"js-autocomplete": "^1.0.4",
"datatables": "^1.10.18",
diff --git a/ui/src/main/frontend/src/js/cms.fields.js
b/ui/src/main/frontend/src/js/cms.fields.js
index feed710..fec4a93 100644
--- a/ui/src/main/frontend/src/js/cms.fields.js
+++ b/ui/src/main/frontend/src/js/cms.fields.js
@@ -69,30 +69,12 @@
}
});
-
-
- nomnom.decorate('.richtext', {
+ nomnom.decorate('.rte', {
callbacks : {
created : function(){
- $(this).summernote({
- toolbar: [
- ['style', ['bold', 'italic', 'clear','strikethrough',
'superscript', 'subscript']],
- ['insert', ['picture', 'link', 'table', 'hr']],
- ['para', ['style','ul', 'ol', 'paragraph']],
- ['misc', ['codeview', 'undo','redo','help']]
- ],
- followingToolbar: false,
- dialogsInBody: true,
- height: 200,
- onCreateLink: function (url) {
- return url;
- },
- callbacks: {
- onDialogShown: function(){
- Sling.CMS.ui.suggest($('.note-link-url')[0],
'content', '/content');
- Sling.CMS.ui.suggest($('.note-image-url')[0],
'content', '/content');
- }
- }
+ new wysihtml.Editor(this.querySelector('.rte-editor'), {
+ toolbar: this.querySelector('.rte-toolbar'),
+ parserRules: wysihtmlParserRules
});
}
}
diff --git a/ui/src/main/frontend/src/js/cms.form.js
b/ui/src/main/frontend/src/js/cms.form.js
index 5b16ec0..237a8da 100644
--- a/ui/src/main/frontend/src/js/cms.form.js
+++ b/ui/src/main/frontend/src/js/cms.form.js
@@ -1,5 +1,5 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
+w * Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
diff --git a/ui/src/main/frontend/src/js/cms.js
b/ui/src/main/frontend/src/js/cms.js
index 0af533b..92c1789 100644
--- a/ui/src/main/frontend/src/js/cms.js
+++ b/ui/src/main/frontend/src/js/cms.js
@@ -110,33 +110,6 @@ nomnom.decorate('.suffix-form', {
}
});
-nomnom.decorate('.richtext', {
- callbacks : {
- created : function(){
- $(this).summernote({
- toolbar: [
- ['style', ['bold', 'italic', 'clear','strikethrough',
'superscript', 'subscript']],
- ['insert', ['picture', 'link', 'table', 'hr']],
- ['para', ['style','ul', 'ol', 'paragraph']],
- ['misc', ['codeview', 'undo','redo','help']]
- ],
- followingToolbar: false,
- dialogsInBody: true,
- height: 200,
- onCreateLink: function (url) {
- return url;
- },
- callbacks: {
- onDialogShown: function(){
- Sling.CMS.ui.suggest($('.note-link-url')[0],
'content', '/content');
- Sling.CMS.ui.suggest($('.note-image-url')[0],
'content', '/content');
- }
- }
- });
- }
- }
-});
-
nomnom.decorate('.page-properties-container', {
callbacks : {
created : function(){
diff --git a/ui/src/main/frontend/src/scss/cms.scss
b/ui/src/main/frontend/src/scss/cms.scss
index 036d09c..beafbd1 100644
--- a/ui/src/main/frontend/src/scss/cms.scss
+++ b/ui/src/main/frontend/src/scss/cms.scss
@@ -64,6 +64,10 @@ h5 {
font-size: 120%;
}
+.has-padding-1 {
+ padding: .5em;
+}
+
.editor-page {
overflow-y: auto;
}
@@ -120,6 +124,22 @@ h5 {
padding: 1em;
}
+.rte-form {
+ margin: .5em 0;
+}
+
+.rte-form .buttons {
+ margin: .5em 0;
+}
+
+.rte-toolbar .jam:before {
+ font-size: x-large;
+}
+
+.rte-toolbar .level {
+ margin-bottom: .5em;
+}
+
#search-results .tile {
flex-wrap: wrap;
padding: .5em;
@@ -148,4 +168,10 @@ table.dataTable thead .sorting_desc:after {
.table tr.is-selected {
background-color: lighten($gray, 50%);
color: $grey-darker;
+}
+
+.wysihtml-sandbox {
+ width: 100% !important;
+ max-height: 600px !important;
+ min-height: 300px !important;
}
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
index 45da1c3..184deed 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
@@ -16,13 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div class="rte">
+ <c:choose>
+ <c:when test="${not empty properties.toolbar}">
+ <c:set var="toolbar"
value="${sling:getResource(resourceResolver,properties.toolbar)}" />
+ </c:when>
+ <c:otherwise>
+ <c:set var="toolbar"
value="${sling:getResource(resourceResolver,'/libs/sling-cms/components/editor/fields/richtext/toolbar/default')}"
/>
+ </c:otherwise>
+ </c:choose>
+ <sling:include resource="${toolbar}" />
+ <textarea class="rte-editor textarea" name="${properties.name}"
${required} ${disabled}>${editProperties[properties.name]}</textarea>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/button/button.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/button/button.jsp
new file mode 100644
index 0000000..c5b6244
--- /dev/null
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/button/button.jsp
@@ -0,0 +1,45 @@
+<%-- /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */ --%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<c:choose>
+ <c:when test="${not empty properties.value}">
+ <a class="button is-small"
data-wysihtml-command="${properties.command}"
data-wysihtml-command-value="${properties.value}">
+ <c:choose>
+ <c:when test="${not empty properties.icon}">
+ <em class="jam jam-${properties.icon} icon"></em>
+ </c:when>
+ <c:otherwise>
+ <strong class="icon">${properties.text}</strong>
+ </c:otherwise>
+ </c:choose>
+ </a>
+ </c:when>
+ <c:otherwise>
+ <a class="button is-small"
data-wysihtml-command="${properties.command}">
+ <c:choose>
+ <c:when test="${not empty properties.icon}">
+ <em class="jam jam-${properties.icon} icon"></em>
+ </c:when>
+ <c:otherwise>
+ <strong class="icon">${properties.text}</strong>
+ </c:otherwise>
+ </c:choose>
+ </a>
+ </c:otherwise>
+</c:choose>
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/buttonbar/buttonbar.jsp
similarity index 64%
copy from
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
copy to
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/buttonbar/buttonbar.jsp
index 45da1c3..a0101e9 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/buttonbar/buttonbar.jsp
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div class="level is-mobile">
+ <div class="level-left">
+ <c:forEach var="child" items="${sling:listChildren(resource)}">
+ <div class="level-item">
+ <sling:include resource="${child}" />
+ </div>
+ </c:forEach>
+ </div>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/buttongroup/buttongroup.jsp
similarity index 64%
copy from
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
copy to
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/buttongroup/buttongroup.jsp
index 45da1c3..e614093 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/buttongroup/buttongroup.jsp
@@ -16,13 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div class="buttons has-addons">
+ <c:forEach var="child" items="${sling:listChildren(resource)}">
+ <sling:include resource="${child}" />
+ </c:forEach>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/createlink/createlink.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/createlink/createlink.jsp
new file mode 100644
index 0000000..64c6993
--- /dev/null
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/createlink/createlink.jsp
@@ -0,0 +1,48 @@
+<%-- /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */ --%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div data-wysihtml-dialog="createLink" style="display: none;">
+ <div class="has-padding-1 has-background-white-ter rte-form">
+ <p>Link</p>
+ <div class="field has-addons">
+ <div class="control is-expanded">
+ <input class="input pathfield is-small"
data-wysihtml-dialog-field="href" data-type="nt:hierarchyNode"
data-base="/content" autocomplete="off" />
+ </div>
+ <div class="control">
+ <a href="/cms/shared/search.html" class="button is-small
Fetch-Modal search-button" data-title="Search" data-path=".Main-Content > *">
+ <span class="jam jam-search"></span>
+ </a>
+ </div>
+ </div>
+ <div class="field">
+ <select class="select is-small"
data-wysihtml-dialog-field="target">
+ <option value="">Same Window</option>
+ <option value="_blank">New Window</option>
+ </select>
+ </div>
+ <div class="buttons">
+ <a data-wysihtml-dialog-action="save" class="button is-small
is-success">
+ <em class="jam jam-check icon"></em>
+ </a>
+ <a data-wysihtml-dialog-action="cancel" class="button is-small">
+ <em class="jam jam-close icon"></em>
+ </a>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/default.json
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/default.json
new file mode 100644
index 0000000..654fb93
--- /dev/null
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/default.json
@@ -0,0 +1,203 @@
+{
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar",
+ "primary": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttonbar",
+ "basic": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttongroup",
+ "bold": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "bold",
+ "icon": "bold"
+ },
+ "italic": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "italic",
+ "icon": "italic"
+ },
+ "underline": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "underline",
+ "icon": "underline"
+ }
+ },
+ "paragraph": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/optionbutton",
+ "text": "¶"
+ },
+ "alignment": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttongroup",
+ "alignleft": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "alignLeftStyle",
+ "icon": "align-left"
+ },
+ "aligncenter": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "alignCenterStyle",
+ "icon": "align-center"
+ },
+ "alignright": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "alignRightStyle",
+ "icon": "align-right"
+ }
+ },
+ "lists": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttongroup",
+ "unorderedlist": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "insertUnorderedList",
+ "icon": "unordered-list"
+ },
+ "orderedlist": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "insertOrderedList",
+ "icon": "ordered-list"
+ }
+ },
+ "indentation": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttongroup",
+ "indent": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "indentList",
+ "icon": "indent"
+ },
+ "outdent": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "outdentList",
+ "icon": "unindent"
+ }
+ }
+ },
+ "secondary": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttonbar",
+ "links": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttongroup",
+ "link": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "createLink",
+ "icon": "link"
+ },
+ "unlink": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "removeLink",
+ "icon": "close"
+ }
+ },
+ "image": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "insertImage",
+ "icon": "picture"
+ },
+ "undo": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/buttongroup",
+ "undo": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "undo",
+ "icon": "undo"
+ },
+ "redo": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "redo",
+ "icon": "redo"
+ }
+ },
+ "source": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/viewsource"
+ }
+ },
+ "createlink": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/createlink"
+ },
+ "insertimage": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/insertimage"
+ },
+ "textoptions": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/textoptions",
+ "paragraph": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "text": "¶",
+ "value": "p"
+ },
+ "h1": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "icon": "header-1",
+ "value": "h1"
+ },
+ "h2": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "icon": "header-2",
+ "value": "h2"
+ },
+ "h3": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "icon": "header-3",
+ "value": "h3"
+ },
+ "h4": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "icon": "header-4",
+ "value": "h4"
+ },
+ "h5": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "icon": "header-5",
+ "value": "h5"
+ },
+ "pre": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "icon": "terminal",
+ "value": "pre"
+ },
+ "quote": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType":
"sling-cms/components/editor/fields/richtext/toolbar/button",
+ "command": "formatBlock",
+ "text": "”",
+ "value": "blockquote"
+ }
+ }
+}
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/insertimage/insertimage.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/insertimage/insertimage.jsp
new file mode 100644
index 0000000..10211b8
--- /dev/null
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/insertimage/insertimage.jsp
@@ -0,0 +1,45 @@
+<%-- /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */ --%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div data-wysihtml-dialog="insertImage" style="display:none">
+ <div class="has-padding-1 has-background-white-ter rte-form">
+ <p>Image</p>
+ <div class="field has-addons">
+ <div class="control is-expanded">
+ <input class="input pathfield is-small"
data-wysihtml-dialog-field="src" data-type="nt:file" data-base="/content"
autocomplete="off" />
+ </div>
+ <div class="control">
+ <a href="/cms/shared/search.html" class="button is-small
Fetch-Modal search-button" data-title="Search" data-path=".Main-Content > *">
+ <span class="jam jam-search"></span>
+ </a>
+ </div>
+ </div>
+ <div class="field">
+ <input class="input is-small" data-wysihtml-dialog-field="alt"
placeholder="Alternative text..." />
+ </div>
+ <div class="buttons">
+ <a data-wysihtml-dialog-action="save" class="button is-small
is-success">
+ <em class="jam jam-check icon"></em>
+ </a>
+ <a data-wysihtml-dialog-action="cancel" class="button is-small">
+ <em class="jam jam-close icon"></em>
+ </a>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/optionbutton/optionbutton.jsp
similarity index 64%
copy from
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
copy to
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/optionbutton/optionbutton.jsp
index 45da1c3..bc7cad3 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/optionbutton/optionbutton.jsp
@@ -16,13 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<a class="button is-small toggle-hidden" data-target=".text-options">
+ <strong class="icon">¶</strong>
+</a>
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/textoptions/textoptions.jsp
similarity index 60%
copy from
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
copy to
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/textoptions/textoptions.jsp
index 45da1c3..750032c 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/textoptions/textoptions.jsp
@@ -16,13 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div class="text-options is-hidden">
+ <div class="level is-mobile has-padding-1 has-background-white-ter">
+ <div class="level-left">
+ <div class="level-item">
+ <div class="buttons has-addons">
+ <c:forEach var="child"
items="${sling:listChildren(resource)}">
+ <sling:include resource="${child}" />
+ </c:forEach>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/toolbar.jsp
similarity index 64%
copy from
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
copy to
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/toolbar.jsp
index 45da1c3..f07eeff 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/toolbar.jsp
@@ -16,13 +16,9 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<div class="rte-toolbar">
+ <c:forEach var="child" items="${sling:listChildren(resource)}">
+ <sling:include resource="${child}" />
+ </c:forEach>
+</div>
\ No newline at end of file
diff --git
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/viewsource/viewsource.jsp
similarity index 64%
copy from
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
copy to
ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/viewsource/viewsource.jsp
index 45da1c3..9a30b42 100644
---
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/field.jsp
+++
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/editor/fields/richtext/toolbar/viewsource/viewsource.jsp
@@ -16,13 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
-<textarea class="richtext" name="${properties.name}" ${required}
${disabled}>${editProperties[properties.name]}</textarea>
-<c:choose>
- <c:when test="${slingRequest.requestPathInfo.suffixResource != null}">
- <c:set var="path"
value="${sling:getAbsoluteParent(slingRequest.requestPathInfo.suffixResource,2).path}"
/>
- </c:when>
- <c:otherwise>
- <c:set var="path" value="/content" />
- </c:otherwise>
-</c:choose>
\ No newline at end of file
+<%@include file="/libs/sling-cms/global.jsp"%>
+<a class="button is-small" data-wysihtml-action="change_view">
+ <strong class="icon"></></strong>
+</a>