Skip to content

Commit 8f638f0

Browse files
committed
Bug fixed that the code editor resets the styles
1 parent 0fe5d52 commit 8f638f0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

dist/assets/editor.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/js/plugins/code-editor/src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ export default (editor, opts = {}) => {
3636
btnEdit.className = stylePrefix + 'btn-prim ' + stylePrefix + 'btn-import';
3737
btnEdit.onclick = function () {
3838
let html = (codeViewer.editor.getValue() || '').trim();
39+
let css = editor.getCss();
3940

4041
editor.DomComponents.getWrapper().set('content', '');
4142
editor.setComponents(html);
43+
editor.setStyle(css);
4244

4345
modal.close();
4446

webpack.mix.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const mix = require('laravel-mix');
1919
*/
2020

2121
// merge all needed JS into a big bundle file
22-
mix.js('src/resources/js', 'dist/assets/editor.js')
22+
mix.sourceMaps(false, 'source-map').js('src/resources/js', 'dist/assets/editor.js')
2323
.sass('src/resources/scss/gjs.scss','dist/assets/editor.css')
2424
.options({
2525
processCssUrls: false

0 commit comments

Comments
 (0)