Fix markdown guide button.

This commit is contained in:
Franco Montenegro 2022-02-16 18:48:09 -03:00 committed by jessopb
parent 67608dfc9c
commit 8fb67d5980
2 changed files with 4 additions and 1 deletions

View file

@ -10,6 +10,7 @@ import { TO_TRAY_WHEN_CLOSED } from 'constants/settings';
import setupBarMenu from './menu/setupBarMenu';
import * as PAGES from 'constants/pages';
const remote = require('@electron/remote/main');
const shell = require('electron').shell;
function GetAppLangCode() {
// https://www.electronjs.org/docs/api/locales
// 1. Gets the user locale.
@ -190,6 +191,8 @@ export default appState => {
});
window.webContents.setWindowOpenHandler((details) => {
// Open the link in a browser tab.
shell.openExternal(details.url);
return { action: 'deny' };
});

View file

@ -217,7 +217,7 @@ export class FormField extends React.PureComponent<Props> {
getMdeInstance={getInstance}
options={{
spellChecker: true,
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side', 'guide'], // guide hidden until fixed
hideIcons: ['heading', 'image', 'fullscreen', 'side-by-side'],
previewRender(plainText) {
const preview = <MarkdownPreview content={plainText} noDataStore />;
return ReactDOMServer.renderToString(preview);