Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

pref: change the display of block-level inline elements to inline-block #53

Merged
merged 1 commit into from Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/editor/src/components/EditorBubbleMenu.vue
Expand Up @@ -72,7 +72,7 @@ const shouldShow = (
:default-animation="bubbleMenu.defaultAnimation"
>
<div
class="bubble-menu bg-white flex items-center rounded p-1 border drop-shadow space-x-0.5"
class="bubble-menu bg-white flex items-center rounded-md p-1 border drop-shadow space-x-0.5"
>
<template v-if="bubbleMenu.items">
<template
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/bubble/BubbleItem.vue
Expand Up @@ -58,7 +58,7 @@ const handleBubbleItemClick = (editor: Editor) => {
}"
:class="{ 'bg-gray-200 !text-black': isActive({ editor }) }"
:title="title"
class="text-gray-600 text-lg hover:bg-gray-100 p-2 rounded-sm"
class="text-gray-600 text-lg hover:bg-gray-100 p-2 rounded-md"
@click="handleBubbleItemClick(editor)"
>
<component :is="icon" :style="iconStyle" class="w-5 h-5" />
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/extensions/audio/AudioView.vue
Expand Up @@ -47,7 +47,7 @@ onMounted(() => {
</script>

<template>
<node-view-wrapper as="div">
<node-view-wrapper as="div" class="inline-block" :class="{ 'w-full': !src }">
<div
class="inline-block overflow-hidden transition-all text-center relative h-full w-full"
>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/extensions/iframe/IframeView.vue
Expand Up @@ -42,7 +42,7 @@ onMounted(() => {
</script>

<template>
<node-view-wrapper as="div">
<node-view-wrapper as="div" class="inline-block" :class="{ 'w-full': !src }">
<div
class="inline-block overflow-hidden transition-all text-center relative h-full"
:style="{
Expand Down
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { i18n } from "@/locales";
import type { Editor } from "@tiptap/vue-3";
import { computed, type Component, watch } from "vue";
import { computed, type Component } from "vue";
import Image from "./index";

const props = defineProps<{
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/extensions/image/ImageView.vue
Expand Up @@ -65,7 +65,7 @@ onMounted(() => {
</script>

<template>
<node-view-wrapper as="div">
<node-view-wrapper as="div" class="inline-block" :class="{ 'w-full': !src }">
<div v-if="!src" class="p-1.5 w-full">
<input
ref="inputRef"
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/extensions/link/LinkBubbleButton.vue
Expand Up @@ -49,7 +49,7 @@ const target = computed({
? i18n.global.t('editor.extensions.link.edit_link')
: i18n.global.t('editor.extensions.link.add_link')
"
class="text-gray-600 text-lg hover:bg-gray-100 p-0.5 rounded-sm"
class="text-gray-600 text-lg hover:bg-gray-100 p-2 rounded-md"
:class="{ 'bg-gray-200 !text-black': isActive({ editor }) }"
>
<MdiLinkVariant />
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/extensions/video/VideoView.vue
Expand Up @@ -51,7 +51,7 @@ onMounted(() => {
</script>

<template>
<node-view-wrapper as="div">
<node-view-wrapper as="div" class="inline-block" :class="{ 'w-full': !src }">
<div
class="inline-block overflow-hidden transition-all text-center relative h-full"
:style="{
Expand Down